Skip to content

Commit

Permalink
Update XFileShareIE
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkf authored Feb 23, 2024
1 parent ac88051 commit d33b3ee
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions youtube_dl/extractor/xfileshare.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,12 @@ class XFileShareIE(InfoExtractor):

@classmethod
def _extract_urls(cls, webpage):
return [
mobj.group('url')

def yield_urls():
for regex in cls._EMBED_REGEX:
for mobj in re.finditer(regex, webpage):
yield mobj.group('url')

for mobj in re.finditer(cls._EMBED_REGEX, webpage)]

def _real_extract(self, url):
Expand Down Expand Up @@ -216,15 +220,11 @@ def _real_extract(self, url):
webpage = webpage.replace(obf_code, func(obf_code))
break

jwplayer_data = None
try:
jwplayer_data = self._find_jwplayer_data(
webpage.replace(r'\'', '\''), video_id)
result = self._parse_jwplayer_data(
jwplayer_data, video_id, require_title=False,
m3u8_id='hls', mpd_id='dash')
except ExtractorError:
result = None
jwplayer_data = self._find_jwplayer_data(
webpage.replace(r'\'', '\''), video_id)
result = self._parse_jwplayer_data(
jwplayer_data, video_id, require_title=False,
m3u8_id='hls', mpd_id='dash')

if not traverse_obj(result, 'formats'):
if jwplayer_data:
Expand Down

0 comments on commit d33b3ee

Please sign in to comment.