-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Cannot connect if behind a HTTP proxy #205
Comments
We have seen this problem before and we never managed to get it to work :(
If this works, we should add a proxy option to coursera-dl. |
I tried it, same result. sorry :( |
You shouldn't need to add the proxy option to the script, it handles the Are you able to get out of the corporate network using any other If you try to run 'wget http:https://google.com' do you run into the same issue? Depending on your distro, your env variables may be different. Using all export http_proxy=http:https://PROXY_URL:PORT this is the output I get: ~$ coursera-dl --debug -n ~/.netrc crypto-007 On Wed, Nov 20, 2013 at 5:14 AM, esalagea [email protected] wrote:
|
@esalagea did you try EmptyOne's suggestion? |
I'm sorry. Maybe there is something something tricky in my configuration. |
For info, if using Windows you would need to use set. |
Hi. I am closing this issue. If the problem persists, please open a new one with further information and some context, so that we have a better basis to explore the problem. |
In order to download courses behind a proxy server, referenced in the issues coursera-dl#205, coursera-dl#594 and coursera-dl#613, it's necesary get the proxy enviroment variables before do session.send() in file network.py. Due to some diferents behaviors in request module these variables was no used to make the request. Therefore, in order to get enviroment settings was added the line: settings = session.merge_environment_settings(request.url, {}, False, False, None) Then the request was made with these settings using: reply = session.send(prepared_request, **settings)
The script works just fine if not behind a HTTP proxy. thanks a lot for this downloader, is the best I found for coursera.
If I run it behind my company's http proxy, I get:
./coursera-dl --debug -u userName -p pasword class-id
Here is the output
root[main] Downloading class: class-id
requests.packages.urllib3.connectionpool[_new_conn] Starting new HTTP connection (1): proxy.mycompany.com
requests.packages.urllib3.connectionpool[_make_request] "GET https://class.coursera.org/course-id HTTP/1.1" 200 None
root[main] Could not authenticate: Did not recieve csrf_token cookie.
The text was updated successfully, but these errors were encountered: