Spyder爬取豆瓣电影Top500-csv文件存储
废话少说,直接上代码:
# -*- coding: utf-8 -*-
Created on Fri May 1 16:59:13 2020
@author: ASUS
import requests
from lxml import etree
import csv
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 '
'(KHTML, like Gecko
1