downace / instagram-php-scraper
v1.0.0-RC1
2018-06-24 06:28 UTC
Requires
- php: >=5.6.0
- ext-json: *
- phpfastcache/phpfastcache: 5.0.*
Requires (Dev)
- phpunit/phpunit: 5.5.*
Suggests
- guzzlehttp/guzzle: HTTP client
- mashape/unirest-php: HTTP client
- dev-master
- v1.0.0-RC1
- 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
- dev-http-agnostic
This package is auto-updated.
Last update: 2020-02-17 10:39:11 UTC
README
此包已被弃用。请使用原始的 postaddictme/instagram-php-scraper
这是 postaddictme/instagram-php-scraper
仓库的分支。原描述
这个库基于Instagram网页版。我们开发它是因为现在很难获得Instagram应用的批准。目的是支持网页桌面和移动版本支持的所有功能。
分支信息
此分支提供了指定自定义HTTP客户端来处理请求的能力。包括 guzzlehttp/guzzle
和 mashape/unirest-php
客户端。
此外,已从 Instagram
类中删除代理方法:代理应配置为HTTP客户端(遵循分离关注点原则)
安装
使用composer
composer require downace/instagram-php-scraper
如果您没有composer
您可以从这里下载它 这里。
示例
您可以在这里看到原始库的使用示例。
使用Unirest(需要 mashape/unirest-php
)
$insta = new Instagram(new \InstagramScraper\HttpClient\UnirestClient());
使用Guzzle(需要 guzzlehttp/guzzle
)
// \GuzzleHttp\Client with default options will be used $insta = new Instagram(new \InstagramScraper\HttpClient\GuzzleClient()); // You can provide options for \GuzzleHttp\Client constructor $insta = new Instagram(new \InstagramScraper\HttpClient\GuzzleClient([ 'timeout' => 5 ])); // Or pass your own instance of \GuzzleHttp\ClientInterface: $insta = new Instagram(new \InstagramScraper\HttpClient\GuzzleClient($myClient));
使用代理
// With Guzzle. $insta = new Instagram(new \InstagramScraper\HttpClient\GuzzleClient([ 'proxy' => 'http://user:pass@localhost:8125' ])); // With Unirest Request::proxy('localhost', 8125, CURLPROXY_HTTP); Request::proxyAuth('user', 'pass'); $insta = new Instagram(new \InstagramScraper\HttpClient\UnirestClient());