|
@@ -73,15 +73,19 @@ class Ssgdfs(object):
|
|
|
|
|
|
def check(self, product):
|
|
|
#r = requests.get(product)
|
|
|
- self.get(product)
|
|
|
- data = self.driver.page_source
|
|
|
- #print(data)
|
|
|
- # 可以购买
|
|
|
- string = 'btn_direct_buy.gif'
|
|
|
- #data = r.text
|
|
|
- if string in data:
|
|
|
- return True
|
|
|
- else:
|
|
|
+ try:
|
|
|
+ self.get(product)
|
|
|
+ data = self.driver.page_source
|
|
|
+ #print(data)
|
|
|
+ # 可以购买
|
|
|
+ string = 'btn_direct_buy.gif'
|
|
|
+ #data = r.text
|
|
|
+ if string in data:
|
|
|
+ return True
|
|
|
+ else:
|
|
|
+ return False
|
|
|
+ except BaseException as e:
|
|
|
+ self.num = 100
|
|
|
return False
|
|
|
|
|
|
def open(self):
|