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

[ruv] Add new extractor #13396

Closed
wants to merge 1 commit into from
Closed

[ruv] Add new extractor #13396

wants to merge 1 commit into from

Conversation

orng
Copy link
Contributor

@orng orng commented Jun 15, 2017

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

Added new extractor for Icelandic national TV station Rúv's website ruv.is. In particular, ruv.is/sarpurinn which is where most shows are made available online.


title = self._og_search_title(webpage)
self.report_extraction(video_id)
video_url = self._html_search_regex(r'video.src\s+=\s+["\'](.+?)["\']', webpage, u'video URL')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dots should be escaped. Regex should be relaxed. No u''.

webpage = self._download_webpage(url, video_id)

title = self._og_search_title(webpage)
self.report_extraction(video_id)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove.

@orng
Copy link
Contributor Author

orng commented Jun 16, 2017

Thanks for the comments. I believe I have addressed them all in the two commit above. I have no idea why some of the tests are failing though, but as far as I can tell it's due to some issue unrelated to my changes, is that correct?



class RuvIE(InfoExtractor):
_VALID_URL = r'http?://(?:www\.)?ruv\.is/sarpurinn/ruv/\w+/(?P<id>[0-9]+)'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http? incorrect.

@dstftw
Copy link
Collaborator

dstftw commented Jun 18, 2017

Squash commits.

@orng
Copy link
Contributor Author

orng commented Jun 18, 2017

I addedthe missing s in "http?" (should be "https?") in url regex and rebased into one commit.
Hopefully this does it. Thanks for pointing out my mistakes.

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

Successfully merging this pull request may close these issues.

2 participants