| 
														
															@@ -210,16 +210,17 @@ def check_internet_connection(url="http://www.baidu.com", timeout=5): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return False 
														 | 
														
														 | 
														
															         return False 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 def crawl_with_selenium(url, mark): 
														 | 
														
														 | 
														
															 def crawl_with_selenium(url, mark): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    if not check_internet_connection(): 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        log.error("无法连接到互联网,请检查网络设置") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        raise Exception("网络连接失败") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    # if not check_internet_connection(): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    #     log.error("无法连接到互联网,请检查网络设置") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    #     raise Exception("网络连接失败") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     driver = None 
														 | 
														
														 | 
														
															     driver = None 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     year_month = None 
														 | 
														
														 | 
														
															     year_month = None 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     try: 
														 | 
														
														 | 
														
															     try: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         # 使用WebDriverManager自动管理geckodriver 
														 | 
														
														 | 
														
															         # 使用WebDriverManager自动管理geckodriver 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        service = Service(GeckoDriverManager().install()) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        driver = webdriver.Firefox(service=service, options=configure_stealth_options()) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        # service = Service(GeckoDriverManager().install()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        # driver = webdriver.Firefox(service=service, options=configure_stealth_options()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        driver = webdriver.Firefox(options=configure_stealth_options()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         log.info("Firefox WebDriver初始化成功") 
														 | 
														
														 | 
														
															         log.info("Firefox WebDriver初始化成功") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         year_month = None 
														 | 
														
														 | 
														
															         year_month = None 
														 |