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

Add an option to set phantomjs location #15146

Closed
Rudloff opened this issue Jan 2, 2018 · 1 comment
Closed

Add an option to set phantomjs location #15146

Rudloff opened this issue Jan 2, 2018 · 1 comment
Labels

Comments

@Rudloff
Copy link
Contributor

@Rudloff Rudloff commented Jan 2, 2018

Hello,

The openload extractor uses phantomjs and looks for it in the PATH.
Would is be possible to add an option to set the location of the binary manually (similar to --ffmpeg-location)?

@Kate6
Copy link

@Kate6 Kate6 commented Aug 19, 2018

Under the latest Raspbian, phantomjs fails as follows. As near as I can figure out this is due to an issue with the version of Qt included with Raspbian and the recommended solution is to run phantomjs inside a xvfb-run wrapper. Running youtube-dl itself inside of xvfb-run does work correctly but means I'm using additional resources on my little Raspberry Pi even in situations where the scraper that ends up getting used doesn't make use of phantomjs...

I'm wondering if a "--phantomjs-location" option could allow something like "/usr/bin/xvfb-run -a /usr/bin/phantomjs" to be set.

Note: This is with phantomjs 2.1.1, though the failure is causing the version not to show up in your verbose output...

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'https://openload.co/f/YNX0FrmkbXQ/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.08.04
[debug] Python version 2.7.13 (CPython) - Linux-4.14.50-v7+-armv7l-with-debian-9.4
[debug] exe versions: ffmpeg 3.2.10-1, ffprobe 3.2.10-1, phantomjs .
[debug] Proxy map: {}
[Openload] YNX0FrmkbXQ: Downloading embed webpage
[Openload] YNX0FrmkbXQ: Executing JS on webpage
ERROR: Executing JS failed
:QXcbConnection: Could not connect to display
PhantomJS has crashed. Please read the bug reporting guide at
http://phantomjs.org/bug-reporting.html and file a bug report.
; 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 792, in extract_info
ie_result = ie.extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 502, in extract
ie_result = self._real_extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/openload.py", line 346, in _real_extract
webpage, _ = phantom.get(page_url, html=webpage, video_id=video_id, headers=headers)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/openload.py", line 236, in get
'Executing JS failed\n:' + encodeArgument(err))
ExtractorError: Executing JS failed
:QXcbConnection: Could not connect to display
PhantomJS has crashed. Please read the bug reporting guide at
http://phantomjs.org/bug-reporting.html and file a bug report.
; 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.

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.