Skip to content

Commit 7c4c22b

Browse files
Ryan MitchellRyan Mitchell
authored andcommitted
Updated URL
1 parent df13646 commit 7c4c22b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chapter12/1-headers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
session = requests.Session()
55
headers = {"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit 537.36 (KHTML, like Gecko) Chrome","Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"}
6-
url = "https://www.whatismybrowser.com/developers/what-http-headers-is-my-browser-sending"
6+
url = "https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending"
77
req = session.get(url, headers=headers)
88

9-
bsObj = BeautifulSoup(req.text)
9+
bsObj = BeautifulSoup(req.text, "lxml")
1010
print(bsObj.find("table",{"class":"table-striped"}).get_text)

0 commit comments

Comments
 (0)