#!/usr/bin/env python
# _*_ coding:utf-8 _*_
#修改请求头p156
import requests
from bs4 import BeautifulSoup
session= requests.session()
headers={
"User-Agent":"Moziall/5.0 (Macintosh;Intel Mac OS X 10_9_5)AppleWebKit 537.36 (KHTML, like Geoko) Chrome",
"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
}
url="https://www.whatismybrowser.com/developers/what-http-headers-id-my-broswser-sending"
req=session.get(url,header=headers)
bsObj=BeautifulSoup(req.text)
print(bsObj.find("table",{"class":"table-striped"}).get_text)