摘要: import requests from bs4 import BeautifulSoup import csv url = 'https://price.21food.cn/market/174-p1.html' headers = { 'User-Agent': 'Mozilla/5.0 (Wi 阅读全文
posted @ 2023-02-28 20:17 0x1e61 阅读(11) 评论(0) 推荐(0) 编辑
摘要: # 下面的一段HTML代码将作为例子被多次用到.这是 爱丽丝梦游仙境的 的一段内容(以后内容中简称为 爱丽丝 的文档): html_doc = """ <html><head><title>The Dormouse's story</title></head> <body> <p class="ti 阅读全文
posted @ 2023-02-28 20:16 0x1e61 阅读(9) 评论(0) 推荐(0) 编辑
摘要: import requests import re url = 'xxx/index2.htm' headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like 阅读全文
posted @ 2023-02-28 13:06 0x1e61 阅读(391) 评论(0) 推荐(0) 编辑
摘要: import csv import re import requests headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrom 阅读全文
posted @ 2023-02-28 08:53 0x1e61 阅读(163) 评论(0) 推荐(0) 编辑