- pycharm
import requests
import parsel
import csv
import time
相关模块可pip安装
import requests
import parsel
import csv
import time
f = open(‘旅游景点.csv’, mode=‘a’, encoding=‘utf-8-sig’, newline=‘’)
csv_writer = csv.DictWriter(f, fieldnames=[‘景区名字’, ‘景区等级’, ‘地区’, ‘地址’, ‘热度’, ‘简介’, ‘价格’, ‘月销’])
csv_writer.writeheader()
for page in range(1, 11):
ti