requests代理问题

import requests

PROXIES = {
    'http':'http://{usr}:{pwd}@proxy:port'.format(usr = 'XXX',pwd = 'XXX#XXX'),
}

url = 'http://www.baidu.com'
r = requests.get(url, proxies = PROXIES)
print r.text

代理的password 里面含有# 就会连不上代理,这个有高人指点怎么破么?

2 comments