[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
This commit is contained in:
bopol 2020-03-14 23:01:47 +01:00
parent 049c0486bb
commit 070846b608

View File

@ -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):