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

ValueError: unknown url type: None&output=47 #6913

Closed
n1c0la opened this issue Sep 21, 2015 · 3 comments
Closed

ValueError: unknown url type: None&output=47 #6913

n1c0la opened this issue Sep 21, 2015 · 3 comments

Comments

@n1c0la
Copy link

@n1c0la n1c0la commented Sep 21, 2015

$ youtube-dl --verbose http://www.presadiretta.rai.it/dl/portali/site/puntata/ContentItem-3ed19d13-26c2-46ff-a551-b10828262f1b.html
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'http://www.presadiretta.rai.it/dl/portali/site/puntata/ContentItem-3ed19d13-26c2-46ff-a551-b10828262f1b.html']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.09.09
[debug] Python version 2.7.10 - Darwin-12.6.0-x86_64-i386-64bit
[debug] exe versions: avconv 11.4, avprobe 11.4, ffmpeg 2.8, ffprobe 2.8, rtmpdump 2.4
[debug] Proxy map: {}
[Rai] 3ed19d13-26c2-46ff-a551-b10828262f1b: Downloading webpage
[Rai] 3ed19d13-26c2-46ff-a551-b10828262f1b: Downloading webpage
[Rai] 3ed19d13-26c2-46ff-a551-b10828262f1b: Downloading JSON metadata
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 19, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 410, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 400, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1658, in download
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 660, in extract_info
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 287, in extract
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/rai.py", line 101, in _real_extract
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 470, in _download_json
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 438, in _download_webpage
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 345, in _download_webpage_handle
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 326, in _request_webpage
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1865, in urlopen
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 423, in open
protocol = req.get_type()
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 285, in get_type
raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: None&output=47

@danog
Copy link

@danog danog commented Oct 30, 2015

The presa diretta site is using (yet) another iframe.
Nearly figured it out..

@danog
Copy link

@danog danog commented Oct 30, 2015

I figured out how to do this in my bash implementation (https://github.com/danog/video-dl), but unfortunately I don't know how to rewrite it in Python, I'll try to explain this so that someone can rewrite it if I don't figure it out first:

http://www.rai.it/dl/RaiTV/programmi/media/"$(echo "$file" | sed '/content="ContentItem/!d;s/.*content="//g;s/".*//g')".html

$(echo "$file" | sed '/drawMediaRaiTV/!d;s/.*http/http/g;s/'"'"'.*//g')"

http://www.rai.tv$(echo "$file" | grep -A1 '<div id="idFramePlayer">' | sed '/\<iframe/!d;s/.*src="//g;s/?.*//g')

The above code is what I use to get the source video from iframe pages in my bash script: the first and the second method are already implemented, the third isn't. The file variable is the webpage.
Basically, all we need is another iframe Regex match that returns a relative (to rai.tv) Url: note that the only iframe that leads to the video page is the one after the idFramePlayer div.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jul 3, 2016

Rai is fixed (f138873) and will be available in the next version. Thanks for the report and sorry for the late response.

@yan12125 yan12125 closed this Jul 3, 2016
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
3 participants
You can’t perform that action at this time.