-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwriteWeb.py
21 lines (13 loc) · 879 Bytes
/
writeWeb.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# import urllib.request, urllib.error, urllib.parse
# url = "https://www.urbanoutfitters.com/shop/converse-chuck-taylor-all-star-canvas-platform-high-top-sneaker?category=SEARCHRESULTS&color=015&searchparams=q%3Dsneaker&type=REGULAR&quantity=1"
# # url = 'http://www.oldbaileyonline.org/browse.jsp?id=t17800628-33&div=t17800628-33'
# response = urllib.request.urlopen(url)
# webContent = response.read()
# f = open('web_results/product.html', 'wb')
# f.write(webContent)
# f.close
from pywebcopy import save_webpage
url = 'https://www.urbanoutfitters.com/shop/converse-chuck-taylor-all-star-canvas-platform-high-top-sneaker?category=SEARCHRESULTS&color=015&searchparams=q%3Dsneaker&type=REGULAR&quantity=1'
download_folder = 'web_results/product.html'
kwargs = {'bypass_robots': True, 'project_name': 'recognisable-name'}
save_webpage(url, download_folder, **kwargs)