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

No url_encoded_fmt_stream_map in iPhone response #1500

Closed
cujo30227 opened this issue Sep 25, 2013 · 6 comments
Closed

No url_encoded_fmt_stream_map in iPhone response #1500

cujo30227 opened this issue Sep 25, 2013 · 6 comments

Comments

@cujo30227
Copy link

@cujo30227 cujo30227 commented Sep 25, 2013

When calling to http://www.youtube.com/watch?v, I get a html response including the url_encoded_fmt_stream_map on the iPad. Calling it on the iPhone gives me a similar response, but simply doesn't include the url_encoded_fmt_stream_map ...

Parsing the url_encoded_fmt_stream_map and decoding it subsequently works fine on the iPad, but I have nothing to work with on the iPhone..

@phihag
Copy link
Contributor

@phihag phihag commented Sep 25, 2013

youtube-dl should work the same no matter the platform. Can you post the entire output of it, including -v?

@cujo30227
Copy link
Author

@cujo30227 cujo30227 commented Sep 26, 2013

I think it is related to #1459. Yooutube serves a different page if it's a mobile device, the most important difference is that it doesn't include the ytplayer.config. I tried to change the user agent header, with no success. Did anyone got youtube-dl working on a mobile device?

@phihag
Copy link
Contributor

@phihag phihag commented Sep 26, 2013

youtube-dl does not change its behavior when it's running on a mobile device, and there's no way for YouTube to detect that you're running it on a mobile device. It's working perfectly fine on my android device (with SL4A) . Again, pleast post the output of youtube-dl when called with -v.

@phihag
Copy link
Contributor

@phihag phihag commented Sep 26, 2013

Oh, and it is most definitely not related to #1459, since that issue was 1. on Windows and 2. the reporter explicitly passed in a --user-agent option, which you should not do.

@cujo30227
Copy link
Author

@cujo30227 cujo30227 commented Sep 26, 2013

Allright, so after some more testing I figured out it had to do with the connection type. On WiFi, it works fine. On 3G, I get download errors. Since I have programmed parts of youtube-dl iOS, I could not get the comment code out. So I created a 3G connection with my laptop through a hotspot with a German cell phone (while sitting in the Netherlands). Here's the output I received (again, it worked without problems on WiFi). From the output, it seems obvious what is going on.. But can't we emulate a different location?

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-f', '18', 'http://www.youtube.com/watch?v=DUT5rEU6pqM', '-v']
[debug] youtube-dl version 2013.09.24.2
[debug] Python version 2.7.2 - Darwin-12.5.0-x86_64-i386-64bit
[debug] Proxy map: {}
[youtube] Setting language
[youtube] DUT5rEU6pqM: Downloading video webpage
[youtube] DUT5rEU6pqM: Downloading video info webpage
ERROR: YouTube said: Unfortunately, this video is not available in Germany because it may contain music for which GEMA has not granted the respective music rights.
Traceback (most recent call last):
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 334, in extract_info
ie_result = ie.extract(url)
File "./youtube-dl/youtube_dl/extractor/common.py", line 103, in extract
return self._real_extract(url)
File "./youtube-dl/youtube_dl/extractor/youtube.py", line 1325, in _real_extract
raise ExtractorError(u'YouTube said: %s' % video_info['reason'][0], expected=True)
ExtractorError: YouTube said: Unfortunately, this video is not available in Germany because it may contain music for which GEMA has not granted the respective music rights.

@phihag
Copy link
Contributor

@phihag phihag commented Sep 26, 2013

This is working fine. You can always use a proxy server (either as a VPN or by specifying the --proxy option) to move the location into another country.

@phihag phihag closed this Sep 26, 2013
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.