Note that there are some explanatory texts on larger screens.

plurals
  1. POPython: requests.exceptions.ConnectionError. Max retries exceeded with url
    primarykey
    data
    text
    <pre><code>This is the script: import requests import json import urlparse from requests.adapters import HTTPAdapter s = requests.Session() s.mount('http://', HTTPAdapter(max_retries=1)) with open('proxies.txt') as proxies: for line in proxies: proxy=json.loads(line) with open('urls.txt') as urls: for line in urls: url=line.rstrip() data=requests.get(url, proxies=proxy) data1=data.content print data1 print {'http': line} </code></pre> <p>as you can see, its trying to access a list of urls through a list of proxies. Here is the urls.txt file: </p> <pre><code>http://api.exip.org/?call=ip </code></pre> <p>here is the proxies.txt file: </p> <pre><code>{"http":"http://107.17.92.18:8080"} </code></pre> <p>I got this proxy at www.hidemyass.com. Could it be a bad proxy? I have tried several and this is the result. Note: if you are trying to replicate this, you may have to update the proxy to a recent one at hidemyass.com. They seem to stop working eventually. here is the full error and traceback: </p> <pre><code>Traceback (most recent call last): File "test.py", line 17, in &lt;module&gt; data=requests.get(url, proxies=proxy) File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 55, in get return request('get', url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 44, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 335, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 454, in send history = [resp for resp in gen] if allow_redirects else [] File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 144, in resolve_redirects allow_redirects=False, File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 438, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 327, in send raise ConnectionError(e) requests.exceptions.ConnectionError: HTTPConnectionPool(host=u'219.231.143.96', port=18186): Max retries exceeded with url: http://www.google.com/ (Caused by &lt;class 'httplib.BadStatusLine'&gt;: '') </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload