Forums

Proxy Error When Using Requests

Hello, im trying to access https://pp.userapi.com/ its new api from vk.com. Can you please add https://pp.userapi.com/ to the whitelist?

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/krolR/mysite/apivk.py", line 53, in paint_picture
    response = requests.get(pic_url, proxies=proxies)
  File "/usr/local/lib/python3.5/dist-packages/requests/api.py", line 71, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/api.py", line 57, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 465, in send
    raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='pp.userapi.com', port=443): Max retries exc
eeded with url: /c836333/v836333001/3118f/3OWOVNTv67U.jpg (Caused by ProxyError('Cannot connect to pr
oxy.', OSError('Tunnel connection failed: 403 Forbidden',)))

I get a 403 from that URL. Where is the documentation?

its a fileserver https://pp.userapi.com/c630716/v630716022/34b9b/PWggameG7_c.jpg

Uh. That's a picture of a guy with a spade. There must be documentation that describes how to access and use the API. If there isn't then it's not a candidate for inclusion in the whitelist.

Link to api docs

Field photo_50 contains the url to fileserver. Try user_ids = 1

I can't find a reference to pp.userapi.com in the docs you linked to. It's really obvious that api.vk.com is their api endpoint, but there's just no mention of pp.userapi.com.

Try run sample query. In response find filed photo_50. I don't know how explain with my low level knowledge of english, sorry.

We're not going to sign up to a random site so that we can write the code to examine it's responses so that we can determine if something is a candidate for the whitelist. If it doesn't have a documented, public API, then it can't go on the whitelist.