On 7/5/21 2:23 PM, Felix Schwarz wrote:
- Can you post a small code snippet which reproduces the problem?
- I can use requests on F34 without any warnings. Any chance you manually
installed other libraries/versions in Fedora's site-packages?
(/usr/lib64/python3.9)
Felix
Dear Felix,
Sure, it's definitely nothing top secret! ;-)
import os, requests
from urllib.parse import urlparse
# init
username = 'cannotsay'
password = 'willnotshare'
url = 'https://secret.url.com/file.txt'
# Actual downloading
fileons = os.path.basename(urlparse(url).path)
r = requests.get(url, auth=(username,password))
if r.status_code == 200:
with open(fileons, 'wb') as out:
for bits in r.iter_content():
out.write(bits)
I install all my libraries using pip.
Thank you.
Fred