上传者: 38732519
|
上传时间: 2022-12-03 16:50:41
|
文件大小: 39KB
|
文件类型: PDF
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