From 45e2041eac54e32c859ff01d97f28b262e1a944c Mon Sep 17 00:00:00 2001 From: Ann-Holmes <41296458+Ann-Holmes@users.noreply.github.com> Date: Sat, 6 Apr 2019 21:16:07 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E7=BD=91=E7=BB=9C=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=9A=84=E4=BD=BF=E7=94=A8.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...50\241\345\235\227\347\232\204\344\275\277\347\224\250.md" | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git "a/\347\275\221\347\273\234\350\257\267\346\261\202\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250.md" "b/\347\275\221\347\273\234\350\257\267\346\261\202\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250.md" index 07fb409..476f16c 100644 --- "a/\347\275\221\347\273\234\350\257\267\346\261\202\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250.md" +++ "b/\347\275\221\347\273\234\350\257\267\346\261\202\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250.md" @@ -444,8 +444,8 @@ with open('github.txt', 'wb') as f: # 2.2 定义自定义请求头 headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36", - "Referer": "https://github.com/", - "Host": "github.com" + "Referer": "https://www.baidu.com/", + "Host": "www.baidu.com" } # 2.3 定义请求对象 request = urllib.request.Request(