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

Proxy parameter is not working correctly inside of openload.py (PhantomJS) #15047

Open
4 of 8 tasks
xTended2600 opened this issue Dec 21, 2017 · 3 comments
Open
4 of 8 tasks

Comments

@xTended2600
Copy link

xTended2600 commented Dec 21, 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 this: [x])
  • Use the Preview tab to see what your issue will actually look like

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

Before submitting an issue make sure you have:

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

Currently openload.py is using PhantomJS in order the obtain the final URL, but it is not passing correctly the parameter --proxy URL to PhantomJS.
Output is: https://openload.co/stream/None?mime=true
In the Proxy Server I could see only one https call to openload servers, missing the rest of them which are being originated in openload.py lines 228-231:

    p = subprocess.Popen([
        self.exe, '--ssl-protocol=any',
        self._TMP_FILES['script'].name
    ], stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Here we can see that the only parameter used for PhantomJS is "--ssl-protocol=any".
I have tested it in the latest version (2017.12.14) and the issue is still there.

@yan12125
Copy link
Collaborator

Notices for those who are interesting:

@xTended2600
Copy link
Author

I agree with you that some additional parameters should be forwarded to PhantomJS.

Although, it is not necessary a different proxy for HTTP and HTTPS requests. A HTTP proxy server can retrieve SSL content.
Basically, difference between a HTTP and HTTPS proxy sever lies in the communication (Plain HTTP or SSL) between the client and the proxy server.

Regarding to original issue, I made some changes locally in openload.py and utils.py, and now it is working fine, but this code is not enough clean to merge it into master.

Regards.

@yan12125
Copy link
Collaborator

it is not necessary a different proxy for HTTP and HTTPS requests

Totally correct. I have never see an actual use case with different proxies; this is a design issue - what youtube-dl should pass to phantomjs if there were really different proxies? Report an error or pick one of them?

In the long term, I'm wondering if it's possible to replace PhantomJS with maintained projects like headless Chrome. For former is declared dead by former maintainers (ariya/phantomjs#15105), and the latter supports proxies much better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants