mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-01-28 19:58:38 +01:00
[extractors/fosdem] flake8 cleanup
This commit is contained in:
parent
9a3f1a2a4d
commit
7187056b69
1 changed files with 21 additions and 25 deletions
|
@ -1,6 +1,6 @@
|
|||
from .common import InfoExtractor
|
||||
import re
|
||||
import pdb
|
||||
|
||||
|
||||
class FosdemIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:www\.)?(?:archive\.)?fosdem\.org/(?P<year>[0-9]{4})/schedule/(?P<url_type>track|event)/(?P<id>[\w\.-_]+)/'
|
||||
|
@ -76,10 +76,8 @@ class FosdemIE(InfoExtractor):
|
|||
webpage,
|
||||
'video url')
|
||||
cast_rgx = r'<td><a href=\"/[0-9]+/schedule/speaker/[a-z_]+/\">(?P<speaker>\w+ \w+)</a></td>'
|
||||
try:
|
||||
cast = re.findall(cast_rgx, webpage, flags=re.UNICODE)
|
||||
except:
|
||||
cast = []
|
||||
cast = re.findall(cast_rgx, webpage, flags=re.UNICODE) or []
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
'title': title,
|
||||
|
@ -93,10 +91,8 @@ class FosdemIE(InfoExtractor):
|
|||
}
|
||||
elif groups.get('url_type') == 'track':
|
||||
events_rgx = r'<td><a href=\"(?P<event>/[0-9]+/schedule/event/[a-z0-9]+/)'
|
||||
try:
|
||||
events_slugs = re.findall(events_rgx, webpage)
|
||||
except:
|
||||
events_slugs = []
|
||||
events_slugs = re.findall(events_rgx, webpage) or []
|
||||
|
||||
if len(events_slugs) > 0:
|
||||
events_urls = ['https://fosdem.org' + slug for slug in events_slugs]
|
||||
entries = []
|
||||
|
|
Loading…
Add table
Reference in a new issue