mirror of
https://github.com/kemayo/leech
synced 2025-12-06 16:33:16 +01:00
Xenforo: canonicalize post URLs from threadmarks
This commit is contained in:
parent
aa4ba528b7
commit
a5fb14d61a
1 changed files with 4 additions and 0 deletions
|
|
@ -102,6 +102,10 @@ class XenForo(Site):
|
||||||
match = re.match(r'.+#post-(\d+)$', url)
|
match = re.match(r'.+#post-(\d+)$', url)
|
||||||
# could still be nothing here
|
# could still be nothing here
|
||||||
postid = match and match.group(1)
|
postid = match and match.group(1)
|
||||||
|
if postid:
|
||||||
|
# create a proper post-url, because threadmarks can sometimes
|
||||||
|
# mess up page-wise with anchors
|
||||||
|
url = 'https://%s/posts/%s/' % (self.domain, postid)
|
||||||
soup = self._soup(url, 'html5lib')
|
soup = self._soup(url, 'html5lib')
|
||||||
|
|
||||||
if postid:
|
if postid:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue