From 5aa279a70b8314aff94fda058682c4337c56e208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=99=9A=E5=B9=B3?= <8437069+zhang-xuping@user.noreply.gitee.com> Date: Tue, 23 Feb 2021 22:40:09 +0800 Subject: [PATCH 1/4] init commit --- .../detailed information.html" | 0 .../search_keyword.html" | 0 .../test.py" | 53 +++++++++++++++++++ ...\344\270\272\346\211\213\346\234\272.html" | 0 ...\346\230\276\347\244\272\345\261\217.html" | 0 ...\346\270\270\346\210\217\346\234\272.html" | 0 ...\347\254\224\350\256\260\346\234\254.html" | 0 ...\346\236\234\346\211\213\346\234\272.html" | 0 ...\351\201\277\345\255\225\345\245\227.html" | 0 .../\351\274\240\346\240\207.html" | 0 10 files changed, 53 insertions(+) create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/detailed information.html" create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/search_keyword.html" create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/test.py" create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\345\215\216\344\270\272\346\211\213\346\234\272.html" create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\276\347\244\272\345\261\217.html" create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\270\270\346\210\217\346\234\272.html" create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\224\350\256\260\346\234\254.html" create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\350\213\271\346\236\234\346\211\213\346\234\272.html" create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\201\277\345\255\225\345\245\227.html" create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\274\240\346\240\207.html" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/detailed information.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/detailed information.html" new file mode 100644 index 00000000..e69de29b diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/search_keyword.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/search_keyword.html" new file mode 100644 index 00000000..e69de29b diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/test.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/test.py" new file mode 100644 index 00000000..15cb5f59 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/test.py" @@ -0,0 +1,53 @@ +第一问:搜索页面请求 +import requests +from urllib.parse import quote, unquote + +def request_jd(keyword): + f = open(keyword + ".html", "w", encoding="utf-8") + url = "https://search.jd.com/Search" + params = { + "keyword": keyword + } + headers = { + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36" + } + response = requests. get(url=url, params=params, headers=headers) + + print(response.text) + +if __name__ == "__main__": + request_jd("鼠标") + request_jd("显示屏") + request_jd("游戏机") + request_jd("笔记本") + request_jd("华为手机") + request_jd("苹果手机") + request_jd("避孕套") + + +第二问:详细页面请求 +from urllib.request import Request,urlopen +from urllib.parse import quote +import string +f = open("detailed information.html", "w", encoding="utf-8") +url = 'https://item.jd.com/1337248.html' +response = urlopen(quote(url,safe=string.printable)) +print(response) + + + + + + + +第三问:json练习 +import json +test_dict = { + "a": 1, + "b": ["1", 2, None], + "c": {"d":1} +} + +json_data = json.dumps(test_dict) +print(type(json_data), json_data) +print(json.loads(json_data)) diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\345\215\216\344\270\272\346\211\213\346\234\272.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\345\215\216\344\270\272\346\211\213\346\234\272.html" new file mode 100644 index 00000000..e69de29b diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\276\347\244\272\345\261\217.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\276\347\244\272\345\261\217.html" new file mode 100644 index 00000000..e69de29b diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\270\270\346\210\217\346\234\272.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\270\270\346\210\217\346\234\272.html" new file mode 100644 index 00000000..e69de29b diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\224\350\256\260\346\234\254.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\224\350\256\260\346\234\254.html" new file mode 100644 index 00000000..e69de29b diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\350\213\271\346\236\234\346\211\213\346\234\272.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\350\213\271\346\236\234\346\211\213\346\234\272.html" new file mode 100644 index 00000000..e69de29b diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\201\277\345\255\225\345\245\227.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\201\277\345\255\225\345\245\227.html" new file mode 100644 index 00000000..e69de29b diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\274\240\346\240\207.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\274\240\346\240\207.html" new file mode 100644 index 00000000..e69de29b -- Gitee From 325e93e78275c317a7aab0c9cd11669a9456ad36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=99=9A=E5=B9=B3?= <8437069+zhang-xuping@user.noreply.gitee.com> Date: Tue, 23 Feb 2021 23:15:40 +0800 Subject: [PATCH 2/4] init commit --- .../test.py" | 34 +- ...\344\270\272\346\211\213\346\234\272.html" | 0 ...\346\230\276\347\244\272\345\261\217.html" | 7795 +++++++++++++++++ ...\346\270\270\346\210\217\346\234\272.html" | 7736 ++++++++++++++++ ...\347\254\224\350\256\260\346\234\254.html" | 7726 ++++++++++++++++ ...\346\236\234\346\211\213\346\234\272.html" | 0 ...\351\201\277\345\255\225\345\245\227.html" | 0 .../\351\274\240\346\240\207.html" | 6557 ++++++++++++++ 8 files changed, 29832 insertions(+), 16 deletions(-) delete mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\345\215\216\344\270\272\346\211\213\346\234\272.html" delete mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\350\213\271\346\236\234\346\211\213\346\234\272.html" delete mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\201\277\345\255\225\345\245\227.html" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/test.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/test.py" index 15cb5f59..40be1c11 100644 --- "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/test.py" +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/test.py" @@ -1,4 +1,4 @@ -第一问:搜索页面请求 +# 第一问:搜索页面请求 import requests from urllib.parse import quote, unquote @@ -12,17 +12,17 @@ def request_jd(keyword): "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36" } response = requests. get(url=url, params=params, headers=headers) - + f.write(response.text) + f.close() print(response.text) if __name__ == "__main__": - request_jd("鼠标") - request_jd("显示屏") - request_jd("游戏机") - request_jd("笔记本") - request_jd("华为手机") - request_jd("苹果手机") - request_jd("避孕套") + i = ["鼠标", "显示屏", "游戏机", "笔记本"] + for a in range(len(i)): + b = i[a] + request_jd(b) + + 第二问:详细页面请求 @@ -32,14 +32,16 @@ import string f = open("detailed information.html", "w", encoding="utf-8") url = 'https://item.jd.com/1337248.html' response = urlopen(quote(url,safe=string.printable)) +f.write(response.text) +f.close() print(response) - - - - - - - +# +# +# +# +# +# +# 第三问:json练习 import json test_dict = { diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\345\215\216\344\270\272\346\211\213\346\234\272.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\345\215\216\344\270\272\346\211\213\346\234\272.html" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\276\347\244\272\345\261\217.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\276\347\244\272\345\261\217.html" index e69de29b..300de360 100644 --- "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\276\347\244\272\345\261\217.html" +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\276\347\244\272\345\261\217.html" @@ -0,0 +1,7795 @@ + + + + + + + + + + + + + + + + + + + + +显示屏 - 商品搜索 - 京东 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+
+ +
+
+ +
+ + +
+
+
+
+ + + 我的购物车 +
+
+
+
+ +
+
+
+
+ +
+ + +
+ + +
+
+
+
+ +
+ > +
+ "显示屏" +
+
+
+
+ +
+ +
+ +
+
+
品牌:
+
+
    +
  • 所有品牌
  • +
  • A
  • +
  • B
  • +
  • C
  • +
  • D
  • +
  • E
  • +
  • F
  • +
  • G
  • +
  • H
  • +
  • I
  • +
  • J
  • +
  • K
  • +
  • L
  • +
  • M
  • +
  • N
  • +
  • O
  • +
  • P
  • +
  • Q
  • +
  • R
  • +
  • S
  • +
  • T
  • +
  • U
  • +
  • V
  • +
  • W
  • +
  • X
  • +
  • Y
  • +
  • Z
  • +
+
+
+ +
+
已选条件:
    +
    + 确定 + 取消 +
    +
    +
    + 更多 + 多选 +
    +
    +
    +
    +
    +
    电脑组件:
    +
    +
    + +
    +
    + 确定 + 取消 +
    +
    +
    + 更多 + +
    +
    +
    + +
    +
    +
    二手电脑配件:
    +
    +
    + +
    +
    + 确定 + 取消 +
    +
    +
    + 更多 + +
    +
    +
    + +
    +
    +
    分辨率:
    + +
    + 更多 + 多选 +
    +
    +
    + +
    +
    +
    高级选项:
    + +
    + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    + + + + + +
    +
    +
    +
    + - +
    +
    +
    + + 清空 + 确定 +
    +
    +
    + + 1/100 + + < + > +
    +
    84万+件商品
    + +
    +
    +
    +
    配送至
    +
    +
    +
    北京
    + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + +
    + + + +
    +
    正在加载中,请稍后~~
    +
    +
    +
    +
    +
    +
    + +

    商品精选

    +
    +
      +
    +
    +
    +

    精品推荐

    + +
    +
    + +
    + + +
    +
    +
    +
    +
    + +
    商品精选
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
      +
    1. + 品类齐全,轻松购物 +
    2. +
    3. + 多仓直发,极速配送 +
    4. +
    5. + 正品行货,精致服务 +
    6. +
    7. + 天天低价,畅选无忧 +
    8. +
    +
    +
    +
    +
    +
    +
    购物指南
    +
    + 购物流程 +
    +
    + 会员介绍 +
    +
    + 生活旅行/团购 +
    +
    + 常见问题 +
    +
    + 大家电 +
    +
    + 联系客服 +
    +
    +
    +
    配送方式
    +
    + 上门自提 +
    +
    + 211限时达 +
    +
    + 配送服务查询 +
    +
    + 配送费收取标准 +
    +
    + 海外配送 +
    +
    +
    +
    支付方式
    +
    + 货到付款 +
    +
    + 在线支付 +
    +
    + 分期付款 +
    +
    + 公司转账 +
    +
    +
    +
    售后服务
    +
    + 售后政策 +
    +
    + 价格保护 +
    +
    + 退款说明 +
    +
    + 返修/退换货 +
    +
    + 取消订单 +
    +
    +
    +
    特色服务
    +
    + 夺宝岛 +
    +
    + DIY装机 +
    +
    + 延保服务 +
    +
    + 京东E卡 +
    +
    + 京东通信 +
    +
    + 京鱼座智能 +
    +
    + +
    +
    +
    +
    + + +
    + + + + + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\270\270\346\210\217\346\234\272.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\270\270\346\210\217\346\234\272.html" index e69de29b..6023f65e 100644 --- "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\270\270\346\210\217\346\234\272.html" +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\270\270\346\210\217\346\234\272.html" @@ -0,0 +1,7736 @@ + + + + + + + + + + + + + + + + + + + + +游戏机 - 商品搜索 - 京东 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    +
    +
    +
    +
    + +
    +
    + +
    + + +
    +
    +
    +
    + + + 我的购物车 +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + + +
    + + +
    +
    +
    +
    + +
    + > +
    + "游戏机" +
    +
    +
    +
    + +
    + +
    + +
    +
    +
    品牌:
    +
    +
      +
    • 所有品牌
    • +
    • A
    • +
    • B
    • +
    • C
    • +
    • D
    • +
    • E
    • +
    • F
    • +
    • G
    • +
    • H
    • +
    • I
    • +
    • J
    • +
    • K
    • +
    • L
    • +
    • M
    • +
    • N
    • +
    • O
    • +
    • P
    • +
    • Q
    • +
    • R
    • +
    • S
    • +
    • T
    • +
    • U
    • +
    • V
    • +
    • W
    • +
    • X
    • +
    • Y
    • +
    • Z
    • +
    +
    +
    + +
    +
    已选条件:
      +
      + 确定 + 取消 +
      +
      +
      + 更多 + 多选 +
      +
      +
      +
      +
      +
      分类:
      +
      +
      + +
      +
      + 确定 + 取消 +
      +
      +
      + 更多 + +
      +
      +
      + +
      +
      +
      适用年龄:
      +
      +
      + +
      +
      + 确定 + 取消 +
      +
      +
      + 更多 + 多选 +
      +
      +
      +
      +
      +
      适用场景:
      +
      +
      + +
      +
      + 确定 + 取消 +
      +
      +
      + 更多 + 多选 +
      +
      +
      +
      +
      +
      类别:
      + +
      + 更多 + 多选 +
      +
      +
      +
      +
      +
      高级选项:
      + +
      + + + + + + + + + + + + + + + + + + + + + + + +
      +
      +
      +
      +
      +
      + +
      +
      + +
      + + + + + +
      +
      +
      +
      + - +
      +
      +
      + + 清空 + 确定 +
      +
      +
      + + 1/100 + + < + > +
      +
      93万+件商品
      + +
      +
      +
      +
      配送至
      +
      +
      +
      北京
      + +
      +
      +
      +
      +
      +
      +
      + + +
      +
      + + +
      + + + +
      +
      正在加载中,请稍后~~
      +
      +
      +
      +
      +
      +
      + +

      商品精选

      +
      +
        +
      +
      +
      +

      精品推荐

      + +
      +
      + +
      + + +
      +
      +
      +
      +
      + +
      商品精选
      +
      +
      +
      +
      + +
      +
      +
      +
      + +
      +
      +
        +
      1. + 品类齐全,轻松购物 +
      2. +
      3. + 多仓直发,极速配送 +
      4. +
      5. + 正品行货,精致服务 +
      6. +
      7. + 天天低价,畅选无忧 +
      8. +
      +
      +
      +
      +
      +
      +
      购物指南
      +
      + 购物流程 +
      +
      + 会员介绍 +
      +
      + 生活旅行/团购 +
      +
      + 常见问题 +
      +
      + 大家电 +
      +
      + 联系客服 +
      +
      +
      +
      配送方式
      +
      + 上门自提 +
      +
      + 211限时达 +
      +
      + 配送服务查询 +
      +
      + 配送费收取标准 +
      +
      + 海外配送 +
      +
      +
      +
      支付方式
      +
      + 货到付款 +
      +
      + 在线支付 +
      +
      + 分期付款 +
      +
      + 公司转账 +
      +
      +
      +
      售后服务
      +
      + 售后政策 +
      +
      + 价格保护 +
      +
      + 退款说明 +
      +
      + 返修/退换货 +
      +
      + 取消订单 +
      +
      +
      +
      特色服务
      +
      + 夺宝岛 +
      +
      + DIY装机 +
      +
      + 延保服务 +
      +
      + 京东E卡 +
      +
      + 京东通信 +
      +
      + 京鱼座智能 +
      +
      + +
      +
      +
      +
      + + +
      + + + + + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\224\350\256\260\346\234\254.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\224\350\256\260\346\234\254.html" index e69de29b..9518c4b1 100644 --- "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\224\350\256\260\346\234\254.html" +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\224\350\256\260\346\234\254.html" @@ -0,0 +1,7726 @@ + + + + + + + + + + + + + + + + + + + + +笔记本 - 商品搜索 - 京东 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + +
      +
      +
      +
      +
      + +
      +
      + +
      + + +
      +
      +
      +
      + + + 我的购物车 +
      +
      +
      +
      + +
      +
      +
      +
      + +
      + + +
      + + +
      +
      +
      +
      + +
      + > +
      + "笔记本" +
      +
      +
      +
      + +
      + +
      + +
      +
      +
      品牌:
      +
      +
        +
      • 所有品牌
      • +
      • A
      • +
      • B
      • +
      • C
      • +
      • D
      • +
      • E
      • +
      • F
      • +
      • G
      • +
      • H
      • +
      • I
      • +
      • J
      • +
      • K
      • +
      • L
      • +
      • M
      • +
      • N
      • +
      • O
      • +
      • P
      • +
      • Q
      • +
      • R
      • +
      • S
      • +
      • T
      • +
      • U
      • +
      • V
      • +
      • W
      • +
      • X
      • +
      • Y
      • +
      • Z
      • +
      +
      +
      + +
      +
      已选条件:
        +
        + 确定 + 取消 +
        +
        +
        + 更多 + 多选 +
        +
        +
        +
        +
        +
        电脑整机:
        +
        +
        + +
        +
        + 确定 + 取消 +
        +
        +
        + 更多 + +
        +
        +
        + +
        +
        +
        文具:
        +
        +
        + +
        +
        + 确定 + 取消 +
        +
        +
        + 更多 + +
        +
        +
        + +
        +
        +
        二手电脑整机:
        +
        + +
        + 确定 + 取消 +
        +
        +
        + 更多 + +
        +
        +
        + + +
        +
        +
        高级选项:
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
        +
        +
        +
        +
        + +
        +
        + +
        + + + + + +
        +
        +
        +
        + - +
        +
        +
        + + 清空 + 确定 +
        +
        +
        + + 1/100 + + < + > +
        +
        94万+件商品
        + +
        +
        +
        +
        配送至
        +
        +
        +
        北京
        + +
        +
        +
        +
        +
        +
        +
        + + +
        +
        + + +
        + + + +
        +
        正在加载中,请稍后~~
        +
        +
        +
        +
        +
        +
        + +

        商品精选

        +
        +
          +
        +
        +
        +

        精品推荐

        + +
        +
        + +
        + + +
        +
        +
        +
        +
        + +
        商品精选
        +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
          +
        1. + 品类齐全,轻松购物 +
        2. +
        3. + 多仓直发,极速配送 +
        4. +
        5. + 正品行货,精致服务 +
        6. +
        7. + 天天低价,畅选无忧 +
        8. +
        +
        +
        +
        +
        +
        +
        购物指南
        +
        + 购物流程 +
        +
        + 会员介绍 +
        +
        + 生活旅行/团购 +
        +
        + 常见问题 +
        +
        + 大家电 +
        +
        + 联系客服 +
        +
        +
        +
        配送方式
        +
        + 上门自提 +
        +
        + 211限时达 +
        +
        + 配送服务查询 +
        +
        + 配送费收取标准 +
        +
        + 海外配送 +
        +
        +
        +
        支付方式
        +
        + 货到付款 +
        +
        + 在线支付 +
        +
        + 分期付款 +
        +
        + 公司转账 +
        +
        +
        +
        售后服务
        +
        + 售后政策 +
        +
        + 价格保护 +
        +
        + 退款说明 +
        +
        + 返修/退换货 +
        +
        + 取消订单 +
        +
        +
        +
        特色服务
        +
        + 夺宝岛 +
        +
        + DIY装机 +
        +
        + 延保服务 +
        +
        + 京东E卡 +
        +
        + 京东通信 +
        +
        + 京鱼座智能 +
        +
        + +
        +
        +
        +
        + + +
        + + + + + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\350\213\271\346\236\234\346\211\213\346\234\272.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\350\213\271\346\236\234\346\211\213\346\234\272.html" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\201\277\345\255\225\345\245\227.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\201\277\345\255\225\345\245\227.html" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\274\240\346\240\207.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\274\240\346\240\207.html" index e69de29b..489943de 100644 --- "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\274\240\346\240\207.html" +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\351\274\240\346\240\207.html" @@ -0,0 +1,6557 @@ + + + + + + + + + + + + + + + + + + + + +鼠标 - 商品搜索 - 京东 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
        + + + +
        +
        +
        +
        +
        + +
        +
        + +
        + + +
        +
        +
        +
        + + + 我的购物车 +
        +
        +
        +
        + +
        +
        +
        +
        + +
        + + +
        + + +
        +
        +
        +
        + +
        + > +
        + "鼠标" +
        +
        +
        +
        + +
        + +
        + +
        +
        +
        品牌:
        +
        +
          +
        • 所有品牌
        • +
        • A
        • +
        • B
        • +
        • C
        • +
        • D
        • +
        • E
        • +
        • F
        • +
        • G
        • +
        • H
        • +
        • I
        • +
        • J
        • +
        • K
        • +
        • L
        • +
        • M
        • +
        • N
        • +
        • O
        • +
        • P
        • +
        • Q
        • +
        • R
        • +
        • S
        • +
        • T
        • +
        • U
        • +
        • W
        • +
        • X
        • +
        • Y
        • +
        • Z
        • +
        +
        +
        + +
        +
        已选条件:
          +
          + 确定 + 取消 +
          +
          +
          + 更多 + 多选 +
          +
          +
          +
          +
          +
          外设产品:
          +
          +
          + +
          +
          + 确定 + 取消 +
          +
          +
          + 更多 + +
          +
          +
          + +
          +
          +
          电脑整机:
          +
          +
          + +
          +
          + 确定 + 取消 +
          +
          +
          + 更多 + +
          +
          +
          + +
          +
          +
          连接方式:
          +
          +
          + +
          +
          + 确定 + 取消 +
          +
          +
          + 更多 + 多选 +
          +
          +
          +
          +
          +
          产品类型:
          +
          +
          + +
          +
          + 确定 + 取消 +
          +
          +
          + 更多 + 多选 +
          +
          +
          +
          +
          +
          高级选项:
          + +
          + + + + + + + + + + + +
          +
          +
          +
          +
          +
          + +
          +
          + +
          + + + + + +
          +
          +
          +
          + - +
          +
          +
          + + 清空 + 确定 +
          +
          +
          + + 1/100 + + < + > +
          +
          73万+件商品
          + +
          +
          +
          +
          配送至
          +
          +
          +
          北京
          + +
          +
          +
          +
          +
          +
          +
          + + +
          +
          + + +
          + + + +
          +
          正在加载中,请稍后~~
          +
          +
          +
          +
          +
          +
          + +

          商品精选

          +
          +
            +
          +
          +
          +

          精品推荐

          + +
          +
          + +
          + + +
          +
          +
          +
          +
          + +
          商品精选
          +
          +
          +
          +
          + +
          +
          +
          +
          + +
          +
          +
            +
          1. + 品类齐全,轻松购物 +
          2. +
          3. + 多仓直发,极速配送 +
          4. +
          5. + 正品行货,精致服务 +
          6. +
          7. + 天天低价,畅选无忧 +
          8. +
          +
          +
          +
          +
          +
          +
          购物指南
          +
          + 购物流程 +
          +
          + 会员介绍 +
          +
          + 生活旅行/团购 +
          +
          + 常见问题 +
          +
          + 大家电 +
          +
          + 联系客服 +
          +
          +
          +
          配送方式
          +
          + 上门自提 +
          +
          + 211限时达 +
          +
          + 配送服务查询 +
          +
          + 配送费收取标准 +
          +
          + 海外配送 +
          +
          +
          +
          支付方式
          +
          + 货到付款 +
          +
          + 在线支付 +
          +
          + 分期付款 +
          +
          + 公司转账 +
          +
          +
          +
          售后服务
          +
          + 售后政策 +
          +
          + 价格保护 +
          +
          + 退款说明 +
          +
          + 返修/退换货 +
          +
          + 取消订单 +
          +
          +
          +
          特色服务
          +
          + 夺宝岛 +
          +
          + DIY装机 +
          +
          + 延保服务 +
          +
          + 京东E卡 +
          +
          + 京东通信 +
          +
          + 京鱼座智能 +
          +
          + +
          +
          +
          +
          + + +
          + + + + + -- Gitee From fe1bf11fa9ba359b61aca2a664998d0030754088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=99=9A=E5=B9=B3?= <8437069+zhang-xuping@user.noreply.gitee.com> Date: Tue, 23 Feb 2021 23:28:35 +0800 Subject: [PATCH 3/4] init commit --- .../detailed information.html" | 2851 +++++++++++++++++ .../test.py" | 101 +- ...\346\230\276\347\244\272\345\261\217.html" | 54 +- ...\346\270\270\346\210\217\346\234\272.html" | 91 +- ...\347\254\224\350\256\260\346\234\254.html" | 130 +- .../\351\274\240\346\240\207.html" | 1009 +++--- 6 files changed, 3505 insertions(+), 731 deletions(-) diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/detailed information.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/detailed information.html" index e69de29b..6b985494 100644 --- "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/detailed information.html" +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/detailed information.html" @@ -0,0 +1,2851 @@ + + + + + + 【戴尔MS116有线鼠标】戴尔(DELL)MS116 有线鼠标 商务办公鼠标(黑色)(适用于联想,华为,惠普,小米等品牌笔记本台式机)【行情 报价 价格 评测】-京东 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          +
          + + + +
          +
          +
          + + + +
          +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          + + + +
          +
          +
          +
          + + > + 我的购物车 +
          +
          +
          +
          + +
          +
          +
          +
          + + +
          + + + +
          +
          + +
          +
          + + 自营 + +
          +
          + +
          +
          +
          +
          +
          +
          +
          + +
          +
          +
          +
          +
          +
          客服
          +
          +
          +
          +
          +
          +
          + +
          +
          +
          + 关注微店 +

          关注微店

          +
          +
          +
          +

          手机下单

          +
          +
          + +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
            +
          + 戴尔(DELL)MS116 有线鼠标 商务办公鼠标(黑色)(适用于联想,华为,惠普,小米等品牌笔记本台式机) + +
          +
          + + +
          + + +
          +
            +
          • 戴尔(DELL)MS116 有线鼠标 商务办公鼠标(黑色)(适用于联想,华为,惠普,小米等品牌笔记本台式机)
          • +
          • 戴尔(DELL)MS116 有线鼠标 商务办公鼠标(黑色)(适用于联想,华为,惠普,小米等品牌笔记本台式机)
          • +
          • 戴尔(DELL)MS116 有线鼠标 商务办公鼠标(黑色)(适用于联想,华为,惠普,小米等品牌笔记本台式机)
          • +
          • 戴尔(DELL)MS116 有线鼠标 商务办公鼠标(黑色)(适用于联想,华为,惠普,小米等品牌笔记本台式机)
          • +
          • 戴尔(DELL)MS116 有线鼠标 商务办公鼠标(黑色)(适用于联想,华为,惠普,小米等品牌笔记本台式机)
          • +
          • 戴尔(DELL)MS116 有线鼠标 商务办公鼠标(黑色)(适用于联想,华为,惠普,小米等品牌笔记本台式机)
          • +
          • 戴尔(DELL)MS116 有线鼠标 商务办公鼠标(黑色)(适用于联想,华为,惠普,小米等品牌笔记本台式机)
          • +
          • 戴尔(DELL)MS116 有线鼠标 商务办公鼠标(黑色)(适用于联想,华为,惠普,小米等品牌笔记本台式机)
          • +
          +
          +
          + + +
          +
          +
          +
          + 戴尔(DELL)MS116 有线鼠标 商务办公鼠标(黑色)(适用于联想,华为,惠普,小米等品牌笔记本台式机)
          +
          +
          +
          +
          + + +
          +
          +
          +
          秒 杀 价
          +
          + + + + + [¥22.90] + 降价通知 +
          + + + + fans + +
          + + + + + + + + + + +
          +
          + + + +
          +
          +

          累计评价

          + 0 +
          +
          +
          +
          +
          +
          促  销
          +
          +
          + + + + + + + + + + +
          + 展开促销 + +
          +
          +
          +
          +
          +
          +
          + +
          + +
          +
          增值业务
          +
          +
            +
          +
          +
          +
          +
          配 送 至
          +
          +
          +
          +
          +
          +
          --请选择--
          + +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          支持
          +
          +
            + +
            +
            +
            +
            +
            +
            + + + + +
            + + + + + + + + + + + +
            +
            +
            +
            + + - + + +
            +
            + + 加入购物车 + + + + +
            +
            +
            本地活动
            +
            +
              +
              +
              + +
              +
              +
              +
              + + +
              +
              +
              +

              为你推荐

              +
              +
              +
              +
              +
              + +
              + +
              +
              +
              + +
              +
              +
              +
                +
              • 人气配件
              • +
              +
              +
              +
              + +
              +
              +
              + + +
              +
              +
                +
                +
                +
                + +
                +
                已选择0个配件
                +
                + 组合价 + ¥暂无报价 +
                + + = +
                +
                +
                +
                +
                +
                +
                +
                  +
                • 店长推荐
                • +
                +
                +
                +
                +
                +
                +
                +
                + +
                +
                + +
                + +
                + +
                +
                + +
                +
                +
                +
                +
                +
                +
                  +
                • 商品介绍
                • +
                • 规格与包装
                • +
                • 质检报告
                • +
                • 售后保障
                • +
                • 商品评价
                • +
                • + 商品问答
                • +
                • 京东试用new
                • +
                +
                +
                +
                +
                + +
                +
                +
                + +
                +
                +
                戴尔(DELL)MS116 有线鼠标 商务办公鼠标(黑色)(适用于联想,华为,惠普,小米等品牌笔记本台式机)
                +
                + X +
                +
                +
                +
                +
                +
                +
                +
                +
                +
                +
                +
                + +
                  +
                • 商品名称:戴尔MS116有线鼠标
                • +
                • 商品编号:2136538
                • +
                • 商品毛重:150.00g
                • +
                • 商品产地:中国大陆
                • +
                • 功能场景:日常办公
                • +
                • 特点:磨砂材质
                • +
                • 颜色:黑色
                • +
                • 尺寸:100mm-120mm
                • +
                • 连接方式:有线
                • +
                • 可编程键:无可编程键
                • +
                +

                + 更多参数>> +

                +
                + +
                +
                +
                +
                +
                + +
                +
                + +
                +
                +
                +
                商品介绍加载中...
                +
                + +
                +
                +
                +
                  +
                  +
                  +
                  +
                  +
                  +
                  +
                  +
                  +
                  +

                  主体

                  +
                  +
                  +
                  品牌
                  戴尔
                  +
                  +
                  +
                  型号
                  MS116有线鼠标
                  +
                  +
                  +
                  +
                  +

                  规格

                  +
                  +
                  +
                  分辨率
                  1000DPI
                  +
                  +
                  +
                  产品尺寸(mm)
                  110*60*30
                  +
                  +
                  +
                  接口
                  USB
                  +
                  +
                  +
                  产品净重(g)
                  87g
                  +
                  +
                  +
                  工作方式
                  +
                  + +
                  +
                  +
                  +

                  市场主流分为光电、激光等方式,光电需要有鼠标垫以及比较平整的桌面,激光对各平面的的适应性较好。

                  +
                  +
                  +
                  +
                  光电
                  +
                  +
                  +
                  线长(m)
                  1.8
                  +
                  +
                  +
                  按键数
                  3
                  +
                  +
                  +
                  +
                  +
                  +

                  包装清单

                  +

                  MS116有线鼠标*1

                  +
                  +
                  +
                  + +
                  +
                  + +
                  +
                  + +
                  +
                  + +
                  +
                  +
                  +
                  + +
                  +
                  +

                  售后保障

                  +
                  +
                  + +
                  +
                  +
                  +
                  +

                  商品评价

                  +
                  +
                  +
                  +
                  +
                  + +
                  +
                  +
                  推荐排序
                  +
                  +
                  推荐排序
                  +
                    +
                  • 推荐排序
                  • +
                  • 时间排序
                  • +
                  +
                  +
                  +
                  +
                  +
                  +
                  全部评论
                  +
                  正在加载中,请稍候...
                  +
                  正在加载中,请稍候...
                  +
                  正在加载中,请稍候...
                  +
                  正在加载中,请稍候...
                  +
                  +
                  +
                  +
                  +
                  +
                  +

                  商品问答

                  +
                  +
                  +
                  + 心中疑惑就问问买过此商品的同学吧~我要提问 +
                  +
                  +
                  +
                  +
                  +
                  + +
                  +
                  +
                  +

                  购买咨询

                  +
                  + +
                  +
                  +
                  +
                  +
                  +
                  +
                  +
                  +
                  +
                  +
                  +
                    +
                  • 全部
                  • +
                  • 商品咨询
                  • +
                  • 库存配送
                  • +
                  • 支付
                  • +
                  • 发票保修
                  • +
                  • +
                  +
                  +
                  + +
                  +
                  +
                  +
                  +
                  + +
                  +
                  +
                  +
                  + +
                  + 戴尔MS116有线鼠标和罗技G102 游戏鼠标哪个好 + 戴尔MS116有线鼠标和罗技M110哪个好 + 戴尔MS116有线鼠标和罗技M220 无线静音鼠标哪个好 + 戴尔MS116有线鼠标和现代 HY-V8 办公游戏家用鼠标台式机笔记本电脑USB接口男生女生游戏多彩炫光有线鼠办公鼠标 HY-V8黑色哪个好 + 戴尔MS116有线鼠标和罗技Pebble哪个好 + 戴尔MS116有线鼠标和罗技G304哪个好 + 戴尔MS116有线鼠标和联想M120哪个好 +
                  +
                  + 升级版鼠标 + 无线宏定义鼠标 + delux多彩鼠标 + kinect体感游戏机 + 罗技双模 + 移动无线鼠标 + 艾酷游戏鼠标 + 牧马人夜光鼠标 + 双手鼠标 + 小手鼠标 +
                  + + + + +
                  + + + + + + +
                  + + + + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/test.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/test.py" index 40be1c11..0b3dd642 100644 --- "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/test.py" +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/test.py" @@ -1,55 +1,58 @@ # 第一问:搜索页面请求 -import requests -from urllib.parse import quote, unquote - -def request_jd(keyword): - f = open(keyword + ".html", "w", encoding="utf-8") - url = "https://search.jd.com/Search" - params = { - "keyword": keyword - } - headers = { - "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36" - } - response = requests. get(url=url, params=params, headers=headers) - f.write(response.text) - f.close() - print(response.text) - -if __name__ == "__main__": - i = ["鼠标", "显示屏", "游戏机", "笔记本"] - for a in range(len(i)): - b = i[a] - request_jd(b) - - - - -第二问:详细页面请求 -from urllib.request import Request,urlopen -from urllib.parse import quote -import string -f = open("detailed information.html", "w", encoding="utf-8") -url = 'https://item.jd.com/1337248.html' -response = urlopen(quote(url,safe=string.printable)) -f.write(response.text) -f.close() -print(response) -# -# +# import requests +# from urllib.parse import quote, unquote # +# def request_jd(keyword): +# f = open(keyword + ".html", "w", encoding="utf-8") +# url = "https://search.jd.com/Search" +# params = { +# "keyword": keyword +# } +# headers = { +# "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36" +# } +# response = requests. get(url=url, params=params, headers=headers) +# f.write(response.text) +# f.close() +# print(response.text) # +# if __name__ == "__main__": +# i = ["鼠标", "显示屏", "游戏机", "笔记本"] +# for a in i: +# request_jd(a) + + + + +# 第二问:详细页面请求 +# import requests +# from urllib.parse import quote, unquote # +# def request_jd(): +# f = open("detailed information.html", "w", encoding="utf-8") +# url = "https://item.jd.com/2136538.html" +# headers = { +# "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36" +# } +# response = requests. get(url=url, headers=headers) +# f.write(response.text) +# f.close() +# print(response.text) # +# if __name__ == "__main__": +# request_jd() + + + + +# 第三问:json练习 +# import json +# test_dict = { +# "a": 1, +# "b": ["1", 2, None], +# "c": {"d":1} +# } # -第三问:json练习 -import json -test_dict = { - "a": 1, - "b": ["1", 2, None], - "c": {"d":1} -} - -json_data = json.dumps(test_dict) -print(type(json_data), json_data) -print(json.loads(json_data)) +# json_data = json.dumps(test_dict) +# print(type(json_data), json_data) +# print(json.loads(json_data)) diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\276\347\244\272\345\261\217.html" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\276\347\244\272\345\261\217.html" index 300de360..55611709 100644 --- "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\276\347\244\272\345\261\217.html" +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\344\275\234\344\270\232/1\347\217\255_\345\230\230\345\230\230_\347\254\254\344\271\235\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\276\347\244\272\345\261\217.html" @@ -20,7 +20,7 @@ 显示屏 - 商品搜索 - 京东 - +