赞
踩
- import os
- import time
- import pickle
- from time import sleep
- from selenium import webdriver
-
-
- # 大麦网主页
- damai_url = "https://www.damai.cn/"
- # 登录页
- login_url = "https://passport.damai.cn/login?ru=https%3A%2F%2Fwww.damai.cn%2F"
- # 抢票目标页
- target_url = "https://detail.damai.cn/item.htm?spm=a2oeg.search_category.0.0.77f24d15RWgT4o&id=654534889506&clicktitle=%E5%A4%A7%E4%BC%97%E7"
-
- class Concert:
- def __init__(self):
- self.status = 0 # 状态,表示如今进行到何种程度
- self.login_method = 1 # {0:模拟登录,1:Cookie登录}自行选择登录方式
- self.driver = webdriver.Chrome(executable_path='D:\chromedriver\chromedriver_win32\chromedriver.exe') # 默认Chrome浏览器
-
-
- def set_cookie(self):
- self.driver.get(damai_url)
- print("###请点击登录###")
- while self.driver.title.find('大麦网-全球演出赛事官方购票平台-100%正品、先付先抢、在线选座!') !
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。