From 070846b608e455b597a24b7e36e5940abd004cd0 Mon Sep 17 00:00:00 2001 From: bopol Date: Sat, 14 Mar 2020 23:01:47 +0100 Subject: [PATCH] [twitter] add support for public nitter instances list of instances: https://github.com/zedeus/nitter/wiki/Instances info about nitter: https://github.com/zedeus/nitter basically, it's a privacy-friendly twitter web client, the url is the same except the beginning part --- youtube_dl/extractor/twitter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/twitter.py b/youtube_dl/extractor/twitter.py index 01468981c..9dd81439a 100644 --- a/youtube_dl/extractor/twitter.py +++ b/youtube_dl/extractor/twitter.py @@ -30,7 +30,8 @@ from .periscope import ( class TwitterBaseIE(InfoExtractor): _API_BASE = 'https://api.twitter.com/1.1/' - _BASE_REGEX = r'https?://(?:(?:www|m(?:obile)?)\.)?twitter\.com/' + _BASE_REGEX = r'https?://((?:(?:www|m(?:obile)?)\.)?twitter\.com|' \ + 'nitter\.(net|42l\.fr|snopyta\.org|nixnet\.services|pussthecat\.org|mastodont\.cat|13ad\.de)|tw\.openalgeria\.org)/' _GUEST_TOKEN = None def _extract_variant_formats(self, variant, video_id):