lunoxis/instagram
Composer 安装命令:
composer require lunoxis/instagram
包简介
This library is based on the Instagram web version. We develop it because nowadays it is hard to get an approved Instagram application. The purpose is to support every feature that the web desktop and mobile version support
README 文档
README
This is a simple library for extracting media from Instagram.
Dependencies
- PHP >= 8.0.6
Login Example
require __DIR__.'/vendor/autoload.php'; $ig = new Instagram\Login\Instagram('Username', 'Pass'); $cooki = $ig->login(); $session = new \Instagram\Login\Session(); print_r($session->SetSession($cooki->getCookieByName('rur')->getValue(),$cooki->getCookieByName('csrftoken')->getValue(),$cooki->getCookieByName('sessionid')->getValue(),$cooki->getCookieByName('ds_user_id')->getValue()));
Get Post Media By Link:
require __DIR__.'/vendor/autoload.php'; $media = new \Instagram\Media\Post('https://www.instagram.com/p/CfJec1mMLie/?igshid=YmMyMTA2M2Y='); print_r( $media->GetPost());
Get Account Info By Username
require __DIR__.'/vendor/autoload.php'; $info = new \Instagram\Media\Info('click.ir'); Get All Info print_r($info->GetInfo()); Get Info echo $info->GetInfo()[0]['username'];
Get Story By Story Link
require __DIR__.'/vendor/autoload.php'; $story = new \Instagram\Media\Story('https://instagram.com/stories/pcgadjettv/2868234876450457114?igshid=MDJmNzVkMjY='); echo $story->GetLink();
Get All Story By Username
require __DIR__.'/vendor/autoload.php'; $story = new \Instagram\Media\AllStory('click.ir'); print_r( $story->GetLink()); echo $story->MediaCount();
Get HighLight BY HighLight Link
require __DIR__.'/vendor/autoload.php'; $high = new \Instagram\Media\HighLight('https://www.instagram.com/s/aGlnaGxpZ2h0OjE3OTI5NjQ4NzIzOTAyNjMy?story_media_id=2768449635828641458_7247131961&igshid=YmMyMTA2M2Y='); echo $high->GetLink();
Get All HighLight BY Username
require __DIR__.'/vendor/autoload.php'; $all = new \Instagram\Media\AllHighLight(); $all->GetAllHighLight('click.ir'); print_r($all->GetHighLight()); Download HighLight BY HighLight ID $all->GetHighLightmedia('highlight:17917690438338215'); print_r($all->HighLightLink());
Installation
Using composer
composer.phar require lunoxis/instagram
or
composer require lunoxis/instagram
If you don't have composer
You can download it here.
统计信息
- 总下载量: 116
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-06-26