Answer the question
In order to leave comments, you need to log in
What free hosting to use for uploading files? And how to do it?
I have a code, it should download a file from the hosting, and unpack it into a specific directory. Where can I get a direct link tried getfile, but not everyone works. I don't know much about this, I hope you can help, thanks.
If anyone can, explain in more detail in VK: @xx69x69xx
import tempfile, os, zipfile
import requests
response = requests.get('https://dropfiles.ru/files/2828181a9b881cebd0fef825618a085a.zip')
file = tempfile.TemporaryFile()
file.write(response.content)
fzip = zipfile.ZipFile(file)
fzip.extractall('C:\\Users\\{0}\\Documents\\Rockstar Games\\GTA V\\User Music'.format(getuser()))
file.close()
fzip.close()
Answer the question
In order to leave comments, you need to log in
he must download the file from the hosting
Where can I get a direct link
In general, you can just open the page with a request and parse the link using the download button, then the site will generate a link, and it is not permanent, but if you parse it yourself, you will get a working one every time. Look at the parsing through beautifulsoup4.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question