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

[cbc.ca] Videos embedded in iframes on cbc.ca aren't recognized #14669

Open
brbsix opened this issue Nov 4, 2017 · 0 comments
Open

[cbc.ca] Videos embedded in iframes on cbc.ca aren't recognized #14669

brbsix opened this issue Nov 4, 2017 · 0 comments

Comments

@brbsix
Copy link

@brbsix brbsix commented Nov 4, 2017

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.10.29. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.10.29

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ PYENV_VERSION=3.6.3 python ./youtube-dl --ignore-config --no-cache-dir --prefer-ffmpeg -v 'http://www.cbc.ca/dragonsden/episodes/season-12/episode-6-season-12'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--ignore-config', '--no-cache-dir', '--prefer-ffmpeg', '-v', 'http://www.cbc.ca/dragonsden/episodes/season-12/episode-6-season-12']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.10.29
[debug] Python version 3.6.3 - Linux-3.19.0-84-generic-x86_64-with-debian-jessie-sid
[debug] exe versions: avconv 11.2-6, avprobe 11.2-6, ffmpeg N-87616-g792b1629a8-static, ffprobe N-87616-g792b1629a8-static, phantomjs 1.9.8
[debug] Proxy map: {}
[cbc.ca] episode-6-season-12: Downloading webpage
[download] Downloading playlist: Episode 6, Season 12 - Episodes - Dragons' Den
[cbc.ca] playlist Episode 6, Season 12 - Episodes - Dragons' Den: Collected 0 video ids (downloading 0 of them)
[download] Finished downloading playlist: Episode 6, Season 12 - Episodes - Dragons' Den

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

Television episodes embedded in iframes on http://www.cbc.ca are not being detected.

It hasn't been well-tested, but the following fix works for me:

diff --git a/youtube_dl/extractor/cbc.py b/youtube_dl/extractor/cbc.py
index 9faf40227..3601e26e4 100644
--- a/youtube_dl/extractor/cbc.py
+++ b/youtube_dl/extractor/cbc.py
@@ -130,6 +130,9 @@ class CBCIE(InfoExtractor):
         entries.extend([
             self.url_result('cbcplayer:%s' % media_id, 'CBCPlayer', media_id)
             for media_id in re.findall(r'<iframe[^>]+src="[^"]+?mediaId=(\d+)"', webpage)])
+        entries.extend([
+            self.url_result(embed_url, 'CBCWatch') for embed_url in
+            re.findall(r'<iframe[^>]+?src=["\'](http://watch\.cbc\.ca/embed/.+?)["\']', webpage)])
         return self.playlist_result(
             entries, display_id,
             self._og_search_title(webpage, fatal=False),
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
1 participant
You can’t perform that action at this time.