Python: Read URL
Revision as of 08:29, 29 April 2019 by Onnowpurbo (talk | contribs)
pip install requests pip install BeautifulSoup
Script
import requests from BeautifulSoup import BeautifulSoup link = "http://www.somesite.com/details.pl?urn=2344" f = requests.get(link) print(f.text)
soup = BeautifulSoup(f) all_text = .join(soup.findAll(text=True)) print(all_text)