Example #1
0
 def __init__(self, browser):
     timeStamp = time.time()
     timeArray = time.localtime(timeStamp)
     self.date = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
     self.d = self.initDict()
     self.browser = browser.driver
     self.dir = self._dir = ''
     self.ipnum = crawlerfun.ip2num(browser.ip)
     self.debug = True
Example #2
0
 def __init__(self, browser):
     timeStamp = time.time()
     timeArray = time.localtime(timeStamp)
     self.date = time.strftime('%Y-%m-%d %H:%M:%S', timeArray)
     self.projectName = 'mp_weixin'
     self.d = crawlerfun.initDict(self.projectName)
     self.browser = browser
     self.dir = self._dir = self.source = ''
     self.ipnum = crawlerfun.ip2num('192.168.149.51')
     self.debug = True
 def __init__(self, browser):
     timeStamp = time.time()
     timeArray = time.localtime(timeStamp)
     self.date = time.strftime('%Y-%m-%d %H:%M:%S', timeArray)
     self.projectName = 'ahjz_gov'
     self.d = crawlerfun.initDict(self.projectName)
     self.url = browser.url
     self.browser = browser.driver
     self.dir = self._dir = self.source = ''
     self.ipnum = crawlerfun.ip2num(browser.ip)
     self.debug = True
Example #4
0
 def __init__(self, d):
     timeStamp = time.time()
     timeArray = time.localtime(timeStamp)
     self.date = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
     self.d = d
     self.dir = self._dir = ''
     self.ipnum = crawlerfun.ip2num('54.36.226.229')
     self.headers = {
         "Accept":
         "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
         "Accept-Encoding":
         "gzip, deflate, br",
         "Accept-Language":
         "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2",
         "User-Agent":
         "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0",
     }