爬虫
@懒羊羊
这个作者很懒,什么都没留下…
展开
-
Python scrapy爬取古诗文网,数据存入mongo
一、在items.py文件中定义数据结构 title: 诗词的标题 writer: 诗词的作者 dynasty:诗词编写的朝代 content: 诗词的正文 content_url: 正文链接 二、shici.py分析爬取内容 三、settings.py配置相关内容 四、pipelines.py中写入mongo 1、items.py文件 # Define here the models for your scraped items # # See documentation in: # https://do原创 2020-11-13 16:41:22 · 394 阅读 · 0 评论 -
爬取腾讯视频 xpath方式
以xpath方式爬腾讯视频里电影的 链接, 海报链接, 演员,简介等 如 href=" " 这种类型数据, 可以@href来提取 import requests from fake_useragent import UserAgent from lxml import etree import numpy as np from pandas import DataFrame class Tencent(object): def __init__(self): self.he.原创 2020-10-27 10:03:48 · 1470 阅读 · 1 评论