Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robertgrubb/insta-scraper
Updated php instagram scraper package.
https://github.com/robertgrubb/insta-scraper
instagram instagram-api instagram-scraper
Last synced: about 9 hours ago
JSON representation
Updated php instagram scraper package.
- Host: GitHub
- URL: https://github.com/robertgrubb/insta-scraper
- Owner: RobertGrubb
- Created: 2017-11-07T21:45:26.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-09T14:44:01.000Z (over 5 years ago)
- Last Synced: 2024-07-20T06:50:54.216Z (4 months ago)
- Topics: instagram, instagram-api, instagram-scraper
- Language: PHP
- Homepage:
- Size: 44.9 KB
- Stars: 8
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
Awesome Lists containing this project
README
## information
`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:```
[
[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
```