Skip to content

Commit df13646

Browse files
Ryan MitchellRyan Mitchell
authored andcommitted
Removed line breaks inserted for print
1 parent f483535 commit df13646

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

chapter12/1-headers.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22
from bs4 import BeautifulSoup
33

44
session = requests.Session()
5-
headers = {"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5)
6-
AppleWebKit 537.36 (KHTML, like Gecko) Chrome",
7-
"Accept":"text/html,application/xhtml+xml,application/xml;
8-
q=0.9,image/webp,*/*;q=0.8"}
9-
url = "https://www.whatismybrowser.com/
10-
developers/what-http-headers-is-my-browser-sending"
5+
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"
117
req = session.get(url, headers=headers)
128

139
bsObj = BeautifulSoup(req.text)

0 commit comments

Comments
 (0)