-1

I keep getting the error message about syntax error. The file is easily downloadable if I use the url in the browser, but I cannot manage to get the data for learning through jupyter by writing the code. Would be good if somebody could help me to solve this issue. Thank you.

import urllib.request
url = "https://www.cs.cmu.edu/~./enron/enron_mail_20150507.tar.gz"`
urllib.request.urlretrieve(url,
   filename="C:\Users\SnajderovaM\Documents\Training\Udacitynanodegree\Machinelearning\emails\enron_mail_20150507.tar.gz")
MariaS
  • 25
  • 6

1 Answers1

0

urlretrieve is a function defined in the library itself and not under requests

import urllib
urllib.urlretrieve(url, filename)
Vishnudev Krishnadas
  • 10,679
  • 2
  • 23
  • 55
  • https://stackoverflow.com/questions/15035123/what-command-to-use-instead-of-urllib-request-urlretrieve – Pygirl Dec 04 '20 at 14:04