1
0
Fork 0
mirror of https://github.com/kemayo/leech synced 2026-04-18 18:40:46 +02:00

Xenforo let non-first-category threadmarks work

Currently this just requires passing a link to the reader view of a particular
category. In the future I might want to support more variants on this -- a
flag to pull down all the threadmark categories, for instance.
This commit is contained in:
David Lynch 2019-08-06 17:29:53 -05:00
parent 532a7c6682
commit 5e034a7d65

View file

@ -46,6 +46,9 @@ class XenForo(Site):
@classmethod
def matches(cls, url):
match = re.match(r'^(https?://%s/threads/[^/]*\d+/(?:\d+/)?reader)/?.*' % cls.domain, url)
if match:
return match.group(1)
match = re.match(r'^(https?://%s/threads/[^/]*\d+)/?.*' % cls.domain, url)
if match:
return match.group(1) + '/'