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

Veehd - downloads don't work for long videos #3144

Open
JetStarBlues opened this issue Jun 24, 2014 · 2 comments
Open

Veehd - downloads don't work for long videos #3144

JetStarBlues opened this issue Jun 24, 2014 · 2 comments
Labels

Comments

@JetStarBlues
Copy link

@JetStarBlues JetStarBlues commented Jun 24, 2014

Hi

Veehd downloads do not work for long videos.

Throws error of 'Unable to extract config json'

It seems that a "link expired" page is served instead of the desired player page with the .

The proper page is only served after sending a POST request which I believe creates a cookie.

I do not have the technical ability to implement this but below is a detailed analysis.


Two sample videos:
short -> http://veehd.com/video/4686958
long -> http://veehd.com/video/1901703

When visit the respective player pages:
short -> view-source:link to short vid player
long -> view-source:link to long vid player
You can see that the long video serves a page with the text "link expired"
whereas the short video serves a page with the desired player .
See 'player_path' in veehd.py

Looking through the inline javascript of the original video page,
it becomes apparent that a POST request is sent.
Specifically through the function 'prepare_server'.
The function executes the following line:

$[_0x3c5a[4]](_0x3c5a[2],{p:1,ts:ts,sgn:sgn,v:_0x3c5a[3]});

Which translates to:

$["post"]("/xhrp", {p:1,ts:ts,sgn:sgn,v:"c"} );

The global variables 'ts' and 'sgn' vary with each video and can be found in the inline javascript.

Once the post request is manually sent, the player page for the long video now returns the desired player rather than the "link expired" text.

Below is a sample of the response

Request URL:    http://veehd.com/xhrp
Request Method:     POST
Status Code:    HTTP/1.1 200 OK
Request Headers **:**:**.000
X-Requested-With:   XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:29.0) Gecko/20100101 Firefox/29.0
Referer:    http://veehd.com/video/1901703
Pragma: no-cache
Host:   veehd.com
DNT:    1
Content-Type:   application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 58
Connection: keep-alive
Cache-Control:  no-cache
Accept-Language:    en-US,en;q=0.5
Accept-Encoding:    gzip, deflate
Accept: */*

Sent Cookie
PHPSESSID:  fbqn1en1okhn3b00wuiok5329
Request Body
p=1&ts=1403562967&sgn=bff481f6488fc50b9ba2ff1cd3c319b1&v=c

Response Headers Δ539ms
Vary:   Accept-Encoding
Server: nginx
Pragma: no-cache
Expires:    Thu, 19 Nov 1981 08:52:00 GMT
Date:   Wed, 18 Jun 2014 06:34:21 GMT
Content-Type:   text/html
Content-Length: 21
Content-Encoding:   gzip
Connection: keep-alive
Cache-Control:  no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Accept-Ranges:  bytes
Received Cookie
plugin: 1
Response Body Δ0ms
1

@alexreg
Copy link

@alexreg alexreg commented Nov 15, 2015

Unfortunately it does not seem to work any more: it just downloads the advertisement!

@yan12125 yan12125 added the broken-IE label Nov 15, 2015
@TRox1972
Copy link
Contributor

@TRox1972 TRox1972 commented Jul 7, 2016

None of the provided URL seems to work anymore (videos are removed or unavailable). The second test video in the extractor is removed, but this isn't specified in the test. For the third test video:

$ youtube-dl -v http://veehd.com/video/2046729_2012-2009-DivX-Trailer
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://veehd.com/video/2046729_2012-2009-DivX-Trailer']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.07.07
[debug] Python version 2.7.11 - Darwin-15.3.0-x86_64-i386-64bit
[debug] exe versions: avconv 11.4, avprobe 11.4, ffmpeg 3.0.2, ffprobe 3.0.2, rtmpdump 2.4
[debug] Proxy map: {}
[VeeHD] 2046729: Requesting webpage
[VeeHD] 2046729: Downloading webpage
[VeeHD] 2046729: Requesting player page
[VeeHD] 2046729: Downloading player page
ERROR: Unable to extract iframe url; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 681, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 343, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/veehd.py", line 89, in _real_extract
    r'<iframe[^>]+src="/?([^"]+)"', player_page, 'iframe url')
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 646, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract iframe url; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

However, there are still many videos that work, like this one, so the extractor isn't completely broken.

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.