import requests from lxml import etree import time import csv from urllib.request import urlopen, Request from lxml import etree def crow_first(n): print(n) # 定义函数抓取每页前30条商品信息 # 构造每一页的url变化 if __name__ == '__main__': for i in range(1, 10): # 下面的print函数主要是为了方便查看当前抓到第几页了 print('***************************************************') try: print(' First_Page: ' + str(i)) crow_first(i) print(' Finish') except Exception as e: print(e)
08python 主函数调用子函数
最新推荐文章于 2024-09-03 08:00:00 发布