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

Unable extract direct url from Youku, Youtube of China. #3826

Closed
zhengxiexie opened this issue Sep 25, 2014 · 12 comments
Closed

Unable extract direct url from Youku, Youtube of China. #3826

zhengxiexie opened this issue Sep 25, 2014 · 12 comments

Comments

@zhengxiexie
Copy link

@zhengxiexie zhengxiexie commented Sep 25, 2014

Unable extract direct url from Youku, Youtube of China.
www.youku.com

@zhengxiexie
Copy link
Author

@zhengxiexie zhengxiexie commented Sep 25, 2014

In fact, I can get the url, but the url is not valid. Maybe Youku has changed it's protocal, I'm in a hurry to complete a project which relies on youtube-dl tightly, who can help me?

@juancri
Copy link
Contributor

@juancri juancri commented Sep 25, 2014

Can you please post the output of youtube-dl using the --verbose argument? Thank you!

@zhengxiexie
Copy link
Author

@zhengxiexie zhengxiexie commented Sep 25, 2014

$ youtube-dl --verbose http://v.youku.com/v_show/id_XMTM3MzUxNTY=.html?f=1095101
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://v.youku.com/v_show/id_XMTM3MzUxNTY=.html?f=1095101']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.09.24
[debug] Python version 2.7.3 - Linux-3.2.0-65-generic-x86_64-with-Ubuntu-12.04-precise
[debug] Proxy map: {}
[Youku] XMTM3MzUxNTY: Downloading webpage
[Youku] XMTM3MzUxNTY: Extracting information
[debug] Invoking downloader on u'http://f.youku.com/player/getFlvPath/sid/141163641978912499626_00/st/flv/fileid/03000207004B8CE4F4B4E6005C38D5E6E5769A-E4E7-F3CA-B012-D5AD81E23FF8?k=eb7c29286e1e4dc02411f32b'
ERROR: unable to download video data: <urlopen error [Errno 111] Connection refused>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1037, in process_info
success = dl(filename, info_dict)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1013, in dl
return fd.download(name, info)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/downloader/common.py", line 291, in download
return self.real_download(filename, info_dict)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/downloader/http.py", line 66, in real_download
data = self.ydl.urlopen(request)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1265, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 111] Connection refused>

@zhengxiexie
Copy link
Author

@zhengxiexie zhengxiexie commented Sep 25, 2014

Above is the log, I hear that we should use javascript to reslove the url, who can deal with it ?

@juancri
Copy link
Contributor

@juancri juancri commented Sep 25, 2014

I'll try to look into this but I get a different error (below). Do you know if the service behavior depends on the user's location?

$ youtube-dl --verbose "http://v.youku.com/v_show/id_XMTM3MzUxNTY=.html?f=1095101"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://v.youku.com/v_show/id_XMTM3MzUxNTY=.html?f=1095101']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.09.24.1
[debug] Python version 3.4.1 - Linux-3.16.3-1-ARCH-x86_64-with-arch
[debug] Proxy map: {}
[Youku] XMTM3MzUxNTY: Downloading webpage
[Youku] XMTM3MzUxNTY: Extracting information
[debug] Invoking downloader on 'http://f.youku.com/player/getFlvPath/sid/141163746936217186366_00/st/flv/fileid/03000207004B8CE4F4B4E6005C38D5E6E5769A-E4E7-F3CA-B012-D5AD81E23FF8?k=33a3794230a5fc64261dea9f'
ERROR: unable to download video data: <urlopen error [Errno 111] Connection refused>
Traceback (most recent call last):
File "/usr/lib/python3.4/urllib/request.py", line 1189, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.4/http/client.py", line 1090, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.4/http/client.py", line 1128, in _send_request
self.endheaders(body)
File "/usr/lib/python3.4/http/client.py", line 1086, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.4/http/client.py", line 924, in _send_output
self.send(msg)
File "/usr/lib/python3.4/http/client.py", line 859, in send
self.connect()
File "/usr/lib/python3.4/http/client.py", line 836, in connect
self.timeout, self.source_address)
File "/usr/lib/python3.4/socket.py", line 509, in create_connection
raise err
File "/usr/lib/python3.4/socket.py", line 500, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 1037, in process_info
success = dl(filename, info_dict)
File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 1013, in dl
return fd.download(name, info)
File "/usr/lib/python3.4/site-packages/youtube_dl/downloader/common.py", line 291, in download
return self.real_download(filename, info_dict)
File "/usr/lib/python3.4/site-packages/youtube_dl/downloader/http.py", line 66, in real_download
data = self.ydl.urlopen(request)
File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 1265, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python3.4/urllib/request.py", line 455, in open
response = self._open(req, data)
File "/usr/lib/python3.4/urllib/request.py", line 473, in _open
'_open', req)
File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
result = func(*args)
File "/usr/lib/python3.4/urllib/request.py", line 1215, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.4/urllib/request.py", line 1192, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>

@zhengxiexie
Copy link
Author

@zhengxiexie zhengxiexie commented Sep 25, 2014

Can you visit http://v.youku.com/v_show/id_XMTM3MzUxNTY=.html?f=1095101 ? If it succed, it shouldn't depend on location.

@phihag
Copy link
Contributor

@phihag phihag commented Sep 25, 2014

as @juancri said, the output of youtube-dl -v is usually required to debug an issue, as detailed in our bug reporting insturctions.Fortunately this issue is debuggable without - obviously, the ep= URL part is missing and it should be there. I won't have much time until the weekend though, but if anyone figures out how to generate this part, you're very welcome to say so.

@zhengxiexie
Copy link
Author

@zhengxiexie zhengxiexie commented Sep 25, 2014

Sorry, it's my first time to post issues on github, I will be careful next time.Yes, the ep= URL part is missing, I wonder what does it mean of ep ?

@zhengxiexie
Copy link
Author

@zhengxiexie zhengxiexie commented Sep 27, 2014

Who can help me, please?

@ghost
Copy link

@ghost ghost commented Oct 31, 2014

C:\Downloads>youtube-dl -v http://v.youku.com/v_show/id_XMTM3MzUxNTY=.html
[debug] System config: []
[debug] User config: ['-i', '--proxy', '127.0.0.1:8087', '-o', 'C:\\Downloads\\%
(uploader)s-%(title)s-%(id)s.%(ext)s', '--no-part', '--no-mtime', '--no-check-ce
rtificate']
[debug] Command-line args: ['-v', 'http://v.youku.com/v_show/id_XMTM3MzUxNTY=.ht
ml']
[debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936
[debug] youtube-dl version 2014.10.30
[debug] Python version 2.7.8 - Windows-XP-5.1.2600-SP3
[debug] exe versions: none
[debug] Proxy map: {u'http': '127.0.0.1:8087', u'https': '127.0.0.1:8087'}
[Youku] XMTM3MzUxNTY: Downloading JSON metadata
[debug] Invoking downloader on u'http://k.youku.com/player/getFlvPath/sid/141472
851667110011495_00/st/flv/fileid/03000207004B8CE4F4B4E6005C38D5E6E5769A-E4E7-F3C
A-B012-D5AD81E23FF8?k=aa01165ff638d9b3261dfb64'
ERROR: unable to download video data: HTTP Error 404: Not Found
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyo", line 1052, in process_info
  File "youtube_dl\YoutubeDL.pyo", line 1028, in dl
  File "youtube_dl\downloader\common.pyo", line 292, in download
  File "youtube_dl\downloader\http.pyo", line 64, in real_download
  File "youtube_dl\YoutubeDL.pyo", line 1286, in urlopen
  File "urllib2.pyo", line 410, in open
  File "urllib2.pyo", line 523, in http_response
  File "urllib2.pyo", line 448, in error
  File "urllib2.pyo", line 382, in _call_chain
  File "urllib2.pyo", line 531, in http_error_default
HTTPError: HTTP Error 404: Not Found

C:\Downloads>youtube-dl --ignore-config -v http://v.youku.com/v_show/id_XMTM3MzU
xNTY=.html
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--ignore-config', '-v', 'http://v.youku.com/v_show/
id_XMTM3MzUxNTY=.html']
[debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936
[debug] youtube-dl version 2014.10.30
[debug] Python version 2.7.8 - Windows-XP-5.1.2600-SP3
[debug] exe versions: none
[debug] Proxy map: {}
[Youku] XMTM3MzUxNTY: Downloading JSON metadata
[debug] Invoking downloader on u'http://k.youku.com/player/getFlvPath/sid/141472
858048417592683_00/st/flv/fileid/03000207004B8CE4F4B4E6005C38D5E6E5769A-E4E7-F3C
A-B012-D5AD81E23FF8?k=aa01165ff638d9b3261dfb64'
ERROR: unable to download video data: HTTP Error 404: Not Found
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyo", line 1052, in process_info
  File "youtube_dl\YoutubeDL.pyo", line 1028, in dl
  File "youtube_dl\downloader\common.pyo", line 292, in download
  File "youtube_dl\downloader\http.pyo", line 64, in real_download
  File "youtube_dl\YoutubeDL.pyo", line 1286, in urlopen
  File "urllib2.pyo", line 410, in open
  File "urllib2.pyo", line 523, in http_response
  File "urllib2.pyo", line 448, in error
  File "urllib2.pyo", line 382, in _call_chain
  File "urllib2.pyo", line 531, in http_error_default
HTTPError: HTTP Error 404: Not Found
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 15, 2015

Thanks to @PeterDing's work (#5833), this video will be supported in the next version.

@yan12125 yan12125 closed this Jun 15, 2015
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
4 participants
You can’t perform that action at this time.