摘要: 目录 1. 对文本内容的爬取 2.对二进制资源的爬取【图片、音频等】 1. 对文本内容的爬取 今天,我们对 https://ssr1.scrape.center/ 该网站进行爬取 目标:爬取第一页的电影名称(10个电影) import requests import re response = re 阅读全文
posted @ 2023-03-18 17:36 辰梦starDream 阅读(10) 评论(0) 推荐(0) 编辑
摘要: URL 一般格式规范 协议://[username:password@]主机名[:端口号][/路径][;parameters][?query][#fragment] 举个例子:https://www.baidu.com/ 我们可以看到只有 协议 和 主机名 两部分。 协议:一般常用的有 http h 阅读全文
posted @ 2023-03-18 16:12 辰梦starDream 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 今日使用库——threading 今日参考文章:菜鸟教程——python多线程 1. 首先创建一个类 class MyThread(threading.Thread): def __init__(self, thread_id, name, speed): threading.Thread.__in 阅读全文
posted @ 2023-03-18 09:34 辰梦starDream 阅读(5) 评论(0) 推荐(0) 编辑