nassajis/instagram-php-scraper
Composer 安装命令:
composer require nassajis/instagram-php-scraper
包简介
Instagram PHP Scraper. Get account information, photos and videos without any authorization
README 文档
README
This is the fork of postaddictme/instagram-php-scraper repo.
Description from original:
This library based on Instagram web version. We develop it because nowadays it is hard to get approved Instagram application. The purpose support every feature that web desktop and mobile version support.
Code Example
$instagram = Instagram::withCredentials('username', 'password'); $instagram->login(); $account = $instagram->getAccountById(3); echo $account->getUsername();
Some methods do not require authentication:
$instagram = new Instagram(); $nonPrivateAccountMedias = $instagram->getMedias('kevin'); echo $nonPrivateAccountMedias[0]->getLink();
If you use authentication it is recommended to cache the user session. In this case you don't need to run the $instagram->login() method every time your program runs:
$instagram = Instagram::withCredentials('username', 'password', '/path/to/cache/folder/'); $instagram->login(); // will use cached session if you can force login $instagram->login(true) $account = $instagram->getAccountById(3); echo $account->getUsername();
Using proxy for requests:
$instagram = new Instagram(); Instagram::setProxy([ 'address' => '0.0.0.0', 'port' => '8080', 'tunnel' => true, 'timeout' => 30, ]); // Request with proxy $account = $instagram->getAccount('kevin'); Instagram::disableProxy(); // Request without proxy $account = $instagram->getAccount('kevin');
Installation
Using composer
composer.phar require nassajis/instagram-php-scraper
or
composer require nassajis/instagram-php-scraper
If you don't have composer
You can download it here.
Examples
See examples here.
统计信息
- 总下载量: 95
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-13