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

[drtuber] Change in video config location #12058

Closed
einstein95 opened this issue Feb 10, 2017 · 4 comments
Closed

[drtuber] Change in video config location #12058

einstein95 opened this issue Feb 10, 2017 · 4 comments

Comments

@einstein95
Copy link
Contributor

@einstein95 einstein95 commented Feb 10, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.02.10. 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.02.10

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably 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

$ youtube-dl http://www.drtuber.com/video/3327619/stepbros-decided-to-double-team-amber --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['http://www.drtuber.com/video/3327619/stepbros-decided-to-double-team-amber', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.02.10
[debug] Python version 3.6.0 - Linux-4.8.13-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg N-83248-gb4a13d442a, ffprobe N-83248-gb4a13d442a, rtmpdump 2.4
[debug] Proxy map: {}
[DrTuber] stepbros-decided-to-double-team-amber: Downloading webpage
ERROR: Unable to extract video URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 696, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 369, in extract
    return self._real_extract(url)
  File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/drtuber.py", line 48, in _real_extract
    r'<source src="([^"]+)"', webpage, 'video URL')
  File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 681, in _html_search_regex
    res = self._search_regex(pattern, string, name, default, fatal, flags, group)
  File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 672, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract video URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description of your issue, suggested solution and other information

DrTuber has changed the location of the URL of the video file, this is now located in an XML file called by the Javascript on the page. An example from the page mentioned in the verbose output above:

    var configPath = 'http://www.drtuber.com/play' + 'er_';
    var configScript = 'con' + 'fig/';
    var params = '';
    params += 'h=dbf201bd5b31cee8481208bf67703e39';

                
    params += '%26check_speed=1';

     params += '%26t=1486712882';    
    params += '%26vkey=' + 'a04beba0880607bc5f14';
    s1.addVariable('config', configPath + configScript + '?' + params);

This gives the config URL http://www.drtuber.com/player_config/?h=dbf201bd5b31cee8481208bf67703e39&check_speed=1&t=1486712882&vkey=a04beba0880607bc5f14&pkey=d83cb8b52a8e964061e14dc49f0ea8bf&aid=&domain_id=
As you can see, a couple more parameters are added.

@parmjitv
Copy link
Contributor

@parmjitv parmjitv commented Jun 8, 2017

Hello einstein95,

I have taken a look at this issue. A couple of questions:

  1. In the query string of your sample URL, you reference the [pkey, aid, domain_id] variables - where do these values come from? I do not see these vars referenced anywhere in the source markup for the video pages as of June.07/17.

  2. Have you been able to extract any actual XML/JSON data from the new 'player_config' URL target?

For example:

http://www.drtuber.com/player_config/?h=5c2eb95c869faa6bd07d11add4c8ca5f&check_speed=1&t=1496879484&vkey=c72db3ddf36e9dbb3171

Hitting this URL from either a standard browser or the command line results in the error message 'Invalid video key!' from the DrTuber site. This appears to be the case no matter what value is used for 'vkey', which I assume is the aforementioned video key. The video itself does play on the site without any problems.

Cheers,

Parmjit V.

@einstein95
Copy link
Contributor Author

@einstein95 einstein95 commented Jun 8, 2017

Yes, this has since changed and is no longer relevant. An easier way of getting the video URL is using the config URL http://www.drtuber.com/player_config_json/?vid={video_id}&embed=0&aid=0&domain_id=0 and getting the files section, which gives you two URLs: lq and hq. These correspond with video_file and hq_video_file, respectively.

@parmjitv
Copy link
Contributor

@parmjitv parmjitv commented Jun 8, 2017

OK! Much appreciated.

Parmjit

@parmjitv
Copy link
Contributor

@parmjitv parmjitv commented Jun 8, 2017

I have tossed up a PR with a fix for this issue - hopefully it will pass review and be included with the next build. Cheers!

Parmjit

@dstftw dstftw closed this Jun 22, 2017
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.