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 = 'http://www.ha.org.hk/visitor/ha_view_content.asp?content_id=253124&lang=ENG'
fullfilename = os.path.join(myPath, filename)
urlretrieve(url, fullfilename)
>>> ('C:\\Documents\\test1.pdf', <http.client.HTTPMessage object at 0x016E0BB0>)
However when I go to the file directory, the test1.pdf looks corrupted.
The downloaded file is only 1 KB in size however the actual file should be around 4MB.