Questions tagged [urlretrieve]

54 questions
0
votes
1 answer

Retrieve PHP Records from a server?

I have a subscription at https://www.vafinancials.com/v5/vcas/, a closed-source service. From a web control panel, you can bring up Pilot Reports (PIREPs) like…
0
votes
2 answers

urllib - Retrieved file failed to be opened

I want to retrieve a pdf file from a given link. The command line output shows that the file has been saved at the specified location import os myPath = 'C:\\Documents' filename = 'test1.pdf' url =…
Afiq Johari
  • 1,372
  • 1
  • 15
  • 28
0
votes
0 answers

Python request.urlretrieve() returns status 500

I'm using Django with Python 3.5 and I'm trying to download a file from a URL, and giving the filename and path where the file should be downloaded. I am using urlretrieve for this operation, but every time am getting 500 error. But when tested in…
BlizZard
  • 587
  • 5
  • 22
0
votes
1 answer

Downloading xls/csv files using urlretrieve from Python stops

I´m trying to download a bunch of xls files from this ASPX site and its folders using urlretrieve from urllib.request module in Python3.7. First, I build a txt file with the urls from the site. Then, I loop over the list and ask the server to…
0
votes
1 answer

flask urlretrieve transaction isolation

I'm using flask to process requests which contain an URL pointing to a document. When a request arrives, the document the URL points to is saved to a file. The file is opened, processed and a json string depending on the data in the document is…
Osvald Laurits
  • 1,228
  • 2
  • 17
  • 32
0
votes
0 answers

Python/Travis-Ci exception "from request urllib.request.urlretrieve ImportError: No module named"

I'm trying to run python script throw Travis-CI I import: from urllib.request import urlretrieve urlretrieve(download_url, save_local) when I run this script in my local machine I have no problem, but when I call the script file throw travis.yml…
AvZi
  • 81
  • 1
  • 8
0
votes
2 answers

How to populate listview with data from different json

I'm working on an app in which I need to retrieve data from two different json and I have to populate a listview in android. In the first Json I have an array of object and I have the id object and an url that need to retrieve data for that…
PaoloPaul
  • 11
  • 4
0
votes
1 answer

Python 3 downloading pdfs with urlretrive () and nested loops

I'm trying to download .pdfs using links from a xlsx file with urlretrieve(), one column has the links and the other has the names that the downloaded file should have. The issue is that my code seems to just overwrite the same file over and over…
0
votes
1 answer

Is it possible to stop (cancel) urlretrieve process?

urlretrieve(URL, file_path, self.reporthook) I use tkinter for Python 3 and want to abort downloading a file and close the application when user press close button.
Joss
  • 106
  • 1
  • 2
  • 8
0
votes
0 answers

Urlretrieve down loaded unreadable text

I would like to download a txt file from a page using Urlretrieve. However it sometioms worked well, but most of the time simply downloaded unreadable text. Following is my code and the site: import urllib import os,sys opener =…
ZHANG Juenjie
  • 501
  • 5
  • 20
0
votes
2 answers

Error writing to folder in python os.makedirs()

I am trying to download a .zip file from ftp site, (works independent of the error), I am creating a folder in a directory with the current date in the name. I want the downloaded zip file to be placed in the newly created folder. my code is…
NULL.Dude
  • 219
  • 1
  • 13
0
votes
0 answers

python urllib.request.URLOpener returns 301 response

I was trying to download materials off the web site which didn't allow bots. I could manage to pass a header to Request this way: url = 'https://www.superdatascience.com/machine-learning/' req = urllib.request.Request(url, headers =…
Vlad
  • 181
  • 2
  • 10
0
votes
1 answer

Python 3 error: float division by zero in reporthook

I'm trying to make a simple code that downloads 4365 files (.mp4, .wmv, .jpeg & .pdf) from a .json file, the download part its done, but I wanted to get a reporthook telling me the %, Mb, speed an duration. Even though sometimes it runs, I'm…
pedrovn
  • 13
  • 2
0
votes
1 answer

Python2.7 how to loop urllib to download images

I have a list of urls of some images and I want to download them import urllib links = ['http://www.takamine.com/templates/default/images/gclassical.png', …
0
votes
1 answer

how python urlretrieve reporthook function handle the input argument

I am reading some codes which work nicely. In the codes, it use urlretrieve to download file from web. While it's downloading it can also report how much has been downloaded. The urlretrieve calling is like below: urlretrieve(url + filename,…
XXWang
  • 33
  • 2
  • 9