robert-grubb/insta-scraper
Composer 安装命令:
composer require robert-grubb/insta-scraper
包简介
Instagram PHP Scraper. Get account information, photos and videos without any authorization
关键字:
README 文档
README
Credits to postaddictme/instagram-php-scraper for base
Installation
composer.phar require robert-grubb/insta-scraper
or
composer require robert-grubb/insta-scraper
Instantiation
use InstaScraper\Insta;
$Instagram = new Insta();
Documentation
For main package documentation: https://github.com/postaddictme/instagram-php-scraper
Fork Information
This fork includes the following:
-
getMediaWithTag()
- This method will find the first media with a specific tag.
-
Fixes getMedias issue (Because instagram removed the /media page)
- Now pulls from their timeline data via a graphql request, then grabs the data for each array item. (Increases load times, but not by much)
-
Better exceptions
- For better understand of what is actually happening when an error occurs, InstagramEncodedException is thrown. You can catch this exception and use
InstagramEncodedException->getDecodedMessage()that will return the following:
- For better understand of what is actually happening when an error occurs, InstagramEncodedException is thrown. You can catch this exception and use
[
[error] => true,
[error_code] => 404,
[error_reason] => 'User does not exist'
]
Getting a media item with specific hashtag:
use InstaScraper\Insta;
$Instagram = new Insta();
$post = $Instagram->getMediaWithTag('test', '#awesome');
var_dump($post); // Returns InstaScraper\Model\Media Object
统计信息
- 总下载量: 6.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-07