Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[collegehumor] Fails downloading test video #2092

Closed
OpenHMR opened this issue Jan 4, 2014 · 1 comment
Closed

[collegehumor] Fails downloading test video #2092

OpenHMR opened this issue Jan 4, 2014 · 1 comment
Labels
bug

Comments

@OpenHMR
Copy link

@OpenHMR OpenHMR commented Jan 4, 2014

I get this:

[CollegeHumor] 6902724: Downloading XML manifest
ERROR: unable to download video data: HTTP Error 404: Not Found

With the following changes in _real_extract() it seems to work:

def _real_extract(self, url):
    mobj = re.match(self._VALID_URL, url)
    if mobj is None:
        raise ExtractorError(u'Invalid URL: %s' % url)
    video_id = mobj.group('videoid')

    info = {
        'id': video_id,
        'uploader': None,
        'upload_date': None,
    }

    self.report_extraction(video_id)
    jsonUrl = 'http://www.collegehumor.com/moogaloop/video/' + video_id + '.json'
    mdoc = json.loads(self._download_webpage(jsonUrl, video_id,
                                                 u'Downloading info JSON'))

    try:
        info['description'] = mdoc['video']['description']
        info['title'] = mdoc['video']['title']
        info['thumbnail'] = mdoc['video']['thumbnail']
        info['url'] = mdoc['video']['mp4']['high_quality']
        info['ext'] = 'mp4'
    except IndexError:
        raise ExtractorError(u'Invalid metadata JSON file')

    return info
@phihag phihag closed this in b4a9bf7 Jan 5, 2014
@phihag
Copy link
Contributor

@phihag phihag commented Jan 5, 2014

Thanks for the report. This has been fixed in youtube-dl 2013.01.05.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.