wangkun 2 years ago
parent
commit
16ea132a80
1 changed files with 4 additions and 3 deletions
  1. 4 3
      xinshi/xinshi_app.py

+ 4 - 3
xinshi/xinshi_app.py

@@ -95,7 +95,7 @@ class XinshiAPP:
 
                         Common.logger(log_type).info('输入视频标题:{}', video_title)
                         time.sleep(3)
-                        driver.find_element(By.ID, 'com.tencent.mm:id/cd7').clear().send_keys(video_title[:20])
+                        driver.find_element(By.ID, 'com.tencent.mm:id/cd7').clear().send_keys(video_title[:40])
 
                         Common.logger(log_type).info('点击搜索')
                         driver.press_keycode(AndroidKey.SEARCH)
@@ -130,8 +130,9 @@ class XinshiAPP:
 
                             # 标题相似度>=50%, 用户名相似度>=80%
                             # if video_title[:30] in download_title and video_user in download_user:
-                            if difflib.SequenceMatcher(None, video_title, download_title).quick_ratio() >= 0.5 \
-                                    and difflib.SequenceMatcher(None, video_user, download_user).quick_ratio() >= 0.8:
+                            # if difflib.SequenceMatcher(None, video_title, download_title).quick_ratio() >= 0.5 \
+                            #         and difflib.SequenceMatcher(None, video_user, download_user).quick_ratio() >= 0.8:
+                            if difflib.SequenceMatcher(None, video_user, download_user).quick_ratio() >= 0.8:
                                 Common.logger(log_type).info('点击进入该视频详情')
                                 title_element.click()
                                 break