跳转到主要内容

Social::Instagram::Geo - 指定位置的 Instagram 帖子爬虫工具

Social::Instagram::Geo

爬虫工具概览

Social::Instagram::GeoSocial::Instagram::Geo – 抓取指定位置的 Instagram 帖子。支持对用户帖子数据进行大规模抓取。采集的数据包括链接、坐标、电话、地理位置名称等。完整的数据采集列表请参阅相应章节。

A-Parser 的功能允许保存 Social::Instagram::Geo 爬虫工具的抓取设置以便后续使用(预设),设置数据抓取计划等等。

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

备注

该爬虫工具使用已授权账号的数据。 要使爬虫工具正常工作,必须为 cookie 选项指定值。类似于爬虫工具 Social::Instagram::Profile.

采集的数据

  • 地点标识符
  • 地理位置名称
  • 电话
  • 网站链接
  • 类别
  • 坐标
  • 地址
  • 城市
  • 电话
  • 邮政编码
  • 帖子数组
    • 帖子类型
    • 帖子链接
    • 文本
    • 发布日期
    • 评论数量
    • 点赞数量
    • 图标链接
    • 高度和宽度

应用场景

  • 按地理位置采集帖子

查询

查询时需要指定地理位置链接,例如:

https://www.instagram.com/explore/locations/105682735212415/NYC/  
https://www.instagram.com/explore/locations/212898659/kyiv-ukraine/

结果输出示例

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

默认输出

结果格式:

$query: $name\n$posts.format('$link\n')

结果示例:

https://www.instagram.com/explore/locations/105682735212415/NYC/: NYC
https://www.instagram.com/p/CsGvZ-JuFFp/
https://www.instagram.com/p/CsEJfGoOexN/
https://www.instagram.com/p/CsG2dg0LLpT/
https://www.instagram.com/p/CsB426FsFbw/
https://www.instagram.com/p/Cr94CYAuann/
https://www.instagram.com/p/CsFaRsYNsJx/
https://www.instagram.com/p/CsEVuMJoTRs/
https://www.instagram.com/p/CsEeR40vmV4/
https://www.instagram.com/p/CsETicON20r/
https://www.instagram.com/p/CsDVVGEou9q/
https://www.instagram.com/p/Cr_BUIsO7oe/
https://www.instagram.com/p/CsEjjPUr5Pf/
https://www.instagram.com/p/CsA-wtXsENn/
https://www.instagram.com/p/CsD1EvfI2q4/
https://www.instagram.com/p/CsEMt7ANftu/
https://www.instagram.com/p/CsEU3zErxa0/
https://www.instagram.com/p/CsE06QWInBR/
https://www.instagram.com/p/CsEfqP6L4XS/
https://www.instagram.com/p/CsERmBExTT_/
https://www.instagram.com/p/CsFk2u9qQqI/
https://www.instagram.com/p/CsGNmE_u00b/

结果示例:

https://www.instagram.com/p/CsEJfGoOexN/
https://www.instagram.com/p/CsGvZ-JuFFp/
https://www.instagram.com/p/CsG2dg0LLpT/
https://www.instagram.com/p/CsB426FsFbw/
https://www.instagram.com/p/CsFaRsYNsJx/
https://www.instagram.com/p/Cr94CYAuann/
https://www.instagram.com/p/CsEVuMJoTRs/
https://www.instagram.com/p/CsEMt7ANftu/
https://www.instagram.com/p/CsEeR40vmV4/
https://www.instagram.com/p/CsETicON20r/
https://www.instagram.com/p/CsDorQsrsv0/
https://www.instagram.com/p/CsGNmE_u00b/
https://www.instagram.com/p/CsEjjPUr5Pf/
https://www.instagram.com/p/CsDVVGEou9q/
https://www.instagram.com/p/CsD1EvfI2q4/
https://www.instagram.com/p/Cr_BUIsO7oe/
https://www.instagram.com/p/CsEB_rKuuG2/
https://www.instagram.com/p/CsETXjsPu_s/
https://www.instagram.com/p/CsERBkMvLyq/
https://www.instagram.com/p/CsA-wtXsENn/
https://www.instagram.com/p/CsE06QWInBR/

可能的设置

参数默认值描述
cookie必须预先指定 Cookie
x-csrftoken可以指定 x-csrftoken(如有必要)
x-ig-app-id936619743392459可以指定 x-ig-app-id(如有必要)
Posts pages count1帖子页数
TypeRanked/Recent该选项允许选择结果类型 "热门" 或 "最新"