smochin/instagram-php-crawler

Instagram的简单PHP爬虫

1.0.1 2018-03-14 18:34 UTC

This package is auto-updated.

Last update: 2024-09-07 19:18:34 UTC


README

Join the chat at https://gitter.im/smochin/instagram-php-crawler Total Downloads Latest Stable Version Branch master Build Status

Instagram的简单PHP爬虫。

安装

此包可在Packagist上获取,您可以使用Composer进行安装。

composer require smochin/instagram-php-crawler

依赖项

  • PHP 7
  • json 扩展
  • cURL 扩展

开始使用

初始化爬虫

$crawler = new Smochin\Instagram\Crawler();

获取最近标记的媒体列表

$media = $crawler->getMediaByTag('php');

获取给定位置的最近媒体列表

$media = $crawler->getMediaByLocation(225963881);

获取用户最近发布的媒体

$media = $crawler->getMediaByUser('instagram');

获取媒体信息

$media = $crawler->getMedia('0sR6OhmwCQ');

获取用户信息

$user = $crawler->getUser('jamersonweb');

获取位置信息

$location = $crawler->getLocation(225963881);

获取标签信息

$tag = $crawler->getTag('php');

搜索标签、位置和用户

$result = $crawler->search('recife');