wangkun 2 anni fa
parent
commit
0a1f635868
2 ha cambiato i file con 14 aggiunte e 1 eliminazioni
  1. 11 1
      main/demo.py
  2. 3 0
      main/jxxf_recommend.py

+ 11 - 1
main/demo.py

@@ -10,6 +10,16 @@ class Demo:
         sheet = Feishu.get_values_batch(log_type, crawler, sheet)
         print(sheet)
 
+    @classmethod
+    def video_url(cls):
+        video_url = 'http://mpvideo.qpic.cn/0bc3iaabaaaafmabgd46ljrvaqgdcbaaaeaa.f10002.mp4?dis_k=17aabf3b2995531f464d35b76c8c25b5&dis_t=1671466144&play_scene=0'
+        if video_url in [x for y in Feishu.get_values_batch('demo', 'jxxf', 'd9e9b1') for x in y]:
+            print('yes')
+        else:
+            print('no')
+
 
 if __name__ == '__main__':
-    Demo.get_sheet('recommend', 'jxxf', '9Ws66h')
+    # Demo.get_sheet('recommend', 'jxxf', '9Ws66h')
+    Demo.video_url()
+    pass

+ 3 - 0
main/jxxf_recommend.py

@@ -238,6 +238,9 @@ class Recommend:
                     if video_url == '' or video_url is None:
                         Common.logger(log_type).info('无法播放的视频\n')
                         driver.press_keycode(4)
+                    elif video_url in [x for y in Feishu.get_values_batch(log_type, 'jxxf', 'd9e9b1') for x in y]:
+                        Common.logger(log_type).info('播放地址已在下载表中\n')
+                        driver.press_keycode(4)
                     else:
                         Common.logger(log_type).info('play_cnt:{}', play_cnt)
                         Common.logger(log_type).info('video_url:{}', video_url)