mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
[twitter] add faker
This commit is contained in:
parent
b00860e4be
commit
17c740ae54
@ -34,7 +34,7 @@ def twitter_download(url, output_dir='.', merge=True, info_only=False, **kwargs)
|
|||||||
**kwargs)
|
**kwargs)
|
||||||
return
|
return
|
||||||
|
|
||||||
html = get_html(url, faker=False) # disable faker to prevent 302 infinite redirect
|
html = get_html(url, faker=True) # now it seems faker must be enabled
|
||||||
screen_name = r1(r'twitter\.com/([^/]+)', url) or r1(r'data-screen-name="([^"]*)"', html) or \
|
screen_name = r1(r'twitter\.com/([^/]+)', url) or r1(r'data-screen-name="([^"]*)"', html) or \
|
||||||
r1(r'<meta name="twitter:title" content="([^"]*)"', html)
|
r1(r'<meta name="twitter:title" content="([^"]*)"', html)
|
||||||
item_id = r1(r'twitter\.com/[^/]+/status/(\d+)', url) or r1(r'data-item-id="([^"]*)"', html) or \
|
item_id = r1(r'twitter\.com/[^/]+/status/(\d+)', url) or r1(r'data-item-id="([^"]*)"', html) or \
|
||||||
|
Loading…
Reference in New Issue
Block a user