mirror of
https://github.com/kemayo/leech
synced 2026-01-02 05:34:48 +01:00
Xenforo: threadmarks fallback
This commit is contained in:
parent
63e7a0de37
commit
6840d8a4c9
1 changed files with 6 additions and 2 deletions
|
|
@ -68,12 +68,16 @@ class XenForo(Site):
|
|||
def _chapter_list_threadmarks(self, url):
|
||||
soup = self._soup(url)
|
||||
|
||||
threadmarks_link = soup.find(class_="threadmarksTrigger")
|
||||
threadmarks_link = soup.find(class_="threadmarksTrigger", href=True)
|
||||
if not threadmarks_link:
|
||||
threadmarks_link = soup.select('.threadmarkMenus a.OverlayTrigger')[0]
|
||||
|
||||
if not threadmarks_link:
|
||||
raise SiteException("No threadmarks")
|
||||
|
||||
href = threadmarks_link.get('href')
|
||||
base = soup.head.base.get('href')
|
||||
soup = self._soup(base + threadmarks_link.get('href'))
|
||||
soup = self._soup(base + href)
|
||||
|
||||
marks = soup.select('.threadmarks li.primaryContent.threadmarkListItem a, .threadmarks li.primaryContent.threadmarkItem a')
|
||||
if not marks:
|
||||
|
|
|
|||
Loading…
Reference in a new issue