On 02/05/17 01:12, Ian Monat wrote: > 1) Use Python to download the file from the web (but not by using a > webscraper, according to Alan)
Things like BeautifulSoup will help you read the HTML and extract links etc but they won't help you actually fetch the file/documents from the web site. A package like requests is the correct tool for that. > 2) Simply ignore the .exe wrapper and use, maybe Windows Task Manager, to > unzip the file and place the .txt file in the desired folder I don't think Task Manager will do it but third party tools exist that can and they cope with self executing zip files too. And you can execute those programs from Python rather than directly executing the unsafe download and, if its not a legitimate zip file they will usually just issue a warning. Once you have a regular zip file the standard Python zip module can extract the text file. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor