mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-22 20:20:09 +09:00
Use a helper method to replace a messy regex
This commit is contained in:
parent
6ce7baecaa
commit
14834bf977
@ -5,6 +5,8 @@ import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
|
||||
from ..utils import get_elements_by_class
|
||||
|
||||
|
||||
class TASVideosIE(InfoExtractor):
|
||||
_VALID_URL = r'http://tasvideos.org/(?P<id>\d+M)\.html'
|
||||
@ -57,8 +59,8 @@ class TASVideosPlaylistIE(InfoExtractor):
|
||||
webpage = self._download_webpage(url, playlist_id)
|
||||
playlist_title = self._search_regex(
|
||||
r'<title>(?P<title>[^<]*)</title>', webpage, 'title')
|
||||
video_entries = re.findall(
|
||||
r'((?s)<table class="item".*?archive.*?<\/table)>', webpage)
|
||||
video_entries = get_elements_by_class('item', webpage)
|
||||
|
||||
entries = []
|
||||
for entry in video_entries:
|
||||
video_urls = re.findall(
|
||||
|
Loading…
Reference in New Issue
Block a user