python+request+csv爬取网站上的资料—02—读取csv文件的数据
读取csv文件的数据import csv# 按字典的读取方式读取def readCsvDict(): with open('G:/business_auto/data/pug_url.csv', encoding='gbk') as f: data = [tuple(line) for line in csv.reader(f)] return data