摘要: 1 """古诗文网爬虫""" 2 3 4 import re 5 import requests 6 7 def parse_page(url): 8 headers = { 9 'User-Agent': 'Mozilla/5.0', 10 } 11 12 response = requests. 阅读全文
posted @ 2020-06-14 23:47 udbful 阅读(253) 评论(0) 推荐(0)
摘要: 1、zip函数: 1 """zip函数""" 2 3 4 """ 5 zip() 函数用于将可迭代的对象作为参数,将对象中对应的元素打包成一个个元组,然后返回由这些元组组成的列表。 6 如果各个迭代器的元素个数不一致,则返回列表长度与最短的对象相同,利用 * 号操作符,可以将元组解压为列表。 7 " 阅读全文
posted @ 2020-06-14 23:44 udbful 阅读(130) 评论(0) 推荐(0)