|  | @@ -15,18 +15,18 @@ class Main:
 | 
											
												
													
														|  |      @classmethod
 |  |      @classmethod
 | 
											
												
													
														|  |      def main(cls, env):
 |  |      def main(cls, env):
 | 
											
												
													
														|  |          while True:
 |  |          while True:
 | 
											
												
													
														|  | -            # if 16 >= datetime.datetime.now().hour >= 10:
 |  | 
 | 
											
												
													
														|  | -            Common.logger('xinshi').info('开始抓取"新视-PC"内容\n')
 |  | 
 | 
											
												
													
														|  | -            XinshiPC.login('xinshi', env)
 |  | 
 | 
											
												
													
														|  | 
 |  | +            if 16 >= datetime.datetime.now().hour >= 10:
 | 
											
												
													
														|  | 
 |  | +                Common.logger('xinshi').info('开始抓取"新视-PC"内容\n')
 | 
											
												
													
														|  | 
 |  | +                XinshiPC.login('xinshi', env)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -            Recommend.run_recommend('recommend', env)
 |  | 
 | 
											
												
													
														|  | -            Common.del_logs('recommend')
 |  | 
 | 
											
												
													
														|  | -            Common.logger('recommend').info('休眠{}小时\n', 24 - datetime.datetime.now().hour)
 |  | 
 | 
											
												
													
														|  | -            Recommend.download_cnt = []
 |  | 
 | 
											
												
													
														|  | -            time.sleep(3600 * (24 - datetime.datetime.now().hour))
 |  | 
 | 
											
												
													
														|  | 
 |  | +                Recommend.run_recommend('recommend', env)
 | 
											
												
													
														|  | 
 |  | +                Common.del_logs('recommend')
 | 
											
												
													
														|  | 
 |  | +                Common.logger('recommend').info('休眠{}小时\n', 24 - datetime.datetime.now().hour)
 | 
											
												
													
														|  | 
 |  | +                Recommend.download_cnt = []
 | 
											
												
													
														|  | 
 |  | +                time.sleep(3600 * (24 - datetime.datetime.now().hour))
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -            # else:
 |  | 
 | 
											
												
													
														|  | -            #     pass
 |  | 
 | 
											
												
													
														|  | 
 |  | +            else:
 | 
											
												
													
														|  | 
 |  | +                pass
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  if __name__ == '__main__':
 |  |  if __name__ == '__main__':
 |