1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-23 00:54:31 +01:00

[Minds] Use negative lookahead in channel IE to ignore invalid names

This commit is contained in:
Andrew Udvare 2018-11-24 04:05:38 -05:00
parent b0c19812d5
commit 7719ef4681
No known key found for this signature in database
GPG Key ID: 1AFD9AFC120C26DD

View File

@ -133,13 +133,11 @@ class MindsActivityIE(InfoExtractor):
class MindsChannelIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?minds\.com/(?P<id>[^/]+)'
_VALID_URL = r'https?://(?:www\.)?minds\.com/(?!newsfeed|media|api)(?P<id>[^/]+)'
def _real_extract(self, url):
channel_name = self._match_id(url)
api_url = 'https://www.minds.com/api/v1/channel/%s' % channel_name
if channel_name == 'media':
return self.url_result(url, ie='Minds')
token = self._get_cookies(url).get('XSRF-TOKEN')
headers = {
'authority': 'www.minds.com',