Answers for "python download html as string"

0

python download html as string

# open-webpage.py

import urllib.request, urllib.error, urllib.parse

url = 'http://www.oldbaileyonline.org/browse.jsp?id=t17800628-33&div=t17800628-33'

response = urllib.request.urlopen(url)
webContent = response.read()

print(webContent[0:300])
Posted by: Guest on December-03-2020

Browse Popular Code Answers by Language