Forums

Request library not working

Hi, I am a paid member and trying to access data fro nseindia.com. However I am getting error: urllib.error.HTTPError: HTTP Error 403: Forbidden Also, from nsetools library gives the same forbidden error. It is working fine with databricks, not sure why its an issue here.

if you are using a console, try restarting the console

Yes. You'll need to start new consoles after the upgrade so that they have the new configuration.

I am a free account user, cannot fetch any url's (requests.get()) at all. Do I need to upgrade to paid account for using requests functionality

Free accounts can only connect out of PythonAnywhere using http(s) and to a whitelist of sites.

I am a free user and I want to download media from Twilio API. Please add it to the whitelist. The sample public URL is given below:

https://api.twilio.com/2010-04-01/Accounts/AC0b01ca071a15f1a23b1216691c10c768/Messages/MM0906fddae7e7237f34f270d841225c2c/Media/ME4d1c1dd3bb57db5b6ae816ca64fc4b69

api.twilio.com is already on the whitelist.

I am sorry to say, but it's not downloading media from Twilio API.

I can download media on my local machine, but whenever I tried to download from pythonanywhere, it's not working.

What kind of errors do you get?

I am getting these errors:

Error # 1

Error # 2

OK, so it looks like it's trying to load from media.twiliocdn.com. We may be able to whitelist that as well as api.twilio.com, but you'll need to send us a link saying that that site is part of the official Twilio API.

I think it is obvious that the site from which it is fetching data is a part of the official Twilio API because we are giving the URL of api.twilio.com. So kindly add media.twiliocdn.com to your whitelist because I want to test some practice projects. However, I will try to send you a link saying that that site is part of the official Twilio API.

Here's a link https://twilio.github.io/twilio-client.js/index.html#cdn in which it is mentioned that twilio-client.js are also hosted on a CDN which shows that twiliocdn.com is part of the official Twilio API. So, it means media.twiliocdn.com is a part of the official Twilio API.

Here's another link https://media.twiliocdn.com/sdk/js/chat/releases/3.0.2/docs/index.html

hmm that is not an api endpoint. that is just saying that twilio hosts/owns that domain name

Is it working on the Hacker account or I have to confirm on that upgraded account also?

if you upgrade to any paid account (eg: hacker) then there would not be any outbound network restrictions. (ie. we would not block you from our end) But eg: if you are doing anything that say violates the terms of service on the twilio end, twilio could still choose to block you etc.

cdn-api.co-vin.in is on the whitelist but I am getting 403 error on using requests library

Yes.That is because you are getting that from the site itself. There is nothing that we can do about that.

Hi, Can you please add https://invidious.fdn.fr to the whitelist of sites. Thank you.

@voom If you would like the above domain to be considered for the whitelist , please send us a link to the API documentation. Please note we can only whitelist sites with an official public API.

Hi, Can you please add https://live.euroleague.net to the whitelist of sites. Thank you!

@Juliusfsix If you would like the above domain to be considered for the whitelist , please send us a link to the API documentation. Please note we can only whitelist sites with an official public API.

I want to make requests to the Amazon API. Could you please include the Amazon URLs on the whitelist? amazon.es, amazon.it, etc.

@edumix If you would like us to consider a domain for the allow list , please send us a link to the API documentation and to the official website. Please note we can only whitelist sites with an official public API.

Hi, Can you add https://dashboard.sinch.com/ to the whitelist?

You'll find all the instructions for requesting allowlist additions here.

i have created a python script which is downloading videos from pinterst website and the script is working fine on my local host but not working on pythonanywhere after I setup everything and give the video link to the script it give this error: ProxyError at / HTTPSConnectionPool(host='v1.pinimg.com', port=443): Max retries exceeded with url: /videos/mc/720p/77/8b/74/778b74a36f8d7d75465acb5aff65862f.mp4 (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 403 Forbidden')))

You'll find all the instructions for requesting allowlist additions here.

sorry, free account here

trying to connect to ask binance api the price

url = 'https://api.binance.com/api/v3/ticker/price' params = {'symbol': 'XMRUSDT'} response = requests.get(url, params=params, verify=True)

get DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.binance.com:443 DEBUG:urllib3.connectionpool:https://api.binance.com:443 "GET /api/v3/ticker/price?symbol=XMRUSDT HTTP/1.1" 451 224

installed requests 2.31.0

no venv dont undestand where is the problem, binance is on white list

Binance is probably blocking the request because they are not allowed to operate in the US, where our servers are.

Good day, my request

proxies = {
   'http': "http://proxy.server:3128",
   'https': "http://proxy.server:3128",
}
requests.get('https://login.school.mosreg.ru/?ReturnUrl=https%3a%2f%2fschools.school.mosreg.ru%2fschool.aspx', proxies=proxies).status_code

was crashed with error

requests.exceptions.ProxyError: HTTPSConnectionPool(host='login.school.mosreg.ru', port=443): Max retries exceeded with url: /?ReturnUrl=https%3A%2F%2Fschools.school.m
osreg.ru%2Fschool.aspx (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 503 Service Unavailable')))

Domain login.school.mosreg.ru is allowlisted for free PythonAnywhere accounts. And when I tried to to open page with this url https://login.school.mosreg.ru/?ReturnUrl=https%3a%2f%2fschools.school.mosreg.ru%2fschool.aspx using Selenium got This site can’t be reached message. What could be the problem? Thanks

Is the site definitely accessible?

Hello could be Proxycurl added to the whitelist?

You'll find all the instructions for requesting allowlist additions here.

hello can you please add "https://random.css-tip.com" to the whitelist?

You'll find all the instructions for requesting allowlist additions here.

I am making a yandex alice skill for the blind to fetch the university timetable. The endpoint is narfu.modeus.org, however not working with httpx also. This app is for blind, and it maybe have an official api, but it's accessible via browser. Doing this for blind students because of no service alternatives, i would like this endpoint to be whitelisted. Thank you so much.

I am a paid member and trying to access data https://www.avtoraqam.uzex.uz/ However I am getting error: raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

@voicechat Take look and follow https://help.pythonanywhere.com/pages/RequestingAllowlistAdditions/

@ElyorDev That could be other side misbehaving.