爬取安居客的信息,并保存到csv文件中。

这里说明下不要用xpath进行爬取,由于会被封。 # 引入包 import requests from bs4 import BeautifulSoup import time import csv # 定制请求头 换成本身的请求头 headers = { 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Ge
相关文章
相关标签/搜索