Reputation: 414
I want to write a code, which is copying source code of website after each reload. Can anyone say a library by which i can realize my desires?
Upvotes: 1
Views: 64
Reputation: 1262
You can do that simply with requests:
First pip install requests
.
Then:
import requests
r = requests.get('http://your_url)
print(r.text)
If you want to manipulate html you should use beautiful soup, or selenium.
Upvotes: 2
Reputation: 1538
You may try this library: urllib2
import urllib2
p= urllib2.urlopen('http://write_your_address')
content = p.read()
I hope this help you ;)
Upvotes: 1