有没有人用过requests代理访问外网尼,怎么我的访问不了啊
#encoding=utf8import requests
import sys
from bs4 import BeautifulSoup
reload(sys)
sys.setdefaultencoding('utf-8')
type = sys.getfilesystemencoding()
proxie = {
'http' : '149.56.206.48:8080'}
url = 'https://'
header = {
'User-Agent' : 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36',
}
s = requests.session()
response = s.get(url,headers = header,proxies = proxie,verify=False)
#print response.text
f = open('FC.txt','w')
f.write(response.content)
f.close()