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

[rtvs] Add new extractor #15187

Closed
wants to merge 4 commits into from
Closed

[rtvs] Add new extractor #15187

wants to merge 4 commits into from

Conversation

r0b0
Copy link

@r0b0 r0b0 commented Jan 6, 2018

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

Please merge extractor for Radio and Television Slovakia archive at http://www.rtvs.sk/televizia/archiv

from .common import InfoExtractor


class RtvsExtractorIE(InfoExtractor):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove Extractor.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

webpage = self._download_webpage(url, video_id)

playlist_url = self._search_regex(r'"playlist": "(https?:.*)&', webpage, 'playlist_url')
self.to_screen("%s: Playlist URL: %s" % (video_id, playlist_url))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)

playlist_url = self._search_regex(r'"playlist": "(https?:.*)&', webpage, 'playlist_url')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should capture behind quotes. Non greedy.

Copy link
Author

@r0b0 r0b0 Jan 16, 2018

Choose a reason for hiding this comment

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

Can you elaborate or post the changed regex, please?

For example the line is:
"playlist": "http://www.rtvs.sk/json/archive5.json?id=63118&ad=1&" + ruurl + playlistLow,
I need to capture up until the last ampersand (excluding)


playlist_url = self._search_regex(r'"playlist": "(https?:.*)&', webpage, 'playlist_url')
self.to_screen("%s: Playlist URL: %s" % (video_id, playlist_url))
playlist = self._download_json(playlist_url, video_id, "Downloading playlist")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Single quotes.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

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.

None yet

2 participants