Improve generic extractor handling of /account/post format.
This commit is contained in:
parent
240370e347
commit
2401bfa815
|
@ -103,6 +103,13 @@ def extract_from_page (page, verbosity, url, args):
|
|||
offset = 7
|
||||
elif path.startswith("/users/"):
|
||||
offset = 8
|
||||
# set 2 as upper bound for how far out we'll go...
|
||||
# for example, expect paths like
|
||||
# /account/username/postid
|
||||
# but don't try too hard with paths like
|
||||
# /year/month/day/postid
|
||||
elif path.count('/') > 3:
|
||||
offset = path.find('/',1) + 1
|
||||
else:
|
||||
offset = 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue