mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 17:02:30 +00:00
[teachertube:user] fix regex
This commit is contained in:
parent
825cdcec3c
commit
25a0cc44b9
@ -99,7 +99,7 @@ def _real_extract(self, url):
|
|||||||
urls = []
|
urls = []
|
||||||
webpage = self._download_webpage(url, user_id)
|
webpage = self._download_webpage(url, user_id)
|
||||||
urls.extend(re.findall(
|
urls.extend(re.findall(
|
||||||
r'"sidebar_thumb_time">[0-9:]+</div>\s+<a href="(https?://(?:www\.)?teachertube\.com/(video|audio)/[^"]+)">',
|
r'"sidebar_thumb_time">[0-9:]+</div>\s+<a href="(https?://(?:www\.)?teachertube\.com/(?:video|audio)/[^"]+)">',
|
||||||
webpage))
|
webpage))
|
||||||
|
|
||||||
pages = re.findall(r'/ajax-user/user-videos/%s\?page=([0-9]+)' % user_id, webpage)[1:-1]
|
pages = re.findall(r'/ajax-user/user-videos/%s\?page=([0-9]+)' % user_id, webpage)[1:-1]
|
||||||
@ -107,7 +107,7 @@ def _real_extract(self, url):
|
|||||||
more = 'http://www.teachertube.com/ajax-user/user-videos/%s?page=%s' % (user_id, p)
|
more = 'http://www.teachertube.com/ajax-user/user-videos/%s?page=%s' % (user_id, p)
|
||||||
webpage = self._download_webpage(more, user_id, 'Downloading page %s/%s' % (p, len(pages) + 1))
|
webpage = self._download_webpage(more, user_id, 'Downloading page %s/%s' % (p, len(pages) + 1))
|
||||||
urls.extend(re.findall(
|
urls.extend(re.findall(
|
||||||
r'"sidebar_thumb_time">[0-9:]+</div>\s+<a href="(https?://(?:www\.)?teachertube\.com/(video|audio)/[^"]+)">',
|
r'"sidebar_thumb_time">[0-9:]+</div>\s+<a href="(https?://(?:www\.)?teachertube\.com/(?:video|audio)/[^"]+)">',
|
||||||
webpage))
|
webpage))
|
||||||
|
|
||||||
entries = []
|
entries = []
|
||||||
|
Loading…
Reference in New Issue
Block a user