rabin %!s(int64=7) %!d(string=hai) anos
pai
achega
4cd416426f
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      service/ssgdfs.py

+ 7 - 1
service/ssgdfs.py

@@ -20,7 +20,7 @@ class Ssgdfs(object):
 				# 开始进入抢购下单核心程序
 				self.core()
 				# 关闭
-				self.close()
+				self.quit()
 			except BaseException as e:
 				print e
 				self.start()
@@ -71,6 +71,7 @@ class Ssgdfs(object):
 		if string in data:
 			return True
 		else:
+			self.close()
 			return False
 
 	def open(self):
@@ -168,6 +169,11 @@ class Ssgdfs(object):
 		self.driver.implicitly_wait(10)
 
 	def close(self):
+		self.driver.quit()
+		#self.driver.close()
+		#self.display.stop()
+
+	def quit(self):
 		self.driver.quit()
 		#self.driver.close()
 		#self.display.stop()