Exemple #1
0
 def __init__(self, **kwargs):
     super().__init__(**kwargs)
     self.postgres = app.postgres()
     self.headers = {
         'User-Agent':
         'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko'
         ') Chrome/67.0.3396.79 Safari/537.36',
     }
Exemple #2
0
 def __init__(self, **kwargs):
     super().__init__(**kwargs)
     self.postgres = app.postgres()
     self.city_list = self.postgres.fetch_all(sql.get_city())
     self.job_list = self.postgres.fetch_all(sql.get_job())
     self.start = 'https://www.lagou.com/jobs/positionAjax.json?px=default&needAddtionalResult=false&city={}'
     self.referer = 'https://www.lagou.com/jobs/list_{}'
     self.source_url = 'https://www.lagou.com/jobs/{}.html'
     self.company_logo = 'https://www.lgstatic.com/thumbnail_120x120/{}'
     self.headers = {
         'Host': 'www.lagou.com',
         'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
                       'Chrome/69.0.3497.100 Safari/537.36',
     }
Exemple #3
0
 def __init__(self, **kwargs):
     super().__init__(**kwargs)
     self.postgres = app.postgres()
     self.city_list = self.postgres.fetch_all(sql.get_city())
     self.job_list = self.postgres.fetch_all(sql.get_job())
     self.start = 'https://www.lagou.com/jobs/positionAjax.json?px=default&needAddtionalResult=false&city={0}'
     self.referer = 'https://www.lagou.com/jobs/list_{0}'
     self.source_url = 'https://www.lagou.com/jobs/{0}.html'
     self.headers = {
         'Connection': 'keep-alive',
         'Accept-Encoding:': 'gzip, deflate, br',
         'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko'
                       ') Chrome/67.0.3396.79 Safari/537.36',
     }
Exemple #4
0
 def __init__(self, **kwargs):
     super().__init__(**kwargs)
     self.postgres = app.postgres()
Exemple #5
0
 def __init__(self):
     self.redis = app.redis()
     self.elastic = app.elastic()
     self.postgres = app.postgres()
Exemple #6
0
 def __init__(self, **kwargs):
     super().__init__(**kwargs)
     self.postgres = app.postgres()
     self.city_list = self.postgres.fetch_all(sql.get_city())
     self.job_list = self.postgres.fetch_all(sql.get_job())
     self.start = 'https://www.zhipin.com/c{0}-p{1}'