📅  最后修改于: 2022-03-11 14:46:32.940000             🧑  作者: Mango
def testUserAgent(url, userAgent):
browser = mechanize.Browser()
browser.addheaders = userAgent
page = browser.open(url)
source_code = page.read()
print source_code