Пример #1
0
 def __init__(self):
     #资产监控
     self.dispatch_main = dispatch_main.dispatch_main()
     self.config_main = fun_all.fun_all()
     mongodb = mongo_con.mongo_con()
     mongodb.update_all_date(self.config_main.callback_domain())
     mongodb.exit_mongo()
Пример #2
0
 def __init__(self):
     self.config_main = fun_all.fun_all()
     #浏览器
     chrome_options = Options()
     #headless模式运行
     chrome_options.add_argument('--headless')
     #不加载图片
     chrome_options.add_argument('blink-settings=imagesEnabled=false')
     #调用当前chrome用户数据 cookie登陆方式
     #chrome_options.add_argument(r'user-data-dir=%s'%models.read_config()['chrome_user_data'])
     chrome_options.add_argument('--disable-gpu')
     #chrome_options.add_argument('--hide-scrollbars')
     chrome_options.binary_location = r'%s' % self.config_main.callback_chrome_path(
     )
     self.driver = webdriver.Chrome(options=chrome_options)
     self.time = time.strftime('%Y-%m-%d', time.localtime())
Пример #3
0
 def __init__(self):
     #print(1111111)
     self.config_main = fun_all.fun_all()
     #浏览器
     chrome_options = Options()
     #headless模式运行
     chrome_options.add_argument('--headless')
     chrome_options.add_experimental_option('excludeSwitches',
                                            ['enable-automation'])
     #不加载图片
     chrome_options.add_argument('blink-settings=imagesEnabled=false')
     #调用当前chrome用户数据 cookie登陆方式
     #chrome_options.add_argument(r'user-data-dir=%s'%models.read_config()['chrome_user_data'])
     chrome_options.add_argument('--disable-gpu')
     #chrome_options.add_argument('--hide-scrollbars')
     #print(self.config_main.callback_chrome_path)
     chrome_options.binary_location = r'%s' % self.config_main.callback_chrome_path(
     )
     self.driver = webdriver.Chrome(
         executable_path=self.config_main.load_dict['chromedriver_path'],
         options=chrome_options)
     self.time = time.strftime('%Y-%m-%d', time.localtime())
Пример #4
0
 def __init__(self):
     self.dispatch_main = dispatch_main.dispatch_main()
     self.config_main = fun_all.fun_all()
Пример #5
0
 def __init__(self):
     #浏览器调度中心
     self.config_main = fun_all.fun_all()
     self.domain_list = []
     self.domain_result_list = []