minseong4556 / instagram-php-scraper
Instagram PHP Scraper。获取账户信息、照片和视频,无需任何授权
v0.9.0
2019-10-26 13:08 UTC
Requires
- php: >=5.4.0
- ext-curl: *
- ext-json: *
- mashape/unirest-php: 3.0.*
- psr/simple-cache: ~1.0
Requires (Dev)
- phpfastcache/phpfastcache: ^7.1
- phpunit/phpunit: 5.5.*
- dev-master
- v0.9.0
- v0.8.35
- v0.8.34
- v0.8.33
- v0.8.32
- v0.8.31
- v0.8.30
- v0.8.29
- v0.8.28
- v0.8.27
- v0.8.26
- v0.8.25
- v0.8.24
- v0.8.23
- v0.8.22
- v0.8.21
- v0.8.20
- v0.8.19
- v0.8.18
- v0.8.17
- v0.8.16
- v0.8.15
- v0.8.14
- v0.8.13
- v0.8.12
- v0.8.11
- v0.8.10
- v0.8.9
- v0.8.8
- v0.8.7
- v0.8.6
- v0.8.5
- v0.8.4
- v0.8.3
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.1
- v0.6.0
- v0.5.9
- v0.5.8
- v0.5.7
- v0.5.6
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.8
- v0.4.7
- v0.4.6
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.5
- v0.3.4
- 0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
This package is auto-updated.
Last update: 2024-09-04 18:34:41 UTC
README
这个库基于Instagram网页版。我们开发它是因为现在很难获得批准的Instagram应用程序。目的是支持网页桌面版和移动版支持的所有功能。
依赖项
代码示例
$instagram = Instagram::withCredentials('username', 'password'); $instagram->login(); $account = $instagram->getAccountById(3); echo $account->getUsername();
某些方法不需要身份验证
$instagram = new Instagram(); $nonPrivateAccountMedias = $instagram->getMedias('kevin'); echo $nonPrivateAccountMedias[0]->getLink();
如果你使用身份验证,建议缓存用户会话。在这种情况下,你不需要每次程序运行时都运行 $instagram->login()
方法
use Phpfastcache\Helper\Psr16Adapter; $instagram = Instagram::withCredentials('username', 'password', new Psr16Adapter('Files')); $instagram->login(); // will use cached session if you can force login $instagram->login(true) $account = $instagram->getAccountById(3); echo $account->getUsername();
使用代理请求
$instagram = new Instagram(); Instagram::setProxy([ 'address' => '111.112.113.114', 'port' => '8080', 'tunnel' => true, 'timeout' => 30, ]); // Request with proxy $account = $instagram->getAccount('kevin'); Instagram::disableProxy(); // Request without proxy $account = $instagram->getAccount('kevin');
安装
使用composer
composer.phar require raiym/instagram-php-scraper
或
composer require raiym/instagram-php-scraper
如果你没有composer
你可以从这里下载它 这里。
示例
查看示例 这里。
其他
Java库: https://github.com/postaddictme/instagram-java-scraper