-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from postaddictme/master
Update from source
- Loading branch information
Showing
7 changed files
with
555 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
$instagram = new \InstagramScraper\Instagram(); | ||
$response = $instagram->getPaginateMedias('kevin'); | ||
|
||
foreach ($response['medias'] as $media) { | ||
/** @var \InstagramScraper\Model\Media $media */ | ||
|
||
echo "Media info:" . PHP_EOL; | ||
echo "Id: {$media->getId()}" . PHP_EOL; | ||
echo "Shotrcode: {$media->getShortCode()}" . PHP_EOL; | ||
echo "Created at: {$media->getCreatedTime()}" . PHP_EOL; | ||
echo "Caption: {$media->getCaption()}" . PHP_EOL; | ||
echo "Number of comments: {$media->getCommentsCount()}" . PHP_EOL; | ||
echo "Number of likes: {$media->getLikesCount()}" . PHP_EOL; | ||
echo "Get link: {$media->getLink()}" . PHP_EOL; | ||
echo "High resolution image: {$media->getImageHighResolutionUrl()}" . PHP_EOL; | ||
echo "Media type (video or image): {$media->getType()}" . PHP_EOL . PHP_EOL; | ||
$account = $media->getOwner(); | ||
|
||
echo "Account info:" . PHP_EOL; | ||
echo "Id: {$account->getId()}" . PHP_EOL; | ||
echo "Username: {$account->getUsername()}" . PHP_EOL; | ||
echo "Full name: {$account->getFullName()}" . PHP_EOL; | ||
echo "Profile pic url: {$account->getProfilePicUrl()}" . PHP_EOL; | ||
echo PHP_EOL . PHP_EOL; | ||
} | ||
|
||
echo "HasNextPage: {$response['hasNextPage']}" . PHP_EOL; | ||
echo "MaxId: {$response['maxId']}" . PHP_EOL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.