diff --git a/DB.py b/DB.py index 1375a93..247b170 100644 --- a/DB.py +++ b/DB.py @@ -270,9 +270,9 @@ class DBVidcon: return result['parameter'] if result else None @redis_retry(max_retries=3) - def item_report(self, count: int = 20): + def item_report(self, count: int = 1): try: - items = self.fetch_from_redis(count, list_key=self.l0_list_key) + items = self.fetch_from_redis(count, list_key=self.report_list) except Exception as e: logger.info("[Redis l0 pop error]", e) self.reconnect_redis() diff --git a/report.py b/report.py index 98516ac..f9b8aaf 100644 --- a/report.py +++ b/report.py @@ -24,9 +24,10 @@ while True: # 处理主流程 if now - last_main_run >= MAIN_INTERVAL: last_main_run = now - lis = db.get_report_video() + lis = db.item_report() if len(lis) > 0: - for li in lis: + for _,li in lis: + print(li) logger.logger.info(f"name:{li['name_title']},link:{li['link']} ") try: info, report_id, status, report_ts = d.process_ticket(li['name_title'], li['link']) diff --git a/report_video.py b/report_video.py index 4fc68cd..6026bfb 100644 --- a/report_video.py +++ b/report_video.py @@ -92,7 +92,7 @@ class DailymotionClient: EMAIL = "copyright@qiyi.com" PASSWORD = "ppsIQIYI2018@" - def __init__(self, headless: bool = None): + def __init__(self,email, password, headless: bool = None): self.email = self.EMAIL self.password = self.PASSWORD self.headless = headless