Skip to content

Commit

Permalink
带账号的代理
Browse files Browse the repository at this point in the history
  • Loading branch information
luyishisi authored Jul 13, 2018
1 parent 77df7db commit 58c5a97
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def get_request(url,headers):
"http": "http://"+ip+':'+duankou,
"https": "http://"+ip+':'+duankou,
}
#如果代理需要账户和密码,则需这样:
#proxies = {
# "http": "http://user:[email protected]:3128/",
#}
#url = "https://www.urlteam.org"

html=requests.get(url,headers=headers,timeout=20,proxies=proxies).text#.decode('utf-8')
Expand Down

0 comments on commit 58c5a97

Please sign in to comment.