新建文件夹 ./guba/ 爬取的十页数据会自动存到guba文件夹下
import requests
import os
for i in range(10):
base_url = 'http://guba.eastmoney.com/default,99_'f'{i}.html'
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36