跳转到主要内容

Reddit::Comments - Reddit 评论爬虫工具

SE::Quora

Reddit::Comments 爬虫工具概览

Reddit::CommentsReddit::Comments - Reddit 消息爬虫工具。

同名服务中抓取评论列表及每个评论的详细信息。

您可以使用查询语句自动生成、从文件中替换子查询、遍历数字字母组合以及列表,以获取尽可能多的结果。

A-Parser 的功能允许保存 Reddit::Posts 爬虫工具的抓取设置以便日后使用(预设),设置抓取计划等等。

得益于内置强大的 Template Toolkit 模板引擎,可以将结果保存为您需要的任何形式和结构,它允许对结果应用额外的逻辑,并以各种格式输出数据,包括 JSON、SQL 和 CSV

采集数据

评论数组:

  • 评论链接
  • 评论内容(Markdown 格式)
  • 评分和获奖数量
  • 评论创建日期
  • 评论作者及其标签 (flair)
  • 该评论所属帖子的链接
  • 帖子标题及其标签 (flair)
  • 帖子评分、评论数和获奖数量
  • 帖子创建日期
  • 发布帖子的社区
  • 帖子作者及其标签 (flair)
  • 帖子内容:Markdown 文本、媒体内容链接和外部资源链接

功能

  • 指定抓取的页数
  • 指定结果排序方式
  • 支持在特定社区内进行数据抓取

应用场景

  • 任何需要采集 Reddit 帖子下评论的场景

查询

支持 2 种查询方式:

关键词

示例:

wordpress features
parser

默认结果将输出评论链接列表,例如:

https://www.reddit.com/r/node/comments/14lmqbq/how_to_work_with_xlsx_files/jpy3r5a/
https://www.reddit.com/r/StardewValley/comments/14qidly/having_problems_installing_stardew_valley/jqnalwz/
https://www.reddit.com/r/elasticsearch/comments/14pr86i/how_to_parsing_this_lin_logstash/jqkstjw/
https://www.reddit.com/r/vexillology/comments/14fh5th/flag_of_riga_michigan/jp10w17/
https://www.reddit.com/r/Marvel/comments/14otc3t/hank_pym_is_a_really_humble_guy_the_mighty/jqf27xy/
https://www.reddit.com/r/math/comments/14p1lkg/from_the_perspective_of_you_mathematicians_what/jqgug4q/
https://www.reddit.com/r/Wordpress/comments/14okx06/help_looking_for_a_specific_plugin_for_booking/jqhwtu5/
https://www.reddit.com/r/osr/comments/13u8g7s/difference_between_whitebox_whitehack/jlzhthi/
...

关键词和社区链接

爬虫工具支持在特定社区中按关键词搜索。为此,需要在查询中指定关键词,空格后跟社区链接。示例:

jesus https://www.reddit.com/r/atheism/
stage 3 https://www.reddit.com/r/Audi/

默认结果将输出帖子链接列表,例如:

https://www.reddit.com/r/atheism/comments/14dp1rv/sen_josh_hawley_shares_his_mindblowingly_stupid/jor20zd/
https://www.reddit.com/r/atheism/comments/14kt69e/why_do_my_christian_friends_view_my_atheism_as_an/jpsgbe5/
https://www.reddit.com/r/atheism/comments/14p6yir/finally_happened_the_one_babysitter_we_can_get/jqhk48s/
https://www.reddit.com/r/Audi/comments/14nyn9m/excuse_me_we_late/jqbdu2a/
https://www.reddit.com/r/Audi/comments/14oqxce/talk_me_inout_of_buying_this_gorgeous_audi_s5/jqev0p6/
https://www.reddit.com/r/Audi/comments/14pqr8a/is_this_a_good_deal_in_your_guys_opinions/jql4wnb/
...

结果输出选项

A-Parser 支持通过内置的 Template Toolkit 模板引擎灵活格式化结果,这使其能够以任意形式以及结构化形式(如 CSV 或 JSON)输出结果。

可用设置

参数默认值描述
Pages count5搜索结果页数
SortRelevance结果排序方式