Scrapy(官网 http://scrapy.org/)是一款功能强大的,用户可定制的网络爬虫软件包.其官方描述称:" Scrapy is a fast high-level screen scraping and web crawling framework, used to crawl websites and extract structured data from their pages. It can be used for a wide range of purposes, fro…
环境:python3 pycharm 模块:requests bs4 urlretrieve os time 第一步:获取网页源代码 import requests from bs4 import BeautifulSoup from urllib.request import urlretrieve import os import time def get_html(url): try: response = requests.get(url) response.encoding…