python+requests——定制请求头——header

 url = 'https://api.github.com/some/endpoint'

 headers = {'user-agent': 'my-app/0.0.1'}



 r = requests.get(url, headers=headers)

 

 

 

posted @ 2020-02-22 16:49  小白龙白龙马  阅读(2752)  评论(0编辑  收藏  举报