From 51538db80f44b4dca47ce21bd663478551511975 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 3 Dec 2022 13:17:29 -0500 Subject: [PATCH] fix minor douban tv parser error switch pg package to binary for faster deployment sync minor local changes --- .gitignore | 2 ++ common/scrapers/douban.py | 2 +- requirements.txt | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 817a3ee5..381b9029 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.DS_Store + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/common/scrapers/douban.py b/common/scrapers/douban.py index 6dcaff69..1cfd7310 100644 --- a/common/scrapers/douban.py +++ b/common/scrapers/douban.py @@ -497,7 +497,7 @@ class DoubanMovieScraper(DoubanScrapperMixin, AbstractScraper): episodes_elem = content.xpath( "//div[@id='info']//span[text()='集数:']/following-sibling::text()[1]") - episodes = int(episodes_elem[0].strip()) if episodes_elem and episodes_elem[0].isdigit() else None + episodes = int(episodes_elem[0].strip()) if episodes_elem and episodes_elem[0].strip().isdigit() else None single_episode_length_elem = content.xpath( "//div[@id='info']//span[text()='单集片长:']/following-sibling::text()[1]") diff --git a/requirements.txt b/requirements.txt index a05b1887..253669c3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,11 +9,13 @@ django-simple-history django-hijack django-user-messages django-slack +#django-ninja +#django-polymorphic meilisearch easy-thumbnails lxml openpyxl -psycopg2 +psycopg2-binary requests filetype setproctitle