Omer Anisfeld
Omer Anisfeld

Reputation: 1302

how to download from an html link (href) in python?

how to download movie from a link (that normally start with click ) this is the html code for the download File in the web page. i am looking to do so in python code as a client that download multiply times the movie but not saving it (just simulating traffic on the web page)

Upvotes: 0

Views: 2067

Answers (1)

Tamar
Tamar

Reputation: 679

In case you have the url:

import requests
url="http://....."
response = requests.get(url)

You can print the response or parse it:

  • response.headers is dict of the headers response.
  • content is the content of the response

Upvotes: 1

Related Questions