diff --git a/src/you_get/extractors/twitter.py b/src/you_get/extractors/twitter.py index 094804c5..77233375 100644 --- a/src/you_get/extractors/twitter.py +++ b/src/you_get/extractors/twitter.py @@ -3,6 +3,7 @@ __all__ = ['twitter_download'] from ..common import * +from .vine import vine_download def twitter_download(url, output_dir='.', merge=True, info_only=False, **kwargs): html = get_html(url) @@ -13,7 +14,12 @@ def twitter_download(url, output_dir='.', merge=True, info_only=False, **kwargs) icards = r1(r'data-src="([^"]*)"', html) if icards: html = get_html("https://twitter.com" + icards) - data = json.loads(unescape_html(r1(r'data-player-config="([^"]*)"', html))) + data_player_config = r1(r'data-player-config="([^"]*)"', html) + if data_player_config is None: + vine_src = r1(r'