When I use requests.get on python3 on my personal wifi it works fine. However, the things I am trying to automate take place at work. This is my code
import requests
res = requests.get('https://automatetheboringstuff.com/files/rj.txt')
When at work, the below error occurs
Traceback (most recent call last):
File "C:\Users\\[redacted]\AppData\Roaming\Python\Python37\site-packages\urllib3\connection.py", line 159, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "C:\Users\\[redacted]\AppData\Roaming\Python\Python37\site-packages\urllib3\util\connection.py", line 80, in create_connection
raise err
File "C:\Users\\[redacted]\AppData\Roaming\Python\Python37\site-packages\urllib3\util\connection.py", line 70, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
It looks like the firewall is keeping me from downloading any file at all. Is there any way around this?
Edit: I am able to download this file manually from the browser.