mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-09 05:21:13 +02:00
Make code compatible with older versions of BeautifulSoup and make locating last updated string more robust
This commit is contained in:
parent
e41bb51453
commit
54f2e43363
1 changed files with 3 additions and 1 deletions
|
|
@ -162,7 +162,9 @@ class WWWWebNovelComAdapter(BaseSiteAdapter):
|
|||
synopsis = soup.find('div', {'class': 'det-abt'}).find('p')
|
||||
self.setDescription(url, synopsis)
|
||||
|
||||
last_updated_string = soup.select_one('.ml10').string
|
||||
# First finding .lst-chapter (which is an unique class on the site), and then navigating to the last update date
|
||||
# should be the most robust way of finding the last updated string
|
||||
last_updated_string = soup.find(attrs={'class': 'lst-chapter'}).find_next_sibling('small').string
|
||||
last_updated = _parse_relative_date_string(last_updated_string)
|
||||
|
||||
# Published date is always unknown, so simply don't set it
|
||||
|
|
|
|||
Loading…
Reference in a new issue