31 lines
797 B
Python
31 lines
797 B
Python
#!/bin/env python
|
||
# -*-coding:utf-8-*-
|
||
|
||
import requests
|
||
import time
|
||
#price格式 : R석@60000
|
||
def start(start, count,price):
|
||
i = 0
|
||
while i <= count:
|
||
try:
|
||
start += 1
|
||
result = requests.get("http://ticket.yes24.com/OSIF/Book.asmx/GetHallMapRemain?idHall=0000&idTime={}".format(start))
|
||
if result.text and price in result.text:
|
||
print(result.text)
|
||
break
|
||
if result.text and '<div class="errorWrap">' in result.text:
|
||
print("出错了")
|
||
print(result.text)
|
||
|
||
i += 1
|
||
except Exception as e:
|
||
print(e)
|
||
pass
|
||
|
||
print(u"结束")
|
||
#전석 44,000원
|
||
#u"지정석@110000"
|
||
#开始idtime
|
||
#循环次数
|
||
start(990180, 20000, u"지정석@99000")
|