mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +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)
|
||||
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 \
|
||||
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 \
|
||||
|
Loading…
Reference in New Issue
Block a user