Skip to content

Commit

Permalink
Fixed the principle of removing unnecessary information from the syno…
Browse files Browse the repository at this point in the history
…psis
  • Loading branch information
CryZFix committed Dec 6, 2023
1 parent 35b5fb8 commit 301c6b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sources/ru/rulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ class RulateCrawler(Crawler):
"https://tl.rulate.ru/",
]

def initialize(self):
self.cleaner.bad_css.update([".thumbnail"])

def login(self, email: str, password: str):
login_url = "https://tl.rulate.ru/"
login_data = {
Expand Down Expand Up @@ -59,9 +62,6 @@ def read_novel_info(self):
logger.info("Novel author: %s", self.novel_author)

possible_synopsis = soup.select_one("#Info > div:nth-child(3)")
possible_thumbnail = possible_synopsis.select_one("div.thumbnail")
if possible_thumbnail:
possible_synopsis.select_one("div.thumbnail").decompose()
if possible_synopsis:
self.novel_synopsis = self.cleaner.extract_contents(possible_synopsis)
logger.info("Novel synopsis: %s", self.novel_synopsis)
Expand Down

0 comments on commit 301c6b9

Please sign in to comment.