From c5e89a7779705ab7639e48644154d3b27dbef64e Mon Sep 17 00:00:00 2001 From: shixuesen Date: Mon, 11 Sep 2023 22:37:50 +0800 Subject: [PATCH] add other code --- app/Console/Commands/AcfunScrape.php | 145 +- app/Console/Commands/BiliVideoCode.php | 2 +- app/Console/Commands/CommonTest.php | 191 +- app/Console/Commands/FfmpegCommand.php | 21 +- app/Console/Commands/FileUtilCommand.php | 268 +- app/Console/Commands/InstagramScrape.php | 156 +- app/Console/Commands/RenameTest.php | 121 +- app/Console/Commands/TestCommand.php | 776 ++- .../Controllers/GooglePhotoController.php | 933 ++-- app/Http/Controllers/WeiboController.php | 347 +- app/Services/AcfunService.php | 559 +- app/Services/BilibiliServiceV2.php | 20 +- app/Services/FfmpegService.php | 732 +-- app/Services/FileService.php | 578 +- app/Services/InstagramService.php | 4819 ++++++++--------- app/Services/RenameService.php | 390 +- app/Services/WeiboService.php | 26 +- app/Utils/helper.php | 244 +- fail.log | 23 + 19 files changed, 5333 insertions(+), 5018 deletions(-) diff --git a/app/Console/Commands/AcfunScrape.php b/app/Console/Commands/AcfunScrape.php index e5c2451..f3f6f38 100644 --- a/app/Console/Commands/AcfunScrape.php +++ b/app/Console/Commands/AcfunScrape.php @@ -5,79 +5,82 @@ namespace App\Console\Commands; use App\Services\AcfunService; use Illuminate\Console\Command; -class AcfunScrape extends Command -{ - /** - * The name and signature of the console command. - * - * @var string - */ - protected $signature = 'acfun:scrape'; +class AcfunScrape extends Command { + /** + * The name and signature of the console command. + * + * @var string + */ + protected $signature = 'acfun:scrape'; - /** - * The console command description. - * - * @var string - */ - protected $description = 'Command description'; + /** + * The console command description. + * + * @var string + */ + protected $description = 'Command description'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } + /** + * Create a new command instance. + * + * @return void + */ + public function __construct() { + parent::__construct(); + } - /** - * Execute the console command. - * - * @return mixed - */ - public function handle() - { - // 几兔灰 10703951 - // 香菜猫饼 4537972 - // 小清晨儿 2277346 - // kyokyo 13215999 - // 苏子怡 13651121 - $service = new AcfunService(); - $upItems = [ -// 10703951 => "几兔灰", -// 4537972 => "香菜猫饼", -// 2277346 => "小清晨儿", -// 13215999 => "kyokyo", -// 13651121 => "苏子怡", -// 3540234 => "雾奈奈-", -// 826046 => "Sakuya十六", -// 16146427 => "椰汁兔", -// 36414290 => "你的清清呀", - 44328882 => "cc君辣", - 41347405 => "香波妖精 Gikiki", - 66565394 => "舞小喵 w", - 11039293 => "未南o_o", - 3339658 => "阿呆每天都不想动", - 16380981 => "李礼礼可欣", - 36132015 => "白杨Flora", - 50396965 => "白掌柜Nicole鹿", - 12892608 => "可心喵", - 70864147 => "凛凛苏Sue", - 1702633 => "扛扛扛扛扛", - 71421930 => "慕慕有奶糖", - 71075628 => "大保健" - // 14047168 => "特喵冲冲" - ]; - $service = new AcfunService(); - // 不用了 $service->requestUpPageApi(10703951);exit; - foreach ($upItems as $upId => $upName) { - $service->queryUpUsersVideos($upId, $upName); - echo "$upId, $upName \n"; - } + /** + * Execute the console command. + * + * @return mixed + */ + public function handle() { + // 几兔灰 10703951 + // 香菜猫饼 4537972 + // 小清晨儿 2277346 + // kyokyo 13215999 + // 苏子怡 13651121 + $service = new AcfunService(); + $upItems = [ + 10703951 => "几兔灰", + 4537972 => "香菜猫饼", + 2277346 => "小清晨儿", + 13215999 => "kyokyo", + 13651121 => "苏子怡", + 3540234 => "雾奈奈-", + 826046 => "Sakuya十六", + 16146427 => "椰汁兔", + 36414290 => "你的清清呀", + 44328882 => "cc君辣", + 41347405 => "香波妖精 Gikiki", + 66565394 => "舞小喵 w", + 11039293 => "未南o_o", + 3339658 => "阿呆每天都不想动", + 16380981 => "李礼礼可欣", + 36132015 => "白杨Flora", + 50396965 => "白掌柜Nicole鹿", + 12892608 => "可心喵", + 70864147 => "凛凛苏Sue", + 1702633 => "扛扛扛扛扛", + 71421930 => "慕慕有奶糖", + 71075628 => "大保健", + 7986705 => "岚西阿喵", + 4189643 => "希曦_嘻嘻", + 23537620 => "雨乃乃-", + 32485245 => "郁小漓", + 1075162 => "ParmyAU", + + // 14047168 => "特喵冲冲" + ]; + $service = new AcfunService(); + // 不用了 $service->requestUpPageApi(10703951);exit; + foreach ($upItems as $upId => $upName) { + $service->queryUpUsersVideos($upId, $upName); + echo "$upId, $upName \n"; + } // dump("here"); - $service->queryCollectionVideos(); - $service->downloadVideo(); - // - } + $service->queryCollectionVideos(); + $service->downloadVideo(); + // + } } diff --git a/app/Console/Commands/BiliVideoCode.php b/app/Console/Commands/BiliVideoCode.php index 56a087c..5e57053 100644 --- a/app/Console/Commands/BiliVideoCode.php +++ b/app/Console/Commands/BiliVideoCode.php @@ -52,7 +52,7 @@ class BiliVideoCode extends Command // $bilibili->queryPlayList(); // $bilibili->downloadDynamics();exit; $bilibili->queryUpVideoList(10278125); - exit; +// exit; // $bilibili->queryDBCollectionList(); // dump($bilibili->requestVideoParts("33483603"));exit; diff --git a/app/Console/Commands/CommonTest.php b/app/Console/Commands/CommonTest.php index 8ea4424..26a8a7e 100644 --- a/app/Console/Commands/CommonTest.php +++ b/app/Console/Commands/CommonTest.php @@ -2,7 +2,6 @@ namespace App\Console\Commands; -use App\BilibiliVideos; use App\Services\CommonScrapeService; use App\Services\FfmpegService; use App\Services\FileService; @@ -12,112 +11,108 @@ use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Redis; -class CommonTest extends Command -{ - /** - * The name and signature of the console command. - * - * @var string - */ - protected $signature = 'common:test {path} {needDeleteAfterEncode=0} {needDeleteExistFiles=0}'; +class CommonTest extends Command { + /** + * The name and signature of the console command. + * + * @var string + */ + protected $signature = 'common:test {path} {needDeleteAfterEncode=0} {needDeleteExistFiles=0}'; - /** - * The console command description. - * - * @var string - */ - protected $description = 'Command description'; + /** + * The console command description. + * + * @var string + */ + protected $description = 'Command description'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } + /** + * Create a new command instance. + * + * @return void + */ + public function __construct() { + parent::__construct(); + } - /** - * Execute the console command. - * - * @return mixed - */ - public function handle() - { + /** + * Execute the console command. + * + * @return mixed + */ + public function handle() { // $arr1 = ["1000398462711009", "1000397316040213", "1000397154360946", "1000396023160142", "1000395772280868", "1000395770310607", "1000395764440447", "1000395749580620", "1000395737520585", "1000395728560369", "1000395665220010", "1000395182810260", "1000394432460475", "1000394082540135", "1000393949210659", "1000393948320985", "1000393888830044", "1000393887300041", "1000393885280607", "1000393871140899", "1000393874640278", "1000393855970088", "1000393851410761", "1000393851900113", "1000393224970230", "1000392769900267", "1000392752170065", "1000392399360563", "1000392336010495", "1000391730910775", "1000391657490475", "1000391640370731", "1000391642761007", "1000391642000760", "1000391635890577", "1000391534950041", "1000391634700625", "1000390226671010", "1000390217300827", "1000390196650608", "1000389960200187", "1000389892150216", "1000389873050304", "1000389860050560", "1000389066380090", "1000388971640050", "1000388604110777", "1000386518600752", "1000386387290405", "1000386350990489", "1000385646770495", "1000385647880305", "1000385599900591", "1000384981270190", "1000384610280911", "1000384278210040", "1000384277620018", "1000384247600248", "1000382954660496", "1000382532630959", "1000381279730287", "1000381023770185", "1000380679170566", "1000380672770752", "1000380605780918", "1000380540660479", "1000380533990236", "1000380334400447", "1000379619570140", "1000379614130566", "1000379614040540", "1000379215150342", "1000379091960012", "1000379074410600", "1000378356270974", "1000377413180060", "1000376937170982", "1000376930380927", "1000376796550520", "1000376729180951", "1000376495050278", "1000376488990545", "1000376424360895", "1000376418180325", "1000376355280244", "1000376331720057", "1000376319830884", "1000376289680850", "1000376272300030", "1000376268510358", "1000376264200636", "1000376257300865", "1000376246250787", "1000376254330018", "1000376249100938", "1000376241740589", "1000376243310981", "1000373103330115", "1000373091720141", "1000372327880350", "1000372308880571", "1000371971740555", "1000371974820428", "1000371689930846", "1000371579070071", "1000371563620745", "1000371554570402", "1000371481560879", "1000371475020722", "1000371466340092", "1000371453600533", "1000369063970626", "1000366941120287", "1000366794650511", "1000365341530899", "1000365306821015", "1000365256300575", "1000365228570858", "1000365040240113", "1000365012940938", "1000364956400772", "1000364956320093", "1000363533710154", "1000363307810125", "1000363070700309", "1000362170460175", "1000361917100540", "1000361906230502", "1000360007910474", "1000358747340754", "1000358712490262", "1000357888860566", "1000357425070691", "1000356422140612", "1000356302620386", "1000355737570354", "1000355147140013", "1000354832970013", "1000354400470672", "1000353260280322", "1000351325270526", "1000350815860700", "1000350813490531", "1000350587970769", "1000349348390725", "1000349022010513", "1000349014580575", "1000349013640320", "1000349012450116", "1000348857240827", "1000348818640454", "1000348611290804", "1000348585820675", "1000348588311008", "1000348584690761", "1000347836120187", "1000347617870576", "1000347398090398", "1000347392920992", "1000347387441022", "1000347002640251", "1000346990740282", "1000346413890381", "1000344947980340", "1000344617350545", "1000344188190025", "1000343800140622", "1000343586320054", "1000343478560283", "1000342755320256", "1000342101050886", "1000341761540534", "1000341745850267", "1000341707650664", "1000341649590430", "1000341581200218", "1000340897200429", "1000340225390161", "1000340210240271", "1000340185230923", "1000339820960457", "1000339820620635", "1000339657220642", "1000337908920684", "1000337755340334", "1000337585970778", "1000337573320409", "1000337312630389", "1000337122880852", "1000336602460156", "1000336437950786", "1000336413750819", "1000336355660485", "1000336343370928", "1000336336050974", "1000336166760797", "1000336165240704", "1000336124660853", "1000336092470065", "1000335536671014", "1000335496510188", "1000335499320977", "1000335492530115", "1000334072850532", "1000333783220684", "1000333520980286", "1000333516660727", "1000333427810435", "1000333052870950", "1000333048420924", "1000333042781017", "1000332771920138", "1000332664440816", "1000332653190685", "1000332650070198", "1000332632520675", "1000332616220167", "1000332477820676", "1000332423530625", "1000332336120670", "1000332222510402", "1000332061440784", "1000331975180152", "1000331937040339", "1000331919970321", "1000331897840036", "1000331168740913", "1000330966850836", "1000330828500784", "1000330802650358", "1000330747650108", "1000330723350451", "1000330607101003", "1000330571090106", "1000330563440837", "1000330441080975", "1000330356930957", "1000330131000467", "1000330028860845", "1000329681940301", "1000329660800951", "1000329434560308", "1000328857020065", "1000328748831004", "1000328725400248", "1000328716210870", "1000328714720971", "1000328686190947", "1000328098700915", "1000328098170730", "1000328087760350", "1000327998090127", "1000327763400924", "1000327615610312", "1000327608040816", "1000327453810946", "1000327427980817", "1000327414840120", "1000327407070970", "1000327388480390", "1000327377500428", "1000327365210430", "1000326955760600", "1000326375120864", "1000326216760306", "1000325928750643", "1000325910370888", "1000325745740781", "1000325746820920", "1000325740490009", "1000325727990867", "1000325727690141", "1000325611430403", "1000325610970357", "1000325596850453", "1000325428240341", "1000325172930127", "1000325150400309", "1000325139020730", "1000325135890788", "1000325055760878", "1000324930970035", "1000324920620346", "1000324858590867", "1000324847460664", "1000324806500388", "1000324795110865", "1000324778670927", "1000324774250007", "1000324764620285", "1000324764490086", "1000324758750153", "1000324758200042", "1000324757330842", "1000324742080778", "1000324193430875", "1000323972800352", "1000323935020891", "1000323930320707", "1000323929510070", "1000323929380269", "1000323019800989", "1000323012360777", "1000322709290450", "1000322356850841", "1000322116570089", "1000322117720057", "1000322037960204", "1000321977610883", "1000321957370404", "1000321757820686", "1000321752290496", "1000321745370508", "1000321357910480", "1000321340830008", "1000321105270820", "1000320741420901", "1000320729200334", "1000320037480149", "1000319981251017", "1000319981210441", "1000319599030866", "1000319589220819", "1000319575980604", "1000319569360703", "1000319549330298", "1000319529350747", "1000319423160242", "1000319306580056", "1000319172720472", "1000318965720531", "1000318839880424", "1000318833450317", "1000318738110263", "1000318680230168", "1000317948180361", "1000317873320642", "1000317774980950", "1000317346160658", "1000317185540243", "1000317171490612", "1000317173870624", "1000317172290373", "1000317080480791", "1000316974680096", "1000316899380256", "1000316866680714", "1000316497340862", "1000316070060650", "1000316029910058", "1000316008100945", "1000316012320482", "1000316004200271", "1000316003710486", "1000315998070788", "1000316001850467", "1000315997120100", "1000315994830218", "1000315559390978", "1000315557560742", "1000314011560407", "1000314012370436", "1000313900600214", "1000313848920798", "1000313820910583", "1000313765520910", "1000313653940800", "1000313645470777", "1000313312840115", "1000312804210130", "1000312804190130", "1000312756080480", "1000312677620482", "1000312644980847", "1000312537240130", "1000312529570990", "1000312501620040", "1000312317880890", "1000312176430762", "1000312168820522", "1000312149570004", "1000312152670606", "1000312139470607", "1000312131180297", "1000311806950954", "1000311733420586", "1000311526460136", "1000311396590979", "1000311396860732", "1000311387180790", "1000311386070687", "1000311385660769", "1000311205250538", "1000311202560165", "1000311047430594", "1000310846480244", "1000310699560253", "1000310465770313", "1000310455180503", "1000310454140525", "1000310450300556", "1000310444480098", "1000310287770046", "1000310219810246", "1000308853781000", "1000308774260863", "1000308741520705", "1000308701090931", "1000308699860426", "1000308673520628", "1000308662840613", "1000308603400259", "1000307552060092", "1000307189010337", "1000307138370342", "1000307072360525", "1000307057210066", "1000306987910164", "1000306986350443", "1000306979120002"]; -// $arr2 = ["1000306979120002", "1000306986350443", "1000306987910164", "1000307057210066", "1000307138370342", "1000307189010337", "1000307552060092", "1000308662840613", "1000308673520628", "1000308699860426", "1000308701090931", "1000308741520705", "1000308774260863", "1000308853781000", "1000310450300556", "1000310455180503", "1000310465770313", "1000310699560253", "1000310846480244", "1000311047430594", "1000311202560165", "1000311205250538", "1000311386070687", "1000311387180790", "1000311396860732", "1000311396590979", "1000311733420586", "1000311806950954", "1000312131180297", "1000312152670606", "1000312149570004", "1000312168820522", "1000312176430762", "1000312501620040", "1000312529570990", "1000312537240130", "1000312644980847", "1000312756080480", "1000312804190130", "1000313312840115", "1000313645470777", "1000313765520910", "1000313820910583", "1000313848920798", "1000313900600214", "1000314012370436", "1000314011560407", "1000315557560742", "1000315559390978", "1000315997120100", "1000316001850467", "1000315998070788", "1000316003710486", "1000316004200271", "1000316012320482", "1000316029910058", "1000316497340862", "1000316866680714", "1000316899380256", "1000316974680096", "1000317080480791", "1000317172290373", "1000317173870624", "1000317171490612", "1000317185540243", "1000317346160658", "1000317774980950", "1000317873320642", "1000317948180361", "1000318680230168", "1000318833450317", "1000318839880424", "1000318965720531", "1000319172720472", "1000319306580056", "1000319423160242", "1000319529350747", "1000319549330298", "1000319569360703", "1000319575980604", "1000319589220819", "1000319599030866", "1000319981210441", "1000320729200334", "1000320741420901", "1000321105270820", "1000321340830008", "1000321745370508", "1000321752290496", "1000321757820686", "1000321957370404", "1000322037960204", "1000322117720057", "1000322356850841", "1000323012360777", "1000323019800989", "1000323929380269", "1000323929510070", "1000323930320707", "1000323935020891", "1000323972800352", "1000324742080778", "1000324757330842", "1000324758200042", "1000324758750153", "1000324764490086", "1000324764620285", "1000324774250007", "1000324778670927", "1000324795110865", "1000324806500388", "1000324858590867", "1000324930970035", "1000325055760878", "1000325139020730", "1000325172930127", "1000325596850453", "1000325610970357", "1000325727690141", "1000325727990867", "1000325740490009", "1000325746820920", "1000325745740781", "1000325910370888", "1000325928750643", "1000326216760306", "1000326375120864", "1000326955760600", "1000327365210430", "1000327377500428", "1000327388480390", "1000327407070970", "1000327414840120", "1000327427980817", "1000327453810946", "1000327608040816", "1000327615610312", "1000327763400924", "1000327998090127", "1000328087760350", "1000328098700915", "1000328686190947", "1000328716210870", "1000328725400248", "1000328748831004", "1000328857020065", "1000329434560308", "1000330028860845", "1000330131000467", "1000330356930957", "1000330441080975", "1000330563440837", "1000330607101003", "1000330747650108", "1000330802650358", "1000330828500784", "1000330966850836", "1000331168740913", "1000331897840036", "1000331937040339", "1000332061440784", "1000332222510402", "1000332477820676", "1000332616220167", "1000332632520675", "1000332650070198", "1000332653190685", "1000332664440816", "1000332771920138", "1000333042781017", "1000333048420924", "1000333052870950", "1000333427810435", "1000333516660727", "1000333520980286", "1000333783220684", "1000334072850532", "1000335492530115", "1000335499320977", "1000335496510188", "1000335536671014", "1000336092470065", "1000336124660853", "1000336165240704", "1000336336050974", "1000336343370928", "1000336413750819", "1000336437950786", "1000336602460156", "1000337122880852", "1000337312630389", "1000337585970778", "1000337908920684", "1000339657220642", "1000339820620635", "1000339820960457", "1000340185230923", "1000340210240271", "1000340225390161", "1000340897200429", "1000341581200218", "1000341649590430", "1000341707650664", "1000341745850267", "1000341761540534", "1000342101050886", "1000342755320256", "1000343478560283", "1000343586320054", "1000343800140622", "1000344617350545", "1000344947980340", "1000346413890381", "1000346990740282", "1000347002640251", "1000347387441022", "1000347392920992", "1000347398090398", "1000347617870576", "1000347836120187", "1000348584690761", "1000348588311008", "1000348585820675", "1000348611290804", "1000348818640454", "1000348857240827", "1000349012450116", "1000349013640320", "1000349014580575", "1000349022010513", "1000349348390725", "1000350587970769", "1000350813490531", "1000350815860700", "1000351325270526", "1000353260280322", "1000354832970013", "1000355737570354", "1000356302620386", "1000356422140612", "1000357425070691", "1000357888860566", "1000358712490262", "1000358747340754", "1000360007910474", "1000361906230502", "1000361917100540", "1000362170460175", "1000363070700309", "1000363307810125", "1000363533710154", "1000364956320093", "1000364956400772", "1000365012940938", "1000365040240113", "1000365228570858", "1000365256300575", "1000365306821015", "1000365341530899", "1000366794650511", "1000366941120287", "1000369063970626", "1000371453600533", "1000371466340092", "1000371475020722", "1000371481560879", "1000371554570402", "1000371563620745", "1000371579070071", "1000371689930846", "1000371974820428", "1000371971740555", "1000372308880571", "1000372327880350", "1000373091720141", "1000373103330115", "1000376243310981", "1000376241740589", "1000376249100938", "1000376254330018", "1000376246250787", "1000376257300865", "1000376264200636", "1000376268510358", "1000376272300030", "1000376289680850", "1000376319830884", "1000376355280244", "1000376418180325", "1000376488990545", "1000376495050278", "1000376729180951", "1000376796550520", "1000376930380927", "1000376937170982", "1000377413180060", "1000378356270974", "1000379074410600", "1000379091960012", "1000379215150342", "1000379614040540", "1000379614130566", "1000379619570140", "1000380533990236", "1000380540660479", "1000380605780918", "1000380672770752", "1000381023770185", "1000381279730287", "1000382532630959", "1000382954660496", "1000384247600248", "1000384277620018", "1000384278210040", "1000384610280911", "1000384981270190", "1000385599900591", "1000385647880305", "1000385646770495", "1000386350990489", "1000386387290405", "1000386518600752", "1000388604110777", "1000388971640050", "1000389066380090", "1000389860050560", "1000389892150216", "1000389960200187", "1000390217300827", "1000390226671010", "1000391534950041", "1000391635890577", "1000391642000760", "1000391642761007", "1000391640370731", "1000391657490475", "1000391730910775", "1000392336010495", "1000392399360563", "1000392752170065", "1000392769900267", "1000393224970230", "1000393851900113", "1000393851410761", "1000393855970088", "1000393874640278", "1000393871140899", "1000393885280607", "1000393887300041", "1000393888830044", "1000393948320985", "1000393949210659", "1000394082540135", "1000394432460475", "1000395182810260", "1000395665220010", "1000395728560369", "1000395737520585", "1000395749580620", "1000395770310607", "1000395772280868", "1000396023160142", "1000397154360946", "1000397316040213"]; -// dump(json_encode(array_values(array_diff($arr1, $arr2))));exit; -// $fileService = new FileService(); -// $fileService->compareLocalFilesAndGooglePhotoFiles();exit; + // $arr2 = ["1000306979120002", "1000306986350443", "1000306987910164", "1000307057210066", "1000307138370342", "1000307189010337", "1000307552060092", "1000308662840613", "1000308673520628", "1000308699860426", "1000308701090931", "1000308741520705", "1000308774260863", "1000308853781000", "1000310450300556", "1000310455180503", "1000310465770313", "1000310699560253", "1000310846480244", "1000311047430594", "1000311202560165", "1000311205250538", "1000311386070687", "1000311387180790", "1000311396860732", "1000311396590979", "1000311733420586", "1000311806950954", "1000312131180297", "1000312152670606", "1000312149570004", "1000312168820522", "1000312176430762", "1000312501620040", "1000312529570990", "1000312537240130", "1000312644980847", "1000312756080480", "1000312804190130", "1000313312840115", "1000313645470777", "1000313765520910", "1000313820910583", "1000313848920798", "1000313900600214", "1000314012370436", "1000314011560407", "1000315557560742", "1000315559390978", "1000315997120100", "1000316001850467", "1000315998070788", "1000316003710486", "1000316004200271", "1000316012320482", "1000316029910058", "1000316497340862", "1000316866680714", "1000316899380256", "1000316974680096", "1000317080480791", "1000317172290373", "1000317173870624", "1000317171490612", "1000317185540243", "1000317346160658", "1000317774980950", "1000317873320642", "1000317948180361", "1000318680230168", "1000318833450317", "1000318839880424", "1000318965720531", "1000319172720472", "1000319306580056", "1000319423160242", "1000319529350747", "1000319549330298", "1000319569360703", "1000319575980604", "1000319589220819", "1000319599030866", "1000319981210441", "1000320729200334", "1000320741420901", "1000321105270820", "1000321340830008", "1000321745370508", "1000321752290496", "1000321757820686", "1000321957370404", "1000322037960204", "1000322117720057", "1000322356850841", "1000323012360777", "1000323019800989", "1000323929380269", "1000323929510070", "1000323930320707", "1000323935020891", "1000323972800352", "1000324742080778", "1000324757330842", "1000324758200042", "1000324758750153", "1000324764490086", "1000324764620285", "1000324774250007", "1000324778670927", "1000324795110865", "1000324806500388", "1000324858590867", "1000324930970035", "1000325055760878", "1000325139020730", "1000325172930127", "1000325596850453", "1000325610970357", "1000325727690141", "1000325727990867", "1000325740490009", "1000325746820920", "1000325745740781", "1000325910370888", "1000325928750643", "1000326216760306", "1000326375120864", "1000326955760600", "1000327365210430", "1000327377500428", "1000327388480390", "1000327407070970", "1000327414840120", "1000327427980817", "1000327453810946", "1000327608040816", "1000327615610312", "1000327763400924", "1000327998090127", "1000328087760350", "1000328098700915", "1000328686190947", "1000328716210870", "1000328725400248", "1000328748831004", "1000328857020065", "1000329434560308", "1000330028860845", "1000330131000467", "1000330356930957", "1000330441080975", "1000330563440837", "1000330607101003", "1000330747650108", "1000330802650358", "1000330828500784", "1000330966850836", "1000331168740913", "1000331897840036", "1000331937040339", "1000332061440784", "1000332222510402", "1000332477820676", "1000332616220167", "1000332632520675", "1000332650070198", "1000332653190685", "1000332664440816", "1000332771920138", "1000333042781017", "1000333048420924", "1000333052870950", "1000333427810435", "1000333516660727", "1000333520980286", "1000333783220684", "1000334072850532", "1000335492530115", "1000335499320977", "1000335496510188", "1000335536671014", "1000336092470065", "1000336124660853", "1000336165240704", "1000336336050974", "1000336343370928", "1000336413750819", "1000336437950786", "1000336602460156", "1000337122880852", "1000337312630389", "1000337585970778", "1000337908920684", "1000339657220642", "1000339820620635", "1000339820960457", "1000340185230923", "1000340210240271", "1000340225390161", "1000340897200429", "1000341581200218", "1000341649590430", "1000341707650664", "1000341745850267", "1000341761540534", "1000342101050886", "1000342755320256", "1000343478560283", "1000343586320054", "1000343800140622", "1000344617350545", "1000344947980340", "1000346413890381", "1000346990740282", "1000347002640251", "1000347387441022", "1000347392920992", "1000347398090398", "1000347617870576", "1000347836120187", "1000348584690761", "1000348588311008", "1000348585820675", "1000348611290804", "1000348818640454", "1000348857240827", "1000349012450116", "1000349013640320", "1000349014580575", "1000349022010513", "1000349348390725", "1000350587970769", "1000350813490531", "1000350815860700", "1000351325270526", "1000353260280322", "1000354832970013", "1000355737570354", "1000356302620386", "1000356422140612", "1000357425070691", "1000357888860566", "1000358712490262", "1000358747340754", "1000360007910474", "1000361906230502", "1000361917100540", "1000362170460175", "1000363070700309", "1000363307810125", "1000363533710154", "1000364956320093", "1000364956400772", "1000365012940938", "1000365040240113", "1000365228570858", "1000365256300575", "1000365306821015", "1000365341530899", "1000366794650511", "1000366941120287", "1000369063970626", "1000371453600533", "1000371466340092", "1000371475020722", "1000371481560879", "1000371554570402", "1000371563620745", "1000371579070071", "1000371689930846", "1000371974820428", "1000371971740555", "1000372308880571", "1000372327880350", "1000373091720141", "1000373103330115", "1000376243310981", "1000376241740589", "1000376249100938", "1000376254330018", "1000376246250787", "1000376257300865", "1000376264200636", "1000376268510358", "1000376272300030", "1000376289680850", "1000376319830884", "1000376355280244", "1000376418180325", "1000376488990545", "1000376495050278", "1000376729180951", "1000376796550520", "1000376930380927", "1000376937170982", "1000377413180060", "1000378356270974", "1000379074410600", "1000379091960012", "1000379215150342", "1000379614040540", "1000379614130566", "1000379619570140", "1000380533990236", "1000380540660479", "1000380605780918", "1000380672770752", "1000381023770185", "1000381279730287", "1000382532630959", "1000382954660496", "1000384247600248", "1000384277620018", "1000384278210040", "1000384610280911", "1000384981270190", "1000385599900591", "1000385647880305", "1000385646770495", "1000386350990489", "1000386387290405", "1000386518600752", "1000388604110777", "1000388971640050", "1000389066380090", "1000389860050560", "1000389892150216", "1000389960200187", "1000390217300827", "1000390226671010", "1000391534950041", "1000391635890577", "1000391642000760", "1000391642761007", "1000391640370731", "1000391657490475", "1000391730910775", "1000392336010495", "1000392399360563", "1000392752170065", "1000392769900267", "1000393224970230", "1000393851900113", "1000393851410761", "1000393855970088", "1000393874640278", "1000393871140899", "1000393885280607", "1000393887300041", "1000393888830044", "1000393948320985", "1000393949210659", "1000394082540135", "1000394432460475", "1000395182810260", "1000395665220010", "1000395728560369", "1000395737520585", "1000395749580620", "1000395770310607", "1000395772280868", "1000396023160142", "1000397154360946", "1000397316040213"]; + // dump(json_encode(array_values(array_diff($arr1, $arr2))));exit; + $fileService = new FileService(); + $fileService->compareLocalFilesAndGooglePhotoFiles();exit; // echo App::environment();exit; -// $list = BilibiliVideos::where("created_at", ">", "2021-09-09 00:00:00")->get(); -// dump($list[0]->getAttributes());exit; - date_default_timezone_set('PRC'); - $path = $this->argument("path"); - $service = new FfmpegService(); - $needDeleteAfterEncode = $this->argument("needDeleteAfterEncode"); - if (trim($needDeleteAfterEncode) == "1") { - $service->setNeedRemoveAfterEncode(true); - } - $needDeleteExistFiles = $this->argument("needDeleteExistFiles"); - if (trim($needDeleteExistFiles) == "1") { - $service->setNeedRemoveExistFiles(true); - } + // $list = BilibiliVideos::where("created_at", ">", "2021-09-09 00:00:00")->get(); + // dump($list[0]->getAttributes());exit; + date_default_timezone_set('PRC'); + $path = $this->argument("path"); + $service = new FfmpegService(); + $needDeleteAfterEncode = $this->argument("needDeleteAfterEncode"); + if (trim($needDeleteAfterEncode) == "1") { + $service->setNeedRemoveAfterEncode(true); + } + $needDeleteExistFiles = $this->argument("needDeleteExistFiles"); + if (trim($needDeleteExistFiles) == "1") { + $service->setNeedRemoveExistFiles(true); + } // $service->checkFileEncodeType();exit; - $service->processDir(trim($path));exit; - $cache = Cache::driver("redis"); - $cache->tags(["aaa", "bbb"])->put("key1", "value1"); - $cache->put("key2", "value2"); - exit; - $this->testAnnie();exit; - $commonScrapeService = new CommonScrapeService(); - $commonScrapeService->scrapeAlbum();exit; - dump(FileUtils::scanDuplicateDir("/Volumes/intel660p/image/xg/ycc"));exit; - $fileService = new FileService(); - $fileService->segmentFiles("/Volumes/Samsung/weibo/old_image"); - exit; + $service->processDir(trim($path));exit; + $cache = Cache::driver("redis"); + $cache->tags(["aaa", "bbb"])->put("key1", "value1"); + $cache->put("key2", "value2"); + exit; + $this->testAnnie();exit; + $commonScrapeService = new CommonScrapeService(); + $commonScrapeService->scrapeAlbum();exit; + dump(FileUtils::scanDuplicateDir("/Volumes/intel660p/image/xg/ycc"));exit; + $fileService = new FileService(); + $fileService->segmentFiles("/Volumes/Samsung/weibo/old_image"); + exit; // Redis::set("hello", "123"); - echo Redis::get("fullSet"); - exit; + echo Redis::get("fullSet"); + exit; - echo mb_strlen("霸气欣欣爷,内地画师,兼职推女神模特,毕业于广州美术学院国画系,自称广州沙画师彩绘师欣儿,一位猫咪爱好%E8");exit; - setlocale(LC_ALL,array('zh_CN.gbk','zh_CN.gb2312','zh_CN.gb18030')); - setlocale(LC_ALL, "zh_CN.UTF-8"); - $p1 = pathinfo('D:\\atlas\\这是文件夹\\可爱胖胖是怎么变帅的#超能陆战队.mp4'); - $p2 = pathinfo('D:\\atlas\\dirname\\sssss#ddddd.mp4'); + echo mb_strlen("霸气欣欣爷,内地画师,兼职推女神模特,毕业于广州美术学院国画系,自称广州沙画师彩绘师欣儿,一位猫咪爱好%E8");exit; + setlocale(LC_ALL, array('zh_CN.gbk', 'zh_CN.gb2312', 'zh_CN.gb18030')); + setlocale(LC_ALL, "zh_CN.UTF-8"); + $p1 = pathinfo('D:\\atlas\\这是文件夹\\可爱胖胖是怎么变帅的#超能陆战队.mp4'); + $p2 = pathinfo('D:\\atlas\\dirname\\sssss#ddddd.mp4'); - print_r($p1); - print_r($p2); - // - } + print_r($p1); + print_r($p2); + // + } - public function testAnnie() - { - $result = shell_exec("annie -i av417536178"); - echo $result; - preg_match_all("#\[(\d+)\]\s+-+\s+Quality:\s+[\S]+\s+720P#", $result, $match); - dump($match); - } + public function testAnnie() { + $result = shell_exec("annie -i av417536178"); + echo $result; + preg_match_all("#\[(\d+)\]\s+-+\s+Quality:\s+[\S]+\s+720P#", $result, $match); + dump($match); + } - /** - * 重命名因 handbrake 编码后自动添加数字的文件 - * @param $path - * @return bool - */ - public function renameHandBrakeRenamedFiles($path) { - $files = scandir($path); - foreach ($files as $file) { - if ($file == "." || $file == "..") { - continue; - } - preg_match_all("/(\s\d+)\.mp4/", $file, $matches); - if (array_key_exists(1, $matches) && array_key_exists(0, $matches[1])) { - $newFileName = str_replace($matches[0][0], ".mp4", $file); - rename($path . "/" . $file, $path . "/" . $newFileName); - // dump($path . "/" . $newFileName); - } - // dump($matches); - } - } + /** + * 重命名因 handbrake 编码后自动添加数字的文件 + * @param $path + * @return bool + */ + public function renameHandBrakeRenamedFiles($path) { + $files = scandir($path); + foreach ($files as $file) { + if ($file == "." || $file == "..") { + continue; + } + preg_match_all("/(\s\d+)\.mp4/", $file, $matches); + if (array_key_exists(1, $matches) && array_key_exists(0, $matches[1])) { + $newFileName = str_replace($matches[0][0], ".mp4", $file); + rename($path . "/" . $file, $path . "/" . $newFileName); + // dump($path . "/" . $newFileName); + } + // dump($matches); + } + } } diff --git a/app/Console/Commands/FfmpegCommand.php b/app/Console/Commands/FfmpegCommand.php index 39e27e9..b0ad384 100644 --- a/app/Console/Commands/FfmpegCommand.php +++ b/app/Console/Commands/FfmpegCommand.php @@ -3,6 +3,7 @@ namespace App\Console\Commands; use App\Jobs\BilibiliEncode; +use App\Services\FfmpegService; use Illuminate\Console\Command; class FfmpegCommand extends Command @@ -12,7 +13,7 @@ class FfmpegCommand extends Command * * @var string */ - protected $signature = 'ffmpeg:add'; + protected $signature = 'ffmpeg:process {path} {preset} {needDeleteAfterEncode=0} {needDeleteExistFiles=0}'; /** * The console command description. @@ -39,8 +40,22 @@ class FfmpegCommand extends Command public function handle() { // - for ($i = 0; $i < 100; $i++) { - BilibiliEncode::dispatch($i . "_bbbbbb")->allOnConnection('redis'); +// for ($i = 0; $i < 100; $i++) { +// BilibiliEncode::dispatch($i . "_bbbbbb")->allOnConnection('redis'); +// } + date_default_timezone_set('PRC'); + $path = $this->argument("path"); + $preset = $this->argument("preset"); + $service = new FfmpegService(); + $needDeleteAfterEncode = $this->argument("needDeleteAfterEncode"); + if (trim($needDeleteAfterEncode) == "1") { + $service->setNeedRemoveAfterEncode(true); } + $needDeleteExistFiles = $this->argument("needDeleteExistFiles"); + if (trim($needDeleteExistFiles) == "1") { + $service->setNeedRemoveExistFiles(true); + } + $service->setPreset(trim($preset)); + $service->processDir(trim($path));exit; } } diff --git a/app/Console/Commands/FileUtilCommand.php b/app/Console/Commands/FileUtilCommand.php index 1ad1adb..ddef978 100644 --- a/app/Console/Commands/FileUtilCommand.php +++ b/app/Console/Commands/FileUtilCommand.php @@ -2,139 +2,141 @@ namespace App\Console\Commands; -use App\Utils\FileUtils; use Illuminate\Console\Command; -class FileUtilCommand extends Command -{ - /** - * The name and signature of the console command. - * - * @var string - */ - protected $signature = 'file:test {path}'; - - /** - * The console command description. - * - * @var string - */ - protected $description = 'Command description'; - - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } - - /** - * Execute the console command. - * - * @return mixed - */ - public function handle() - { - // - $path = trim($this->argument("path")); - $list = scandir($path); - foreach ($list as $file) { - if ($file == "." || $file == "..") { - continue; - } - // echo strlen($file) . "\n"; - // continue; - if (strlen($file) > 100) { - $repeat = self::get_max_substring($file); - echo "repeat =============: " . $repeat . "\n"; - // continue; - if (strlen($repeat) > 10) { - $newName = $path . DIRECTORY_SEPARATOR . str_replace_first($repeat, "", $file); - if (!is_file($newName)) { - echo "old filename: $file rename to " . $newName . "\n"; - rename($path . DIRECTORY_SEPARATOR . $file, $path . DIRECTORY_SEPARATOR . str_replace_first($repeat, "", $file)); - } else { - echo $newName . "exists"; - } - // echo "$file \n rename to " . $newName . "\n"; - } - # code... - } - } - exit; - // FileUtils::listFiles($path); - $filename = "大忽悠丝袜第104弹-001-清纯空姐装油亮连裤袜学生美女换上油亮灰丝女警装户外换高跟凉鞋展示美腿-【成功案例第104弹续集】清纯空姐装油亮连裤袜学生美女换上油亮灰丝女警装户外换高跟凉鞋展示美腿-720p"; - - // $filename = "你好,世界.txt"; - $max_substring = self::get_max_substring($filename); - $newFile = str_replace_first($max_substring, "", $filename); - echo $newFile; // 输出 "world" - } - - function get_max_substring($filename) - { - $suffix_array = self::get_suffix_array($filename); - - $max_substring_length = 0; - $max_substring_index = 0; - - for ($i = 1; $i < count($suffix_array); $i++) { - $substring_length = self::get_common_prefix_length($suffix_array[$i - 1], $suffix_array[$i], $filename); - if ($substring_length > $max_substring_length) { - $max_substring_length = $substring_length; - $max_substring_index = $suffix_array[$i]; - } - } - - $max_substring = mb_substr($filename, $max_substring_index, $max_substring_length, 'UTF-8'); - - return $max_substring; - } - - function get_suffix_array($str) - { - $suffix_array = array(); - - for ($i = 0; $i < mb_strlen($str, 'UTF-8'); $i++) { - $suffix_array[] = $i; - } - - usort($suffix_array, function ($a, $b) use ($str) { - return strcmp(mb_substr($str, $a, null, 'UTF-8'), mb_substr($str, $b, null, 'UTF-8')); - }); - - return $suffix_array; - } - - function get_common_prefix_length($a, $b, $str) - { - $length = 0; - - while (isset($str[$a]) && isset($str[$b])) { - $char_a = mb_substr($str, $a, 1, 'UTF-8'); - $char_b = mb_substr($str, $b, 1, 'UTF-8'); - if ($char_a == $char_b) { - $length++; - $a++; - $b++; - } else if (self::is_chinese($char_a) && self::is_chinese($char_b)) { - $length++; - $a++; - $b++; - } else { - break; - } - } - - return $length; - } - - function is_chinese($char) - { - $pattern = '/[\x{4e00}-\x{9fa5}]/u'; - return preg_match($pattern, $char); - } +class FileUtilCommand extends Command { + /** + * The name and signature of the console command. + * + * @var string + */ + protected $signature = 'file:test {path}'; + + /** + * The console command description. + * + * @var string + */ + protected $description = 'Command description'; + + /** + * Create a new command instance. + * + * @return void + */ + public function __construct() { + parent::__construct(); + } + + /** + * Execute the console command. + * + * @return mixed + */ + public function handle() { + // + $path = trim($this->argument("path")); + $list = scandir($path); + foreach ($list as $file) { + if ($file == "." || $file == "..") { + continue; + } + echo strlen($file) . "\n"; + continue; + if (strlen($file) > 100) { + $repeat = self::get_max_substring($file); + echo "repeat =============: " . $repeat . "\n"; + // continue; + if (strlen($repeat) > 5) { + $newName = $path . DIRECTORY_SEPARATOR . self::str_lreplace($repeat, "", $file); + if (!is_file($newName)) { + echo "old filename: $file rename to " . $newName . "\n"; + rename($path . DIRECTORY_SEPARATOR . $file, $newName); + } else { + echo $newName . "exists"; + } + // echo "$file \n rename to " . $newName . "\n"; + } + # code... + } + } + exit; + // FileUtils::listFiles($path); + $filename = "大忽悠丝袜第104弹-001-清纯空姐装油亮连裤袜学生美女换上油亮灰丝女警装户外换高跟凉鞋展示美腿-【成功案例第104弹续集】清纯空姐装油亮连裤袜学生美女换上油亮灰丝女警装户外换高跟凉鞋展示美腿-720p"; + + // $filename = "你好,世界.txt"; + $max_substring = self::get_max_substring($filename); + $newFile = self::str_lreplace($max_substring, "", $filename); + echo $newFile; // 输出 "world" + } + + function str_lreplace($search, $replace, $subject) { + $pos = strrpos($subject, $search); + + if ($pos !== false) { + $subject = substr_replace($subject, $replace, $pos, strlen($search)); + } + + return $subject; + } + + function get_max_substring($filename) { + $suffix_array = self::get_suffix_array($filename); + + $max_substring_length = 0; + $max_substring_index = 0; + + for ($i = 1; $i < count($suffix_array); $i++) { + $substring_length = self::get_common_prefix_length($suffix_array[$i - 1], $suffix_array[$i], $filename); + if ($substring_length > $max_substring_length) { + $max_substring_length = $substring_length; + $max_substring_index = $suffix_array[$i]; + } + } + + $max_substring = mb_substr($filename, $max_substring_index, $max_substring_length, 'UTF-8'); + + return $max_substring; + } + + function get_suffix_array($str) { + $suffix_array = array(); + + for ($i = 0; $i < mb_strlen($str, 'UTF-8'); $i++) { + $suffix_array[] = $i; + } + + usort($suffix_array, function ($a, $b) use ($str) { + return strcmp(mb_substr($str, $a, null, 'UTF-8'), mb_substr($str, $b, null, 'UTF-8')); + }); + + return $suffix_array; + } + + function get_common_prefix_length($a, $b, $str) { + $length = 0; + + while (isset($str[$a]) && isset($str[$b])) { + $char_a = mb_substr($str, $a, 1, 'UTF-8'); + $char_b = mb_substr($str, $b, 1, 'UTF-8'); + if ($char_a == $char_b) { + $length++; + $a++; + $b++; + } else if (self::is_chinese($char_a) && self::is_chinese($char_b)) { + $length++; + $a++; + $b++; + } else { + break; + } + } + + return $length; + } + + function is_chinese($char) { + $pattern = '/[\x{4e00}-\x{9fa5}]/u'; + return preg_match($pattern, $char); + } } diff --git a/app/Console/Commands/InstagramScrape.php b/app/Console/Commands/InstagramScrape.php index 409dc47..57ac1df 100644 --- a/app/Console/Commands/InstagramScrape.php +++ b/app/Console/Commands/InstagramScrape.php @@ -7,94 +7,94 @@ use App\Services\InstagramService; use Illuminate\Console\Command; use Illuminate\Support\Facades\Redis; -class InstagramScrape extends Command -{ - /** - * The name and signature of the console command. - * - * @var string - */ - protected $signature = 'ins:like'; +class InstagramScrape extends Command { + /** + * The name and signature of the console command. + * + * @var string + */ + protected $signature = 'ins:like'; - /** - * The console command description. - * - * @var string - */ - protected $description = 'Command description'; + /** + * The console command description. + * + * @var string + */ + protected $description = 'Command description'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } + /** + * Create a new command instance. + * + * @return void + */ + public function __construct() { + parent::__construct(); + } - /** - * Execute the console command. - * - * @return mixed - */ - public function handle() - { + /** + * Execute the console command. + * + * @return mixed + */ + public function handle() { // $start = $this->argument('start'); -// $type = $this->argument('type'); -// echo $start;exit; -// $userList = file("/Users/shixuesen/OneDrive/Pictures/instagram/user.txt"); -// $userList = array_slice($userList, $start, 65); -// // $userList = ['1992.ai_']; -// print_r($userList);exit; - $ins = new InstagramService(); + // $type = $this->argument('type'); + // echo $start;exit; + // $userList = file("/Users/shixuesen/OneDrive/Pictures/instagram/user.txt"); + // $userList = array_slice($userList, $start, 65); + // // $userList = ['1992.ai_']; + // print_r($userList);exit; + $ins = new InstagramService(); -// $ins->scrapeFeedsV2(); -// sleep(60*2); -// $ins->scrapeUsersV2(89, ["ngoctrinh89", "changchinlan", "na0912mi", "janed_404", "amandacerny", "beargenie", "beauty.leg"]); + // $ins->scrapeFeedsV2(); + // sleep(60 * 2); - $ins->scrapeUsersV2(89, null); +// $ins->scrapeUsersV2(89, ["mikamikatn", "sejinming", "bonnie.90106_", "zyzyxin222", "linda.zz99tw", "2km2km", "na0912mi", "masami_nagasawa", "naughty_rabbit_", "cho_hyunyoung", "lxx.baby", "inkyung97", "boram__jj", "ji_an35", "mc807lsy", "cxxsomi"]); + // $ins->scrapeUsersV2(89, ["hazyryu", "dododoris__", "boram__jj", "zyzyxin222", "jiee_wen","mobe_carrie0223"]); + // $ins->scrapeUsersV2(89, [ "zennyrt", "gggglow_", "ling.lingerie", "u.zyn"]); + // $ins->scrapeUsersV2(89, ["1jinoh", "miaomi7188"]); + $ins->scrapeUsersV2(89, null); // $ins->scrapeUsersV2(89, ["maggiewu1008", "e_s2_e", "anran.1033", "yura_936", "masami_nagasawa", "jen2jen2_"]); - // $ins->scrapeUsersV2(89, ["candiceswanepoel", "maggiewu1008", "janie.lin", "cxxsomi", "naughty_rabbit_", "cho_hyunyoung", "2km2km", "ms_puiyi", "ms_puiyi"]); - // "candiceswanepoel", "maggiewu1008, janie.lin, cxxsomi, naughty_rabbit_, cho_hyunyoung, 2km2km, ms_puiyi, irishuo_ - // sleep(60*2); - // $ins->scrapeUsersV2(89, null); -// + // $ins->scrapeUsersV2(89, ["candiceswanepoel", "maggiewu1008", "janie.lin", "cxxsomi", "naughty_rabbit_", "cho_hyunyoung", "2km2km", "ms_puiyi", "ms_puiyi"]); + // "candiceswanepoel", "maggiewu1008, janie.lin, cxxsomi, naughty_rabbit_, cho_hyunyoung, 2km2km, ms_puiyi, irishuo_ + // sleep(60*2); + // $ins->scrapeUsersV2(89, null); + // - exit; + exit; // $ins->getUserNameById('4156629214');exit; - // $ins->scrapeUsersInFile("/Users/shixuesen/OneDrive/Pictures/instagram/user_0.txt");exit; - $lastInsStart = Redis::connection()->get("last_ins_start"); - dump("lastInsStart is $lastInsStart"); - $lastQueryType = Redis::connection()->get("last_query_type"); - dump("lastQueryType is $lastQueryType"); - if ($lastQueryType == null || $lastQueryType == "user") { - $ins->scrapeFeeds(); - Redis::connection()->set("last_query_type", "feed"); - } else { - if ($lastInsStart == null) { - $lastInsStart = 0; - } else { - $lastInsStart = 55 - (int)$lastInsStart; - } - Redis::connection()->set("last_ins_start", $lastInsStart); - Redis::connection()->set("last_query_type", "user"); - $ins->scrapeUsers($lastInsStart); - $ins->scrapeLikedUsers(); - $ins->scrapeCollection(); - } - exit; - // $ins->scrapeFeeds();exit; - // $ins->scrapeUsers($start); - $ins->scrapeLikedUsers(); - $ins->scrapeCollection();exit; - $ins->getUserNameById(13049295449); + // $ins->scrapeUsersInFile("/Users/shixuesen/OneDrive/Pictures/instagram/user_0.txt");exit; + $lastInsStart = Redis::connection()->get("last_ins_start"); + dump("lastInsStart is $lastInsStart"); + $lastQueryType = Redis::connection()->get("last_query_type"); + dump("lastQueryType is $lastQueryType"); + if ($lastQueryType == null || $lastQueryType == "user") { + $ins->scrapeFeeds(); + Redis::connection()->set("last_query_type", "feed"); + } else { + if ($lastInsStart == null) { + $lastInsStart = 0; + } else { + $lastInsStart = 55 - (int) $lastInsStart; + } + Redis::connection()->set("last_ins_start", $lastInsStart); + Redis::connection()->set("last_query_type", "user"); + $ins->scrapeUsers($lastInsStart); + $ins->scrapeLikedUsers(); + $ins->scrapeCollection(); + } + exit; + // $ins->scrapeFeeds();exit; + // $ins->scrapeUsers($start); + $ins->scrapeLikedUsers(); + $ins->scrapeCollection();exit; + $ins->getUserNameById(13049295449); // $ins->queryFollowUsers(); -// $ins->commonRequest(); - $ins24 = new Ins24Service(); - $ins24->scrapeUsers(); - $ins24->scrapeUsersVideos(); - } + // $ins->commonRequest(); + $ins24 = new Ins24Service(); + $ins24->scrapeUsers(); + $ins24->scrapeUsersVideos(); + } } diff --git a/app/Console/Commands/RenameTest.php b/app/Console/Commands/RenameTest.php index 7bfefe2..bee3d27 100644 --- a/app/Console/Commands/RenameTest.php +++ b/app/Console/Commands/RenameTest.php @@ -3,74 +3,71 @@ namespace App\Console\Commands; use App\Services\RenameService; -use Illuminate\Console\Command; -use Illuminate\Support\Facades\Redis; use function RingCentral\Psr7\str; +use Illuminate\Console\Command; -class RenameTest extends Command -{ - /** - * The name and signature of the console command. - * - * @var string - */ - protected $signature = 'rename:test {path} {prefix} {level=1}'; +class RenameTest extends Command { + /** + * The name and signature of the console command. + * + * @var string + */ + protected $signature = 'rename:test {path} {prefix} {level=1}'; - /** - * The console command description. - * - * @var string - */ - protected $description = 'Command description'; + /** + * The console command description. + * + * @var string + */ + protected $description = 'Command description'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } + /** + * Create a new command instance. + * + * @return void + */ + public function __construct() { + parent::__construct(); + } - /** - * Execute the console command. - * - * @return mixed - */ - public function handle() - { - // - $path = $this->argument("path"); - $prefix = $this->argument("prefix"); - $level = $this->argument("level"); - $rename = new RenameService(); - $rename->setNameLevel(intval($level)); + /** + * Execute the console command. + * + * @return mixed + */ + public function handle() { + // + $path = $this->argument("path"); + $prefix = $this->argument("prefix"); + $level = $this->argument("level"); + $rename = new RenameService(); + $rename->setNameLevel(intval($level)); // $files = scandir($path); -// foreach ($files as $file) { -// if (str_contains($file, "KID=imgbed,photo&")) { -// $pos = strpos($file, ".jpg"); -// $newFileName = substr($file, 0, $pos + 4); -// dump("new filename ". $newFileName); -// -// rename($path . DIRECTORY_SEPARATOR . $file, $path . DIRECTORY_SEPARATOR . $newFileName); -// } -// } -// exit; - // $rename->rename($path, $prefix); -// $arr[0] = 1640486381; -// $arr[1] = 1640553754; -// $arr[2] = 1640488544; -// asort($arr); -// dump($rename->getNameLevel()); -// dump($arr);exit; - $rename->rename($path, $prefix); - $rename->splitCustomSizeOfFolder($path, $prefix, 500);exit; -// $rename->rename("/Volumes/WD/tmp/写真图/猫九", "猫九-"); + // foreach ($files as $file) { + // if (str_contains($file, "KID=imgbed,photo&")) { + // $pos = strpos($file, ".jpg"); + // $newFileName = substr($file, 0, $pos + 4); + // dump("new filename ". $newFileName); + // + // rename($path . DIRECTORY_SEPARATOR . $file, $path . DIRECTORY_SEPARATOR . $newFileName); + // } + // } + // exit; + // $rename->rename($path, $prefix); + // $arr[0] = 1640486381; + // $arr[1] = 1640553754; + // $arr[2] = 1640488544; + // asort($arr); + // dump($rename->getNameLevel()); + // dump($arr);exit; + // $rename->rename($path, $prefix); + // processFirstLevelDirectory($path);exit; + $rename->splitCustomSizeOfFolder($path, $prefix, 500);exit; + // $rename->rename("/Volumes/WD/tmp/写真图/猫九", "猫九-"); - return; - $rename->rename("/Volumes/Backup/images/写真/pcBack/3/", ""); + return; + $rename->rename("/Volumes/Backup/images/写真/pcBack/3/", ""); // $rename->rename(); -// $rename->mvFiles("/Users/shixuesen/Documents/tmp/秀人旗下《MFStar模范学院》套图及视频写真-TLoB/视频/"); - } + // $rename->mvFiles("/Users/shixuesen/Documents/tmp/秀人旗下《MFStar模范学院》套图及视频写真-TLoB/视频/"); + } } diff --git a/app/Console/Commands/TestCommand.php b/app/Console/Commands/TestCommand.php index 6c733c6..0f04cd7 100644 --- a/app/Console/Commands/TestCommand.php +++ b/app/Console/Commands/TestCommand.php @@ -11,292 +11,546 @@ use GuzzleHttp\Psr7\Request; use Illuminate\Console\Command; use Illuminate\Support\Facades\Redis; -class TestCommand extends Command -{ - /** - * The name and signature of the console command. - * - * @var string - */ - protected $signature = 'test:all'; - - /** - * The console command description. - * - * @var string - */ - protected $description = 'Command description'; - - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } - - /** - * Execute the console command. - * - * @return mixed - */ - public function handle() - { -// $this->test02(); -// exit; - $this->test5();exit; - $this->test01();exit; - $this->test04();exit; +class TestCommand extends Command { + /** + * The name and signature of the console command. + * + * @var string + */ + protected $signature = 'test:all'; + + /** + * The console command description. + * + * @var string + */ + protected $description = 'Command description'; + + /** + * Create a new command instance. + * + * @return void + */ + public function __construct() { + parent::__construct(); + } + + /** + * Execute the console command. + * + * @return mixed + */ + public function handle() { + // $this->test08();exit; + +// $this->test7();exit; + // $this->test02(); + // exit; + // $this->test5();exit; + // $this->test01();exit; + $this->test04();exit; // echo strlen("[VLOG] 메이드와 단 둘이 청소하실래요-ㅣ메이드복 입고 청소하기__ㅣ모델 일상 코스프레 브이로그ㅣCleaning Maid Cosplayㅣメイドといっしょに掃除しませんか?");exit; - // $service = new GooglePhotoSyncService(); - // $service->syncDBToRedis();exit; - // $service->insertMappings();exit; - // $service->syncImageFiles(); - // exit; -// $baseDir = "/Users/shixuesen/Documents/sync/image"; - $baseDir = "/Users/shixuesen/Documents/otherSync/very"; - $baseDir = "/Users/shixuesen/Downloads/y"; - $dirs = ["mv"]; - $files = []; - foreach ($dirs as $dir) { - $currentFiles = scandir($baseDir . DIRECTORY_SEPARATOR . $dir); - foreach ($currentFiles as $file) { - if ($file == "." || $file == ".." || $file == ".DS_Store" || is_dir($baseDir . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $file)) { - continue; - } - $files[] = $baseDir . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $file; - } + // $service = new GooglePhotoSyncService(); + // $service->syncDBToRedis();exit; + // $service->insertMappings();exit; + // $service->syncImageFiles(); + // exit; + // $baseDir = "/Users/shixuesen/Documents/sync/image"; + $baseDir = "/Users/shixuesen/Documents/otherSync/very"; + $baseDir = "/Users/shixuesen/Downloads/y"; + $dirs = ["mv"]; + $files = []; + foreach ($dirs as $dir) { + $currentFiles = scandir($baseDir . DIRECTORY_SEPARATOR . $dir); + foreach ($currentFiles as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store" || is_dir($baseDir . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $file)) { + continue; + } + $files[] = $baseDir . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $file; + } // $files = array_merge($files, $currentFiles); - } + } - $md5Set = []; + $md5Set = []; // $newDir = "/Users/shixuesen/Downloads/y/Nagisa魔物喵202003fantia会员合集/魔物喵__001"; -// mkdir($newDir); - $i = 0; - foreach ($files as $file) { - if ($file == "." || $file == ".." || $file == ".DS_Store") { - continue; - } - $hash = md5_file($file); - if (array_key_exists($hash, $md5Set)) { - echo "file is same $file, and {$md5Set[$hash]} \n"; + // mkdir($newDir); + $i = 0; + foreach ($files as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store") { + continue; + } + $hash = md5_file($file); + if (array_key_exists($hash, $md5Set)) { + echo "file is same $file, and {$md5Set[$hash]} \n"; // rename($dir . DIRECTORY_SEPARATOR . $file, $newDir . DIRECTORY_SEPARATOR . $file); -// exit; - $i++; - } else { - $md5Set[$hash] = $file; - } - } - echo "all same file count is $i"; - exit; + // exit; + $i++; + } else { + $md5Set[$hash] = $file; + } + } + echo "all same file count is $i"; + exit; // $pid = pcntl_fork(); - $childs = array(); - - $cmds = array( - array('/Users/shixuesen/Downloads/temp/dir1/1.txt', '/Users/shixuesen/Downloads/temp/dir2/1.txt'), - array('/Users/shixuesen/Downloads/temp/dir1/1.txt', '/Users/shixuesen/Downloads/temp/dir3/1.txt'), - array('/Users/shixuesen/Downloads/temp/dir1/1.txt', '/Users/shixuesen/Downloads/temp/dir4/1.txt') - ); - - echo 'begin'; - echo date("Y-m-d H:i:s"); - - foreach ($cmds as $cmd) { - $pid = pcntl_fork(); - if ($pid == -1) {// process creation failed - die('fork child process failure!'); - } else if ($pid) {// parent process logic - $childs[] = $pid; - pcntl_wait($status, WNOHANG); - } else {// sub-process processing logic - pcntl_exec('/bin/cp', $cmd); - } - } - while (count($childs) > 0) { - foreach ($childs as $key => $pid) { - $res = pcntl_waitpid($pid, $status, WNOHANG); - - //1 for error, greater than 0 representative process has been withdrawn, returns to the pid of the sub-process, and 0 representatives have not been able to take the exit sub-process when it is not blocked - if ($res == -1 || $res > 0) - unset($childs[$key]); - } - - sleep(1); - } - - echo "start sleep"; - sleep(100); - echo date("Y-m-d H:i:s"); - echo 'done'; - exit; - echo time() . "\n"; - $pid = pcntl_fork(); - if ($pid == -1) { - die('could not fork'); - } else if ($pid) { - // we are the parent - pcntl_wait($status); //Protect against Zombie children - } else { - // we are the child - pcntl_exec("/bin/cp", ["/Users/shixuesen/Downloads/temp/dir1/1.txt", "/Users/shixuesen/Downloads/temp/dir2/1.txt"]); - } - - - pcntl_exec("/bin/cp", ["/Users/shixuesen/Downloads/temp/dir1/1.txt", "/Users/shixuesen/Downloads/temp/dir3/1.txt"]); - pcntl_exec("/bin/cp", ["/Users/shixuesen/Downloads/temp/dir1/1.txt", "/Users/shixuesen/Downloads/temp/dir4/1.txt"]); - echo time(); - exit; - - $service = new GooglePhotoSyncService(); + $childs = array(); + + $cmds = array( + array('/Users/shixuesen/Downloads/temp/dir1/1.txt', '/Users/shixuesen/Downloads/temp/dir2/1.txt'), + array('/Users/shixuesen/Downloads/temp/dir1/1.txt', '/Users/shixuesen/Downloads/temp/dir3/1.txt'), + array('/Users/shixuesen/Downloads/temp/dir1/1.txt', '/Users/shixuesen/Downloads/temp/dir4/1.txt'), + ); + + echo 'begin'; + echo date("Y-m-d H:i:s"); + + foreach ($cmds as $cmd) { + $pid = pcntl_fork(); + if ($pid == -1) { +// process creation failed + die('fork child process failure!'); + } else if ($pid) { +// parent process logic + $childs[] = $pid; + pcntl_wait($status, WNOHANG); + } else { +// sub-process processing logic + pcntl_exec('/bin/cp', $cmd); + } + } + while (count($childs) > 0) { + foreach ($childs as $key => $pid) { + $res = pcntl_waitpid($pid, $status, WNOHANG); + + //1 for error, greater than 0 representative process has been withdrawn, returns to the pid of the sub-process, and 0 representatives have not been able to take the exit sub-process when it is not blocked + if ($res == -1 || $res > 0) { + unset($childs[$key]); + } + + } + + sleep(1); + } + + echo "start sleep"; + sleep(100); + echo date("Y-m-d H:i:s"); + echo 'done'; + exit; + echo time() . "\n"; + $pid = pcntl_fork(); + if ($pid == -1) { + die('could not fork'); + } else if ($pid) { + // we are the parent + pcntl_wait($status); //Protect against Zombie children + } else { + // we are the child + pcntl_exec("/bin/cp", ["/Users/shixuesen/Downloads/temp/dir1/1.txt", "/Users/shixuesen/Downloads/temp/dir2/1.txt"]); + } + + pcntl_exec("/bin/cp", ["/Users/shixuesen/Downloads/temp/dir1/1.txt", "/Users/shixuesen/Downloads/temp/dir3/1.txt"]); + pcntl_exec("/bin/cp", ["/Users/shixuesen/Downloads/temp/dir1/1.txt", "/Users/shixuesen/Downloads/temp/dir4/1.txt"]); + echo time(); + exit; + + $service = new GooglePhotoSyncService(); // $service->syncDBToRedis();exit; -// $service->insertMappings();exit; - $service->syncImageFiles(); - exit; + // $service->insertMappings();exit; + $service->syncImageFiles(); + exit; // $service = new FileService(); - // $service->queryFileTime("/Users/shixuesen/Documents/sync/image/instagram/mobe_carrie0223/mobe__0020/82339160_561812341080795_8865402232426240219_n.jpg");exit; -// echo $service->processDirAndFindLastFileMTime("/Users/shixuesen/Documents/sync/image/weibo/");exit; -// $service = new LiveStreamService(); -// $service->moveFilesAndRenameFiles("/Users/shixuesen/Downloads/rsyncFiles/a", "/Users/shixuesen/Downloads/rsyncFiles/b"); -// exit; -// $a = str_replace("/", "", "aaaaa/bbbb"); -// echo $a;exit; - // - $file = "/Volumes/Crucial X6/Image/weibo/image/一只小短短OwO--7f605a17gy1gxpb0pg31vj22eo37k1kz.jpg"; - $file = "/Users/shixuesen/Documents/sync/image/instagram/Likes/eeelyeee_277962893_719835709026094_2370282265319075961_n.jpg"; + // $service->queryFileTime("/Users/shixuesen/Documents/sync/image/instagram/mobe_carrie0223/mobe__0020/82339160_561812341080795_8865402232426240219_n.jpg");exit; + // echo $service->processDirAndFindLastFileMTime("/Users/shixuesen/Documents/sync/image/weibo/");exit; + // $service = new LiveStreamService(); + // $service->moveFilesAndRenameFiles("/Users/shixuesen/Downloads/rsyncFiles/a", "/Users/shixuesen/Downloads/rsyncFiles/b"); + // exit; + // $a = str_replace("/", "", "aaaaa/bbbb"); + // echo $a;exit; + // + $file = "/Volumes/Crucial X6/Image/weibo/image/一只小短短OwO--7f605a17gy1gxpb0pg31vj22eo37k1kz.jpg"; + $file = "/Users/shixuesen/Documents/sync/image/instagram/Likes/eeelyeee_277962893_719835709026094_2370282265319075961_n.jpg"; // $file = "/Users/shixuesen/OneDrive/Pictures/instagram/Likes_new/eeelyeee_277962893_719835709026094_2370282265319075961_n.jpg"; - - $file = "/Users/shixuesen/Documents/sync/image/instagram/boram__jj/277958530_1581189285586989_5049761303029075957_n.jpg"; + $file = "/Users/shixuesen/Documents/sync/image/instagram/boram__jj/277958530_1581189285586989_5049761303029075957_n.jpg"; // $file = "/Users/shixuesen/OneDrive/Pictures/instagram/boram__jj/277958530_1581189285586989_5049761303029075957_n.jpg"; - $mtime = date("Y-m-d H:i:s", filemtime($file)); - $atime = date("Y-m-d H:i:s", fileatime($file)); - $ctime = date("Y-m-d H:i:s", filectime($file)); + $mtime = date("Y-m-d H:i:s", filemtime($file)); + $atime = date("Y-m-d H:i:s", fileatime($file)); + $ctime = date("Y-m-d H:i:s", filectime($file)); // $stat = stat($file); - echo "file mtime is $mtime, atime is $atime, ctime is $ctime"; + echo "file mtime is $mtime, atime is $atime, ctime is $ctime"; // dump($stat); - } + } - public function test01() - { - $keys = Redis::connection("cache_txy4")->lrange("file_to_encode", 0, -1); - foreach ($keys as $key) { - if (str_contains($key, "崔兔子")) { + public function test01() { + $keys = Redis::connection("cache_txy4")->lrange("file_to_encode", 0, -1); + foreach ($keys as $key) { + if (str_contains($key, "崔兔子")) { // echo $key; - Redis::connection("cache_txy4")->lrem("file_to_encode", 0, $key); - } - } + Redis::connection("cache_txy4")->lrem("file_to_encode", 0, $key); + } + } // dump($keys); -// echo Redis::connection("cache_txy4")->get("aaaaaa");exit; - } - - public function test02() - { - $url = "https://wx4.sinaimg.cn/large/a2ca2fd3ly1hdcbwq251wj20h70fi0zi.jpg"; - $urlInfo = parse_url($url); - $host = $urlInfo["host"]; - $client = new Client(); - $headers = [ - 'authority' => $host, - 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', - 'accept-language' => 'zh-CN,zh;q=0.9', - 'cache-control' => 'no-cache', - 'pragma' => 'no-cache', - 'referer' => 'https://m.weibo.cn/', - 'sec-ch-ua' => '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"', - 'sec-ch-ua-mobile' => '?0', - 'sec-ch-ua-platform' => '"macOS"', - 'sec-fetch-dest' => 'image', - 'sec-fetch-mode' => 'no-cors', - 'sec-fetch-site' => 'cross-site', - 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36' - ]; - $request = new Request('GET', $url, $headers); - $res = $client->sendAsync($request)->wait(); - return $res->getBody(); - } - - public function test03() - { - $list = Redis::connection()->smembers("永远别问为什么"); - $files = scandir("/Volumes/Xcode"); - foreach ($files as $file) { - if ($file == "." || $file == "..") { - continue; - } - if (!in_array($file, $list)) { - echo "$file not in array \n"; - } - } - } - - - public function test04() - { + // echo Redis::connection("cache_txy4")->get("aaaaaa");exit; + } + + public function test02() { + $url = "https://wx4.sinaimg.cn/large/a2ca2fd3ly1hdcbwq251wj20h70fi0zi.jpg"; + $urlInfo = parse_url($url); + $host = $urlInfo["host"]; + $client = new Client(); + $headers = [ + 'authority' => $host, + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cache-control' => 'no-cache', + 'pragma' => 'no-cache', + 'referer' => 'https://m.weibo.cn/', + 'sec-ch-ua' => '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"', + 'sec-ch-ua-mobile' => '?0', + 'sec-ch-ua-platform' => '"macOS"', + 'sec-fetch-dest' => 'image', + 'sec-fetch-mode' => 'no-cors', + 'sec-fetch-site' => 'cross-site', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36', + ]; + $request = new Request('GET', $url, $headers); + $res = $client->sendAsync($request)->wait(); + return $res->getBody(); + } + + public function test03() { + $list = Redis::connection()->smembers("永远别问为什么"); + $files = scandir("/Volumes/Xcode"); + foreach ($files as $file) { + if ($file == "." || $file == "..") { + continue; + } + if (!in_array($file, $list)) { + echo "$file not in array \n"; + } + } + } + + /** + * 相同文件查找 + * @return void + */ + public function test04() { // $baseDir = "/Volumes/Xcode/"; - $baseDir = "/Users/shixuesen/Documents/otherSync/very"; - $dirs = ["weibo_image03"]; - $files = []; - foreach ($dirs as $dir) { - $currentFiles = scandir($baseDir . DIRECTORY_SEPARATOR . $dir); - foreach ($currentFiles as $file) { - if ($file == "." || $file == ".." || $file == ".DS_Store" || is_dir($baseDir . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $file)) { - continue; - } - $files[] = $baseDir . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $file; - } + // $baseDir = "/Volumes/Crucial X6/就是阿朱啊/就是阿朱啊-5"; + // $dirs = ["阿朱_2010"]; + $baseDir = "/Users/shixuesen/Documents/otherSync/very"; + $dirs = ["mv2001"]; + $files = []; + foreach ($dirs as $dir) { + $currentFiles = scandir($baseDir . DIRECTORY_SEPARATOR . $dir); + foreach ($currentFiles as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store" || is_dir($baseDir . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $file)) { + continue; + } + $files[] = $baseDir . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $file; + } // $files = array_merge($files, $currentFiles); - } + } - $md5Set = []; + $md5Set = []; // $newDir = "/Users/shixuesen/Downloads/y/Nagisa魔物喵202003fantia会员合集/魔物喵__001"; -// mkdir($newDir); - $i = 0; - foreach ($files as $file) { - if ($file == "." || $file == ".." || $file == ".DS_Store") { - continue; - } - $hash = md5_file($file); - if (array_key_exists($hash, $md5Set)) { - echo "file is same $file, and {$md5Set[$hash]} \n"; + // mkdir($newDir); + $i = 0; + foreach ($files as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store") { + continue; + } + $hash = sha1_file($file); + if (array_key_exists($hash, $md5Set)) { + echo "file is same $file, and {$md5Set[$hash]} \n"; // rename($dir . DIRECTORY_SEPARATOR . $file, $newDir . DIRECTORY_SEPARATOR . $file); -// exit; - $i++; - } else { - $md5Set[$hash] = $file; - } - } - echo "all same file count is $i"; - exit; - } - - public function test5() - { - $dir = "/Volumes/Crucial X6/Image/6001-6050/6001-6050.7z"; - $files = scandir($dir); - $set = []; - foreach ($files as $file) { - if ($file == "." || $file == ".." || $file == ".DS_Store") { - continue; - } - preg_match("#NO.\d+\s(\S+)\[#", $file, $matches); - $owner_name = $matches[1]; - if (array_key_exists($owner_name, $set)) { - dump("$owner_name exists"); - } else { - $set[$owner_name] = 1; - } -// dump($owner_name); - - - } - - } + // exit; + $i++; + } else { + $md5Set[$hash] = $file; + } + } + echo "all same file count is $i"; + exit; + } + + /** + * 针对百度网盘下载的 + * 根据秀人相册的模特名字以 500 个文件作为一个文件夹重新整理 + * @return void + */ + public function test5() { + $dir = "/Volumes/T7/Image/xiuren/6151-6200/6151-6200.7z/"; +// $dir = "/Users/shixuesen/Documents/otherSync/xiuren/"; + $files = scandir($dir); + $set = []; + $toMoveFiles = []; + foreach ($files as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store") { + continue; + } + preg_match("#NO.\d+\s(\S+)\[#", $file, $matches); + $owner_name = $matches[1]; + $subDir = implode(DIRECTORY_SEPARATOR, [$dir, $file]); + if (is_dir($subDir)) { + $imageFiles = array_diff(scandir($subDir), [".", "..", ".DS_Store"]); + foreach ($imageFiles as $imageFile) { + $toMoveFiles[$owner_name][] = implode(DIRECTORY_SEPARATOR, [$subDir, $imageFile]); + } + } +// if (array_key_exists($owner_name, $set)) { + // $set[$owner_name] ++; + // dump("$owner_name exists"); + // } else { + // $set[$owner_name] = 1; + // } + // dump($owner_name); + + } + foreach ($toMoveFiles as $owner => $toMoveFile) { + dump(count($toMoveFile)); + $totalNum = count($toMoveFile); + $n = floor($totalNum / 500); + for ($i = 0; $i < $totalNum; $i++) { + $trueDir = $dir . DIRECTORY_SEPARATOR . $owner . "_00" . floor($i / 500); + if ($i % 500 == 0 && !is_dir($trueDir)) { + mkdir($trueDir); + } + $newFile = $trueDir . DIRECTORY_SEPARATOR . pathinfo($toMoveFile[$i])["basename"]; + dump("new file is " . $newFile); + rename($toMoveFile[$i], $trueDir . DIRECTORY_SEPARATOR . pathinfo($toMoveFile[$i])["basename"]); + } + } + exit; +// dump($toMoveFiles); + // $allV = 0; + // foreach ($set as $k => $v) { + // $allV += $v; + // } + // dump($set); + // dump($allV); + + } + + public function test06() { + $arr = ["(PRESTIGE)(IDBD-505)甘い誘惑 ハニートラップで男を誘うオンナ達 希崎ジェシカ 天海つばさ 冬月かえで 希志あいの Rio 等_2.mp4", + "(IDEAPOCKET)(IPVR-035)レジェンドVR共演 常に2人がかりでアナタを満足させてくれるハイクオリティ風俗 天海つばさ 佐山愛_5.mp4", + "[Thz.la]ipz-814.mp4", + "(IDEAPOCKET)(IPZ-440)刺激的なTバックの淫らな誘惑 天海つばさ.mp4", + "【更多福利www.51fuliku.com-福利库】ARKX025.mp4", + "(IdeaPocket)OL痴漢電車 - 天海つばさ A.mp4", + "[Thz.la]sspd-133.mp4", + "[NoDRM]-iptd00982hhb2.mp4", + "(IDEAPOCKET)(IPZ-893)特ダネSCOOP!天海つばさ持ち込みプライベートSEX セルフ撮影映像.mp4", + "[NoDRM]-ipz00157hhb3.mp4", + "(IDEAPOCKET)(IPZ-456)ハメられた新人美女RQ 断り切れず枕営業を虐げられる美裸体 天海つばさ.mp4", + "(IDEAPOCKET)(IPZ-692)『まだ未開の快感が欲しくて…』催眠 トランス バースト寸前!超絶オーガズムSEX 天海つばさ.mp4", + "[44x.me]oae-161.mp4", + "[NoDRM]-iptd00533hhb4.mp4", + "[NoDRM]-ipz00080hhb2.mp4", + "(IDEAPOCKET)(IPZ-862)リピーター続出!噂の本番できちゃうおっパブ店 天海つばさ.mp4", + "(IDEAPOCKET)(IPZ-587)無理矢理AVに出演させられた美人マネージャー 天海つばさ.mp4", + "[Thz.la]ipx-081.mp4", + "[NoDRM]-iptd00533hhb2.mp4", + "[44x.me]idbd-789-2.mp4", + "[NoDRM]-iptd00521hhb1.mp4", + "[NoDRM]-iptd00982hhb1.mp4", + "[NoDRM]-ipz00135hhb1.mp4", + "[FHD]IPZ-692.mp4", + "[NoDRM]-ipz00119hhb3.mp4", + "[44x.me]ipx-239.mp4", + "[456k.me]ipz-739.mp4", + "(Ideapocket)(IDBD-403)321イク~!発射間際からチュパチュパレロレロのフェラで大発射!かすみ果穂 竹内紗里奈 等_1.mp4", + "[NoDRM]-ipz00041hhb3.mp4", + "(IDEAPOCKET)(IPZ-831)オフ会セックスパーティー!デビュー7周年記念!連続発売第一弾!「天海つばさ」セルフプロデュース作品.mp4", + "[FHD]IPZ-801.mp4", + "(IDEAPOCKET)(IPZ-371)うちの妻を犯して下さい 天海つばさ.mp4", + "【更多福利www.51fuliku.com-福利库】IDBD278-02.mp4", + "[NoDRM]-ipz00119hhb2.mp4", + "[NoDRM]-iptd00916hhb2.mp4", + "(IDEAPOCKET)(IPZ-530)セックスボランティア 天海つばさ.mp4", + "[456k.me]idbd-699-2.mp4", + "[NoDRM]-iptd00521hhb4.mp4", + "(IDEAPOCKET)(IPZ-548)エスコートSEX 甘いヴァーチャル痴女の誘い240分 天海つばさ.mp4", + "[44x.me]idbd-789.mp4", + "(死夜悪)(SHKD-739)服従の事件簿 File.001 天海つばさ.mp4", + "[Idea Pocket][idbd-278] 天海つばさのフェラチオ360分SP (Tsubasa Amami) A.mp4", + "(龍縛)(RBD-830)奴隷色のステージ36 天海つばさ.mp4", + "(IDEAPOCKET)(IPX-031)サディスティックな変態性交に濡れ溺れて…性覚醒!浴尿!放尿!痛快感!汚アナル愛撫!浮気性交!天海つばさ.mp4", + "[thz.la]IPZ-563.1080p.mp4", + "(IDEAPOCKET)(IPVR-035)レジェンドVR共演 常に2人がかりでアナタを満足させてくれるハイクオリティ風俗 天海つばさ 佐山愛_4.mp4", + "[NoDRM]-ipz00041hhb1.mp4", + "(死夜悪)(SHKD-723)脱獄者 天海つばさ.mp4", + "[456k.me]idbd-764-2.mp4", + "(IDEAPOCKET)(IPZ-959)解禁!人生初 生中出しセックス 本物ザーメンを膣中に暴射!天海つばさ.mp4", + "[456k.me]idbd-764.mp4", + "[NoDRM]-ipz00058hhb3.mp4", + "(IdeaPocket)HIP ATTACK - 天海つばさ C.mp4", + "(IDEAPOCKET)(IPVR-035)レジェンドVR共演 常に2人がかりでアナタを満足させてくれるハイクオリティ風俗 天海つばさ 佐山愛_2.mp4", + "[NoDRM]-ipz00157hhb1.mp4", + "[NoDRM]-ipz00058hhb4.mp4", + "[NoDRM]-ipz00058hhb2.mp4", + "(Ideapocket)(IPTD-706)むっちゃ好きやねん 感じてあふれる方言SEX 天海つばさ.mp4", + "【更多福利www.51fuliku.com-福利库】IPTD533(1).mp4", + "(IDEAPOCKET)(IPZ-641)流出した下着モデルのSEXテープ…【全編盗撮 ハメ撮り撮影】天海つばさ.mp4", + "(IDEAPOCKET)(IPZ-472)連続射精してしまうほど過激な性交 天海つばさ.mp4", + "(IdeaPocket)HIP ATTACK - 天海つばさ B.mp4", + "(IDEAPOCKET)(IPZ-978)緊縛調教に目覚めたマゾ極妻~麗しき君の縄~天海つばさ.mp4", + "(IdeaPocket)HIP ATTACK - 天海つばさ A.mp4", + "[bbs.yzkof.com]IDBD-610 B[约战竞技场].mp4", + "(龍縛)(RBD-821)快楽拷問研究所5 天海つばさ.mp4", + "[NoDRM]-iptd00982hhb3.mp4", + "(IDEAPOCKET)(IPVR-035)レジェンドVR共演 常に2人がかりでアナタを満足させてくれるハイクオリティ風俗 天海つばさ 佐山愛_1.mp4", + "[NoDRM]-ipz00080hhb1.mp4", + "【更多福利www.51fuliku.com-福利库】IDBD278-03.mp4", + "(IDEAPOCKET)(AVOP-301)LEGEND IMPRESSION 史上最強コンテンツで贈る奇跡の共演!240分 希崎ジェシカ 天海つばさ.mp4", + "(IDEAPOCKET)(IPZ-945)突撃!単体女優天海つばさが噂の風俗店に体当たりガチ潜入リポート ピンサロから出張ホスト、オナニーCLUB.mp4", + "[NoDRM]-ipz00119hhb1.mp4", + "(龍縛)(RBD-807)マゾに目覚めた女3 天海つばさ 羽田璃子.mp4", + "[NoDRM]-ipz00080hhb3.mp4", + "[NoDRM]-iptd00916hhb1.mp4", + "[NoDRM]-iptd00521hhb2.mp4", + "(Ideapocket)(IDBD-403)321イク~!発射間際からチュパチュパレロレロのフェラで大発射!かすみ果穂 竹内紗里奈 等_2.mp4", + "(PRESTIGE)(IDBD-505)甘い誘惑 ハニートラップで男を誘うオンナ達 希崎ジェシカ 天海つばさ 冬月かえで 希志あいの Rio 等_1.mp4", + "-ipz783hhb.mp4", + "[NoDRM]-iptd00533hhb1.mp4", + "(IDEAPOCKET)(IPZ-847)ノンフィクション…ほんとうにあったレ○プ事件を実写化「天海つばさ最後の凌辱作品」.mp4", + "[NoDRM]-ipz00041hhb2.mp4", + "【更多福利www.51fuliku.com-福利库】IPTD-706b.mp4", + "【更多福利www.51fuliku.com-福利库】IDBD278-01.mp4", + "[NoDRM]-ipz00135hhb3.mp4", + "(IDEAPOCKET)(IPZ-838)DQN達に全身固定され失禁マグナムピストンFUCK 「動けない!」恨みを買った女教師の恥辱姦 天海つばさ.mp4", + "[Thz.la]ipz-877.mp4", + "[NoDRM]-iptd00533hhb3.mp4", + "[456k.me]idbd-699.mp4", + "(IDEAPOCKET)(IPZ-416)天海つばさ 並木優 240分W本指名SPECIAL 極上風俗4本番.mp4", + "(IDEAPOCKET)(IPZ-925)超W痴女 容赦なし!手加減なし!ザーメンを根こそぎ搾り抜く!天海つばさ 里美ゆりあ.mp4", + "[bbs.yzkof.com]IDBD-610 A[约战竞技场].mp4", + "(IDEAPOCKET)(IPVR-035)レジェンドVR共演 常に2人がかりでアナタを満足させてくれるハイクオリティ風俗 天海つばさ 佐山愛_3.mp4", + "[NoDRM]-ipz00058hhb1.mp4", + "[Idea Pocket][idbd-278] 天海つばさのフェラチオ360分SP (Tsubasa Amami) B.mp4", + "(IDEAPOCKET)(IPZ-391)大乱交 天海つばさ.mp4", + "(IDEAPOCKET)(IPX-047)肉感ローアングルで魅せるノーブラ透け乳首の巨乳お姉さんの誘い 勃起必須シチュエーションの連発 天海つばさ.mp4", + "(IdeaPocket)OL痴漢電車 - 天海つばさ B.mp4", + "[Thz.la]IPZ-573.1080p.mp4", + "(IDEAPOCKET)(IPVR-035)レジェンドVR共演 常に2人がかりでアナタを満足させてくれるハイクオリティ風俗 天海つばさ 佐山愛_6.mp4", + "[456k.me]ipx-395-C.mp4", + "(IDEAPOCKET)(IPVR-035)レジェンドVR共演 常に2人がかりでアナタを満足させてくれるハイクオリティ風俗 天海つばさ 佐山愛_7.mp4", + "[Thz.la]rbd-794.mp4", + "【更多福利www.51fuliku.com-福利库】IPTD-706a.mp4", + "[NoDRM]-ipz00135hhb2.mp4", + "(IDEAPOCKET)(IPZ-997)New Spermania 大量口内射精!大量顔面ぶっかけ!性獣達の特濃ザーメン群が弾丸の如く大放射!天海つばさ.mp4", + "(IDEAPOCKET)(IPZ-909)BURN!BURN!BURN!日サロ店員のイキ過ぎた接客 日焼けもいいけど「つばさ」とのエッチな記憶も焼きつけて 天海つばさ.mp4", + "[NoDRM]-iptd00521hhb3.mp4", + "(IDEAPOCKET)(IPZ-814)褒められヴァーチャル有頂天SEX ALL主観 「つばさ」がアナタのプレイを絶賛してくれたら 天海つばさ.mp4", + "-sspd128hhb.mp4", + "【更多福利www.51fuliku.com-福利库】IDBD-289 .mp4", + "[NoDRM]-ipz00157hhb2.mp4", + "(IDEAPOCKET)(IPZ-424)僕のお嫁さんはいつも全裸 天海つばさ.mp4"]; + sort($arr); + dump($arr); + } + + /** + * 根据秀人相册的模特名字以 500 个文件作为一个文件夹重新整理 + * @return void + */ + public function test7() { + $dir = "/Volumes/T7/Image/xr/xiuren"; +// $dir = "/Users/shixuesen/Documents/otherSync/xiuren/"; + $files = scandir($dir); + $set = []; + $toMoveFiles = []; + foreach ($files as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store" || starts_with($file, ".")) { + continue; + } + preg_match("#期(\S+)写真#", $file, $matches); + $owner_name = $matches[1]; +// dump($owner_name);exit; + $subDir = implode(DIRECTORY_SEPARATOR, [$dir, $file]); + if (is_dir($subDir)) { + $imageFiles = array_diff(scandir($subDir), [".", "..", ".DS_Store"]); + foreach ($imageFiles as $imageFile) { + $toMoveFiles[$owner_name][] = implode(DIRECTORY_SEPARATOR, [$subDir, $imageFile]); + } + } +// if (array_key_exists($owner_name, $set)) { + // $set[$owner_name] ++; + // dump("$owner_name exists"); + // } else { + // $set[$owner_name] = 1; + // } + // dump($owner_name); + + } +// exit; + foreach ($toMoveFiles as $owner => $toMoveFile) { + dump(count($toMoveFile)); + $totalNum = count($toMoveFile); + $n = floor($totalNum / 500); + for ($i = 0; $i < $totalNum; $i++) { + $trueDir = $dir . DIRECTORY_SEPARATOR . $owner . "_00" . floor($i / 500); + if ($i % 500 == 0 && !is_dir($trueDir)) { + mkdir($trueDir); + } + $newFile = $trueDir . DIRECTORY_SEPARATOR . pathinfo($toMoveFile[$i])["basename"]; + dump("new file is " . $newFile); + rename($toMoveFile[$i], $trueDir . DIRECTORY_SEPARATOR . pathinfo($toMoveFile[$i])["basename"]); + } + } + exit; +// dump($toMoveFiles); + // $allV = 0; + // foreach ($set as $k => $v) { + // $allV += $v; + // } + // dump($set); + // dump($allV); + + } + + public function test08() { + $curl = curl_init(); + + curl_setopt_array($curl, array( + CURLOPT_URL => 'https://www.xiuren05.cc/XiuRen/index.html', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'GET', + CURLOPT_HTTPHEADER => array( + 'authority: www.xiuren05.cc', + 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', + 'accept-language: zh-CN,zh;q=0.9', + 'cache-control: no-cache', + 'cookie: cfstatshowcookie=xiurenpc', + 'pragma: no-cache', + 'sec-ch-ua: "Not/A)Brand";v="99", "Google Chrome";v="115", "Chromium";v="115"', + 'sec-ch-ua-mobile: ?0', + 'sec-ch-ua-platform: "macOS"', + 'sec-fetch-dest: document', + 'sec-fetch-mode: navigate', + 'sec-fetch-site: none', + 'sec-fetch-user: ?1', + 'upgrade-insecure-requests: 1', + 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36', + ), + )); + + $response = curl_exec($curl); + + curl_close($curl); + echo $response; + } } diff --git a/app/Http/Controllers/GooglePhotoController.php b/app/Http/Controllers/GooglePhotoController.php index c99704a..57c7707 100644 --- a/app/Http/Controllers/GooglePhotoController.php +++ b/app/Http/Controllers/GooglePhotoController.php @@ -3,515 +3,506 @@ namespace App\Http\Controllers; use App\GooglePhoto; use App\Services\GooglePhotoSyncService; -use Exception; use Google\ApiCore\ApiException; use Google\Photos\Library\V1\PhotosLibraryClient; use Google\Photos\Types\Album; -use Google\Photos\Types\MediaItem; use Illuminate\Http\Request; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Redis; use Throwable; class GooglePhotoController extends Controller { - public function connect(Request $request) - { - return connectWithGooglePhotos($request, - ['https://www.googleapis.com/auth/photoslibrary'], - config('app.albums_authentication_redirect_url') - ); - } + public function connect(Request $request) { + return connectWithGooglePhotos($request, + ['https://www.googleapis.com/auth/photoslibrary'], + config('app.albums_authentication_redirect_url') + ); + } - public function index() - { - $credentials = session("credentials"); + public function index() { + $credentials = session("credentials"); // dump($credentials); -// $credentials = null; - if ($credentials == null || $credentials == "") { - return view("albums/connect"); - } - /** query image list in albums - * $photosLibraryClient = new PhotosLibraryClient(['credentials' => $credentials]); - * $this->queryImageListInAlbum($photosLibraryClient, "AN5jk25bCDMrPpxQC3MFfOfj07IAqoCbf_N41lpljEbDPe2pxRV4gN28nsW8uuVDBEjXTWlOPTl_");exit; - */ + // $credentials = null; + if ($credentials == null || $credentials == "") { + return view("albums/connect"); + } + /** query image list in albums + * $photosLibraryClient = new PhotosLibraryClient(['credentials' => $credentials]); + * $this->queryImageListInAlbum($photosLibraryClient, "AN5jk25bCDMrPpxQC3MFfOfj07IAqoCbf_N41lpljEbDPe2pxRV4gN28nsW8uuVDBEjXTWlOPTl_");exit; + */ - $photosLibraryClient = new PhotosLibraryClient(['credentials' => $credentials]); - // $this->queryAlbumsList($photosLibraryClient);exit; - $this->queryImageListInAlbum($photosLibraryClient, "AN5jk24bD4OEqFqtDy8e_gdAvmRSQAs5xwEHDDpK4mi5Du0c_Hm7iJqk4A0DbaT0eeeQrp39xaKc");exit; + $photosLibraryClient = new PhotosLibraryClient(['credentials' => $credentials]); + // $this->queryAlbumsList($photosLibraryClient);exit; + $this->queryImageListInAlbum($photosLibraryClient, "AN5jk2743JHQKyWVsf39VJN5tHtbf02yPcl0cxiRjGGjVvKpmCNAU8vrpkPrhNvNg3c96LlN0g-3");exit; - $service = new GooglePhotoSyncService(); + $service = new GooglePhotoSyncService(); // $service->getAuthToken("4/0AX4XfWj_bDRqhnNLf4MGTMCAwt52Q4v6Dz1CLe1sx8I__Qu41z0fhX87I-amFAwpDGY0jA", ['https://www.googleapis.com/auth/photoslibrary'], config('app.albums_authentication_redirect_url')); -// $credentials = session("credentials"); -// dump($credentials);exit; + // $credentials = session("credentials"); + // dump($credentials);exit; + try { + $service->loadSynchronizedPhotoFromGooglePhoto($credentials, $photosLibraryClient); + } catch (Throwable $e) { + Log::error($e->getMessage()); + } + return view("albums/connect"); - try { - $service->loadSynchronizedPhotoFromGooglePhoto($credentials, $photosLibraryClient); - } catch (Throwable $e) { - Log::error($e->getMessage()); - } - return view("albums/connect"); - - try { + try { // $options['proxy'] = 'http://127.0.0.1:1087'; - // 香草喵 相册 id AN5jk26hs8RC6kZugTYJv6UgfEhpFXMSb7__IKEspfF6dJaZXdrgBn1f0ztondfflE9kPuJn8eJ8 - // acfun 相册 id AN5jk24RfoZ8ra5jstLcLsl0gCQnACbabxz4plLaoa2LY57AUOrU-C6h4qLX4FcH8BkyEJsvJJaZ - // 1. 获取相册里的照片 - // $this->queryImageListInAlbum($photosLibraryClient, "AN5jk24RfoZ8ra5jstLcLsl0gCQnACbabxz4plLaoa2LY57AUOrU-C6h4qLX4FcH8BkyEJsvJJaZ"); - // 1. 获取相册里的照片 - - // 2. 获取相册列表 - $this->queryAlbumsList($photosLibraryClient); - // 2. 获取相册列表 - exit; - $options["pageSize"] = 100; - $options["pageToken"] = "CkgKQnR5cGUuZ29vZ2xlYXBpcy5jb20vZ29vZ2xlLnBob3Rvcy5saWJyYXJ5LnYxLkxpc3RNZWRpYUl0ZW1zUmVxdWVzdBICCGQSogFBSF91UTQyZWo2TWdQb3cyZDVOOHdubldId0JwakJ0cUJwbHk4akV3Qm8tZ2xvTWpuWHdlRHlzX2VBRzRWZkgzUS0yNVdpRlE4cnhGTVVCaEF0ZEp1UFJuZzN4dncta0pIOWZJalZuVk1jbFZVWnpzdzRSVDNvTkt0SXVKNGpDUlVWTnh5NS12MTVhd3BHaTRrY2ZUTEhEeUVrbHVrMUVhRncaGzJvcFczVXpwQ3ZnU1hZTlNUVVQwVmd0V19Ecw"; - $pagedResponse = $photosLibraryClient->listMediaItems($options); + // 香草喵 相册 id AN5jk26hs8RC6kZugTYJv6UgfEhpFXMSb7__IKEspfF6dJaZXdrgBn1f0ztondfflE9kPuJn8eJ8 + // acfun 相册 id AN5jk24RfoZ8ra5jstLcLsl0gCQnACbabxz4plLaoa2LY57AUOrU-C6h4qLX4FcH8BkyEJsvJJaZ + // 1. 获取相册里的照片 + // $this->queryImageListInAlbum($photosLibraryClient, "AN5jk24RfoZ8ra5jstLcLsl0gCQnACbabxz4plLaoa2LY57AUOrU-C6h4qLX4FcH8BkyEJsvJJaZ"); + // 1. 获取相册里的照片 + // 2. 获取相册列表 + $this->queryAlbumsList($photosLibraryClient); + // 2. 获取相册列表 + exit; + $options["pageSize"] = 100; + $options["pageToken"] = "CkgKQnR5cGUuZ29vZ2xlYXBpcy5jb20vZ29vZ2xlLnBob3Rvcy5saWJyYXJ5LnYxLkxpc3RNZWRpYUl0ZW1zUmVxdWVzdBICCGQSogFBSF91UTQyZWo2TWdQb3cyZDVOOHdubldId0JwakJ0cUJwbHk4akV3Qm8tZ2xvTWpuWHdlRHlzX2VBRzRWZkgzUS0yNVdpRlE4cnhGTVVCaEF0ZEp1UFJuZzN4dncta0pIOWZJalZuVk1jbFZVWnpzdzRSVDNvTkt0SXVKNGpDUlVWTnh5NS12MTVhd3BHaTRrY2ZUTEhEeUVrbHVrMUVhRncaGzJvcFczVXpwQ3ZnU1hZTlNUVVQwVmd0V19Ecw"; + $pagedResponse = $photosLibraryClient->listMediaItems($options); - $page = $pagedResponse->getPage(); - echo $page->getNextPageToken();exit; - $page->hasNextPage(); - $iter = $page->getIterator(); - $photo = $iter->current(); - echo $photo->getFilename();exit; + $page = $pagedResponse->getPage(); + echo $page->getNextPageToken();exit; + $page->hasNextPage(); + $iter = $page->getIterator(); + $photo = $iter->current(); + echo $photo->getFilename();exit; // $album = new Album(); -// $album->setTitle("ycc_gc"); -// $album = $photosLibraryClient->createAlbum($album); -// Log::info($album->getId()); -// echo 111; -// var_dump($pagedResponse->iterateAllElements());exit; - $iterator = $pagedResponse->iterateAllElements(); - $albums = []; - $yccImages = []; - while (true) { - for ($i = 0; $i < 100000; $i++) { - if ($i < 35000) { - $iterator->next(); - continue; - } - $photo = $iterator->current(); + // $album->setTitle("ycc_gc"); + // $album = $photosLibraryClient->createAlbum($album); + // Log::info($album->getId()); + // echo 111; + // var_dump($pagedResponse->iterateAllElements());exit; + $iterator = $pagedResponse->iterateAllElements(); + $albums = []; + $yccImages = []; + while (true) { + for ($i = 0; $i < 100000; $i++) { + if ($i < 35000) { + $iterator->next(); + continue; + } + $photo = $iterator->current(); // Log::info($photo); -// Log::info($photo->getFilename()); - if ($i % 1000 == 0) { - Log::info("current i is $i"); - } - if (Redis::connection()->sismember("google_photo", $photo->getId())) { - continue; - } - Log::info("file not in db " . $photo->getFilename()); - GooglePhoto::firstOrCreate(["photo_id" => $photo->getId()], - ["photo_id" => $photo->getId(), - "filename" => $photo->getFilename(), - "product_url" => $photo->getProductUrl(), - "creation_time" => date("Y-m-d H:i:s", $photo->getMediaMetadata()->getCreationTime()->getSeconds())] - ); - Redis::connection()->sadd("google_photo", $photo->getId()); + // Log::info($photo->getFilename()); + if ($i % 1000 == 0) { + Log::info("current i is $i"); + } + if (Redis::connection()->sismember("google_photo", $photo->getId())) { + continue; + } + Log::info("file not in db " . $photo->getFilename()); + GooglePhoto::firstOrCreate(["photo_id" => $photo->getId()], + ["photo_id" => $photo->getId(), + "filename" => $photo->getFilename(), + "product_url" => $photo->getProductUrl(), + "creation_time" => date("Y-m-d H:i:s", $photo->getMediaMetadata()->getCreationTime()->getSeconds())] + ); + Redis::connection()->sadd("google_photo", $photo->getId()); // exit; -// dump($photo); -// if (strstr($photo->getFilename(), "ycc")) { -// $yccImages[] = $photo->getId(); -// } - $iterator->next(); - } + // dump($photo); + // if (strstr($photo->getFilename(), "ycc")) { + // $yccImages[] = $photo->getId(); + // } + $iterator->next(); + } // if (count($yccImages) > 1) { -// $yccImages = array_slice($yccImages, 89); -// Log::info( "prepare add " . count($yccImages) . " images to ycc"); -// Log::info("imageIDs", $yccImages); -// try { -// $photosLibraryClient->batchAddMediaItemsToAlbum("AN5jk27_faHwGa9qT0SALztx3zxTk4HUiqhVIDjxHQBxZ59v1ljIyA8Klsn2ZaxlFrRJwBAPPdmZ", $yccImages); -// } catch (ApiException $e) { -// Log::error($e->getMessage()); -// } -// Log::info( "add " . count($yccImages) . " images to ycc"); -// $yccImages = []; -// } -// break; - } - + // $yccImages = array_slice($yccImages, 89); + // Log::info( "prepare add " . count($yccImages) . " images to ycc"); + // Log::info("imageIDs", $yccImages); + // try { + // $photosLibraryClient->batchAddMediaItemsToAlbum("AN5jk27_faHwGa9qT0SALztx3zxTk4HUiqhVIDjxHQBxZ59v1ljIyA8Klsn2ZaxlFrRJwBAPPdmZ", $yccImages); + // } catch (ApiException $e) { + // Log::error($e->getMessage()); + // } + // Log::info( "add " . count($yccImages) . " images to ycc"); + // $yccImages = []; + // } + // break; + } //// echo $album->getProductUrl(); -// $albums[] = $album; -// $iterator->next(); -// } -// exit; - // By using iterateAllElements, pagination is handled for us. - return view("albums.index", ['albums' => $pagedResponse->iterateAllElements()]); + // $albums[] = $album; + // $iterator->next(); + // } + // exit; + // By using iterateAllElements, pagination is handled for us. + return view("albums.index", ['albums' => $pagedResponse->iterateAllElements()]); // echo $templates->render( -// 'albums::index', -// ['albums' => $pagedResponse->iterateAllElements()]); -// echo $templates->render( -// 'albums::index', -// ['mediaItems' => $albums] -// ); -// ); - } catch (ApiException $e) { + // 'albums::index', + // ['albums' => $pagedResponse->iterateAllElements()]); + // echo $templates->render( + // 'albums::index', + // ['mediaItems' => $albums] + // ); + // ); + } catch (ApiException $e) { // echo $templates->render('error', ['exception' => $e]); - view("error"); - } - } + view("error"); + } + } // AN5jk26hs8RC6kZugTYJv6UgfEhpFXMSb7__IKEspfF6dJaZXdrgBn1f0ztondfflE9kPuJn8eJ8 - public function queryAlbumsList($photosLibraryClient) - { - $pagedResponse = $photosLibraryClient->listAlbums(); - $iterator = $pagedResponse->iterateAllElements(); - for ($i = 0; $i < 600; $i++) { - $album = $iterator->current(); - Redis::connection()->hsetnx("google_photo_album", $album->getTitle(), $album->getId()); - Log::info("album name is " . $album->getTitle() . " and id is " . $album->getId()); - $iterator->next(); - } - exit; - } + public function queryAlbumsList($photosLibraryClient) { + $pagedResponse = $photosLibraryClient->listAlbums(); + $iterator = $pagedResponse->iterateAllElements(); + for ($i = 0; $i < 600; $i++) { + $album = $iterator->current(); + Redis::connection()->hsetnx("google_photo_album", $album->getTitle(), $album->getId()); + Log::info("album name is " . $album->getTitle() . " and id is " . $album->getId()); + $iterator->next(); + } + exit; + } - public function queryImageListInAlbum(PhotosLibraryClient $photosLibraryClient, $albumId) - { - $album = $photosLibraryClient->getAlbum($albumId); - $searchInAlbumResponse = $photosLibraryClient->searchMediaItems(['albumId' => $album->getId(), 'pageSize' => 100, 'pageToken' => '']); - $medias = $searchInAlbumResponse->iterateAllElements(); + public function queryImageListInAlbum(PhotosLibraryClient $photosLibraryClient, $albumId) { + $album = $photosLibraryClient->getAlbum($albumId); + $searchInAlbumResponse = $photosLibraryClient->searchMediaItems(['albumId' => $album->getId(), 'pageSize' => 100, 'pageToken' => '']); + $medias = $searchInAlbumResponse->iterateAllElements(); // $pageIter = $searchInAlbumResponse->iteratePages(); -// foreach ($pageIter as $page) { -//// $page-> -// $page->getResponseObject() -// } - foreach ($medias as $media) { - Redis::connection()->sadd($album->getTitle(), $media->getFilename()); - Log::info("file name is : " . $media->getFilename() . " and file id is : " . $media->getId()); + // foreach ($pageIter as $page) { + //// $page-> + // $page->getResponseObject() + // } + foreach ($medias as $media) { + Redis::connection()->sadd($album->getTitle(), $media->getFilename()); + Log::info("file name is : " . $media->getFilename() . " and file id is : " . $media->getId()); // Log::info($media->getFilename()); - } - $token = $searchInAlbumResponse->getPage()->getNextPageToken(); - $searchInAlbumResponse = $photosLibraryClient->searchMediaItems(['albumId' => $album->getId(), 'pageSize' => 100, 'pageToken' => $token]); - $medias = $searchInAlbumResponse->iterateAllElements(); - foreach ($medias as $media) { - Redis::connection()->sadd($album->getTitle(), $media->getFilename()); - Log::info("file name is : " . $media->getFilename() . " and file id is : " . $media->getId()); + } + $token = $searchInAlbumResponse->getPage()->getNextPageToken(); + $searchInAlbumResponse = $photosLibraryClient->searchMediaItems(['albumId' => $album->getId(), 'pageSize' => 100, 'pageToken' => $token]); + $medias = $searchInAlbumResponse->iterateAllElements(); + foreach ($medias as $media) { + Redis::connection()->sadd($album->getTitle(), $media->getFilename()); + Log::info("file name is : " . $media->getFilename() . " and file id is : " . $media->getId()); // Log::info($media->getFilename()); - } - $token = $searchInAlbumResponse->getPage()->getNextPageToken(); - $searchInAlbumResponse = $photosLibraryClient->searchMediaItems(['albumId' => $album->getId(), 'pageSize' => 100, 'pageToken' => $token]); - $medias = $searchInAlbumResponse->iterateAllElements(); - foreach ($medias as $media) { - Redis::connection()->sadd($album->getTitle(), $media->getFilename()); - Log::info("file name is : " . $media->getFilename() . " and file id is : " . $media->getId()); + } + $token = $searchInAlbumResponse->getPage()->getNextPageToken(); + $searchInAlbumResponse = $photosLibraryClient->searchMediaItems(['albumId' => $album->getId(), 'pageSize' => 100, 'pageToken' => $token]); + $medias = $searchInAlbumResponse->iterateAllElements(); + foreach ($medias as $media) { + Redis::connection()->sadd($album->getTitle(), $media->getFilename()); + Log::info("file name is : " . $media->getFilename() . " and file id is : " . $media->getId()); // Log::info($media->getFilename()); - } - Log::info("query complete"); + } + Log::info("query complete"); // for ($i = 0; $i < 1500; $i++) { -// $image = $iterator->current(); -//// dump($image); -// Log::info($image->getFilename()); -//// Log::info("album name is" . $album->getTitle() . " id is " . $album->getId()); -// $iterator->next(); -// } - exit; - } + // $image = $iterator->current(); + //// dump($image); + // Log::info($image->getFilename()); + //// Log::info("album name is" . $album->getTitle() . " id is " . $album->getId()); + // $iterator->next(); + // } + exit; + } - public function queryAlbumId() { - return [ - "B站羊小雪" => "AN5jk25l2xj_UNim2Xgb4TXS9MHEi6Y256I0Ilg2UVGlNQk6-gVPH_KybP8gmLVPP7oAoLPar8UW", - "kyokyo" => "AN5jk27rIB7bOn9uLU2dZKP9dFi1BiZCumy9AojMjD0e9gtIs6cmNJe--vMweua9lcRxo0bD_tyW", - "徐珺大哥" => "AN5jk25EY7SydD_oXiD61hdGRNgOJzC76QJ8ack753a7vP2i9xl0CzmITDxURxrgVajyttS908Zt", - "小仓千代" => "AN5jk24nP2ipRhnd4MHEFGApanqOY-DJfeLcemVZjPwI0LbkY9taEBg2YV6hKAhT08W3VViwvXxJ", - "岚西啊喵" => "AN5jk24izpAkc6FJzygL3WpUJPUE1tAOX735LkOTbeo2fP2GeUsrF92kovlah1AVG8o2FrvFJ0-F", - "小须须" => "AN5jk25-IHtbs_BVtQcmlb54hH4-o2TQItfqrnQixRp02YdzTr-m4ThMJ9mv4ndcczaDeJ6StNUG", - "MyMy麦麦" => "AN5jk27UkggfQr1QFNx7OlYHiqRJ5n_6R5hLOgtSSPwtxIIcpS7oqR8Rep-V8k-nxVE7IJab7r5U", - "一只小仙若" => "AN5jk251wDCqfYEV6kCSUKdFlgkOXtHUNfKFlwzYvhQ-GH60tZWVLxie4tzkoqaGXdOsp_4IIo1D", - "小深深儿" => "AN5jk27VCc1ERjTeUSbn6lT7rmUkJ1H_2T-fDVe8TbBUtvDkvj1LERVY3R43mMcfldy3MGPbRJ72", - "Fanpai Video Pack Part5 1080p&4K 20191124-512GB@Amber" => "AN5jk25o4csx5DsxCTx5ztuKSEFg30XXCwzrQ0f6fq3GDiNmIN1gKi0omxY8MvDXfBa38sujkEVe", - "sejinming " => "AN5jk25ztHdEAPN_aKSCjm1vjcQXvYFvDWhZb4sDsMJaVZNj9HjonGpP0AfGQwBH5bac1NDg9tUt", - "羽柴" => "AN5jk27V1c7Y_sAnM_kTPIrPeuLUx2WtrZG6Svog95sD20-3tovtypEOD1AwNPhcVsRB4yjBtzBC", - "mobe_carrie" => "AN5jk27ikbN5nLdkS9dGn__4QbJSUzdzz3tnWn5wahIPXtAE4T5VtStArpGBW8h4yUOTDYA_uwng", - "cxxsomi" => "AN5jk26UZYbn-OJT6XJn1iVgkoZ0gYDKzEktVBE1t9hjek8biozrqSVdQs_G5rG09P_TcKGT17Ti", - "chen雅臻" => "AN5jk27imv7LENP8b4MQ15-FqMAY5QEuWtktLO142vhmoIisjQ8WLYil4Ll5CRRETFWWFPFR8gZL", - "贤荣" => "AN5jk24GFKFRrgI4ruBeDbUutoLPwX8IyxiVAkp0il0-I0gcwMdjFRbK3zNDkUnfmgyPqFcbH9xY", - "boram__jj" => "AN5jk25F0QGJCKwEPIXhu1AWd2gOJpR0a6s5FxYODjHtut1pO38iPTsMnGP8ouyqga6a2Ive_yk_", - "insLike" => "AN5jk25Bgx2WPGUoL1R5wZ6P8_PItRgNAQPM5IZOwoTR8fEWXnBpHvgWaeGG3jurh9hQA_ZmnNPh", - "naughty_rabbit_" => "AN5jk24ml-vQd6R505oNneX-4iXkwINm2CtnYU4Lwr-z7LjLPVjY9mBJlLlLGM3s4_WTh2DLDg5b", - "小雪" => "AN5jk25FECceN0LL7UkqEIw6a_rJKk_cvjuw_3VIDdkcV_YwYvzOxNDshTDr77cj534Pxa0UqA5J", - "姜仁卿" => "AN5jk24K7uRir3spvA-4MS1PoliwyMQP5i7Q8kZCUrstN39CSqG9QA2VBtdD8cTGGn3-oCx6GFKI", - "芝芝booty" => "AN5jk24q4bCrA8bUCwgY8M_5DPzms3XA3ooLJYsT8xZIdMhN830kM33b4VbeeLXp3qCzGGGQ-x4F", - "zyzyxin222" => "AN5jk27yI84XcpDBnqik7X2qJGyY7nXU8ESa4NaR2SltjPBK_pk9zwfs05zzrwPiaqp7tRDZA5_j", - "2021.11.30起 杨晨晨 + ycchs" => "AN5jk27oZ9-aysBLbuG82bycEmyrMI5asHdKO1jRLyWTKcteFZ2ugkQk7qsrRNf0FpSEouYng660", - "王雨纯" => "AN5jk2677PpTKkwyCw7cgbZg3wLCmAni_IE5o-iPAswl4XUqHawiQFilDmiMB2lPy6I7UpjjdJi5", - "FC2 " => "AN5jk25hob7HZ4ko4QKQfMJTofP7IjCDiiyXS-pW71t1jDF1GaypcfhgeQ9NoLxBbwEQFYePUF38", - "小琪" => "AN5jk26ponvdzzSYNIWYzk_Lm3rKYKROCVQ33P2YJbJuX5_3n5ufX18DdOS2QUEnIfw8-iCSR4Q3", - "是阿朱啊" => "AN5jk267FxlK3rVCY8hIPQVfgq7zSyQpbYvF6yxsWDQsaddYeSYyVlm3iigbMq1uFENtrK9z2669", - "黄楽然" => "AN5jk25mAKY9jeO58fXWRK2I6dpfypHPg14KFaFMr-3KF49MS0WOBsJf5B1Id9p2m7RqbUQhaCYf", - "iPhone手机" => "AN5jk27kd8Rf9amIUIaTvns3ZEf_L8eDwzX5fbDoLD0L95g8g74-mp_DR-4Fo9_T3enasyQq8d4Z", - "weibo01" => "AN5jk24JcsN9H9SE_qye9MLzvuX1YykOT6e6SQtjciV2Zlq1B1eNbka0aKw77yXEUjI3JwE18TPt", - "国产视频 91 精东 麻豆等" => "AN5jk27TNaI6ja3GVQTBAw3p1SDfRPhzoodIp5NY44HFZlJ9D3d7i3keZjXkY3HkWmnuOPiahfW1", - "china_cam" => "AN5jk27N6gV8J6MTTv5ST24enUoQrXpZ47AF-aCdPNIK7ek425fAI7ekFz_u-k9EpGw9rYybA9dX", - "bilibili收藏夹" => "AN5jk25Le2pL--4IUGFCJf27arcUDvT4SP6N5wxS6FmjuWYk_4GKDoUoIPcsxzNeqKthweAnA4dQ", - "上原亚衣" => "AN5jk26QM6DwYjJzha8l6NHNKqrL9xl3DtNsMhabXk9x6yM7o2vBKCTIkXjMmG4JuZCb2wmEf4h2", - "hello venus 宋珠熙" => "AN5jk26gSZ4SR_ofcI8ulq98P5F55-4QYHD3D7pWRtyj3R-uzo3uic97zZGpby0pASdsRt--A8t-", - "优质女团" => "AN5jk27NWRe6Q7BfO-iqJwKi2r0KhxPvGjqpjrZnyeI9g347uJXgm4d7CyXcQYXAqb0677WyRh3v", - "小巫酱w" => "AN5jk26Z4gt7t3ipYXZ1iIH7ag3PyVc98z9lD1oRdQYSRAgZH2q8yhcbq3-NwaDpHIR6a9u2FSwm", - "Misamisa" => "AN5jk24df5-g5rkjf7WbF07r8m96VG8dkVGhHN8cI_i-l9_7y5QXaAy2aMKpW-v7jluApSdNBFYd", - "伊東ちなみ Chinami Ito" => "AN5jk275ufDnx6YFuWwxqGzd46Ms4ZhxY33FaKfSgfbXrrWa6J8RydXAnh5mXpGlZNGC9Nm4bvh5", - "RCT 001-399" => "AN5jk244NQb4gqRwzwEHP2m0Zj9Q_48y5eym_GgEPGJMhqwAFWU-2goJh9ycClqbk61f6SoyPAj_", - "扛里个扛" => "AN5jk27rFjlYff1GLWJT69TXtZe1F3dRZYaYpBiwcPzsYR2YhpbArOkNbNxSrhd4S0_Lbo5PNZM_", - "hello venus" => "AN5jk25srua1dMd3muXICOYzSR4Gt1HckB9lRvtv4q8BrozVlbJhiXyyFOpNzko_xtNUwSwby5Mn", - "智秀" => "AN5jk25ZKvClorlQXnqbwLjsJ2xhdXghgWPn5Gw-ZQr9sdNQrVRYsi893G7zSFmQT3TZK8YQOcvC", - "裴珠泫 Irene" => "AN5jk24I4-BX364rrZKfy_XwZ_HRwxKtkrP-RS8R7iokdWmEF0pxAN5_jBq0Iltl_TI0zqFDcRXF", - "新村あかり" => "AN5jk27BIHOLylpmlKti4wxxBST7kKpNqhBWpf-LOUoz1aB9IzD67-QZNggJnuuhjoLvlU0q9s_t", - "少女时代" => "AN5jk24QmEgfeHp9IZrkujEnAMPQIWtc3K4KTmm1BoOprn4Zf-iWQfSsXJT8G7N_Z_xRMLLG93p1", - "tpimage video" => "AN5jk27de0SmuWLC_NAsz6-ziBVAQ64nLaZD5hhUc4WQs2Z4eHg08l0I8EBYJcQeM_WxOdtvra8N", - "acfun" => "AN5jk24RfoZ8ra5jstLcLsl0gCQnACbabxz4plLaoa2LY57AUOrU-C6h4qLX4FcH8BkyEJsvJJaZ", - "小清晨儿" => "AN5jk25hADdDWK5VFrgII5kcw4WklzCJcBzjCuLE8unXnItpr189NPsIeUdKHrbsQKTCE8vz4y4L", - "momoland" => "AN5jk26F6vSFQEnvaoCqJDRrwtQlsCk3M4S5IRNsT_yAu6HSZ9D8MMW6MGE-_N1Jax3Zcsppu8Jy", - "momoland nancy " => "AN5jk254drfClWR125lhSQKfrRfeDDREOenr6h4FH2rGx1qHZg0TDLQr2tYfhv2_WlQjfdiknQyP", - "几兔灰" => "AN5jk27kaKWK2bJZLniHNhew_a7GLTvAXbkdb0zkYRy5WVkQS_XXHpkOfvWGnXwGPvl1kLOs7Bno", - "国产自拍偷拍" => "AN5jk25YdiBaTiYEkBFQhJ7Y8UoXwYXJxyjy5ugXXyUZMzJAEyYY8slix7JLdPmrrwInoX1cu32S", - "Premium Bukkake 2160p" => "AN5jk25LapcCGG-dElWnqslBO1RScTi6RCuU4vx1H_Z-uq65GB8Er-kX-csnNscL2vFjJN-IRWum", - "Asa.Akira.MegaPack" => "AN5jk25bCDMrPpxQC3MFfOfj07IAqoCbf_N41lpljEbDPe2pxRV4gN28nsW8uuVDBEjXTWlOPTl_", - "private feitish" => "AN5jk25rT6HJrxLb4KkIGUvgHCiti2mDzAbZA1YHDoo9gYSHyzLC7UC8abU6dEXtFX9iN0ZwSsWD", - "Red Velvet" => "AN5jk26usFpFuj25OuenmxOuKbK86IwzVm6kDD00d1--YdxTpe8Y9RuaFsL3vhbrFdT2avlf0OSY", - "扛里个扛1" => "AN5jk25j3xa1RCdIemJgM4yjoGJ8ROXhRSuJISGsLOgKB8QsUs2UGqFu0BCy-BgEcsHpIxtgXCgs", - "91丝袜" => "AN5jk26SjenRER3tHQLNWg2dzFlbFDuy2-40nEOonTeEk5kkcFn2nK1tpicpvlXGQGjSg2gq9qpI", - "清风与鹿_Deer 丝袜" => "AN5jk25vp0XQLKb6cWOiTOOvYxkGnAsCTiI9VcoGWhb5jG7LVwK6VNY15y1t9Nboei1VKScR2YHd", - "外国小视频 Jillian Janson等" => "AN5jk251oKvUI3lDKnDI2rstwPUaUSOD4_AILdDhLF-04hrbPOKGEJAUV-oId56bSH9tawn1rgrr", - "抖娘利世" => "AN5jk24JCmkOwg4aSiOwpUmwsZ0sxS3Nzhim-6KP7nCIPSgHKdsTIvtwgctxe_WW_N4lPwF-RLli", - "韩国非著名女团spica等" => "AN5jk25gFqAHKWHzLGpXKMRhtdMCV7zy1euQw6_CW6PieAIZ-wMYUfJoNFgDGRZjf4Eb1BQ1EYRj", - "过期米线线喵" => "AN5jk27AC3AE1vlDN4ZS_wQrWvL_yR8wjav_9CKuVZpC3h7ulokooYSzhrsWDAHwN36cQcMYWNNf", - "stellar" => "AN5jk26wLh6KMfBt33gkUwA8u7e4sdAwahMmSUw99_zd00JuR7uzUo56YPJmAVIzmJhH4RC6eGWu", - "Dal★shabet" => "AN5jk27vFKaELRJnRqEIRGAJMHl2a6qzH63JwF-saM9bCzLql-_5vkevEtx0kLZpzLxPAY157fOL", - "雯妹" => "AN5jk26fSKAZyrl9TbUv083UoEPwjgqM2NPibNvNWPNlQtx6WTy4QF5EBcOyJvT6_4PK4-5oAgyP", - "徐雅" => "AN5jk25v7p1PdXvzsDXudpeWcoLoj0ZWwEtTLS1dv9q2SOIzDRFQER7pRHb-saawfsXiRx-vSKaH", - "JBD " => "AN5jk25I32uFGYIUAoA_F014qAlaWe18p0DYY1xA4cvi8G7jSkOa0HJH13BGtnUj4LXu1NRfDRRZ", - "RBD " => "AN5jk25KzjNUbsfYNLUq7oiqK6CsIimP15FwpAztnbLByFHBEIz1_7kiDODOCxbdRIA3l8TDDm6D", - "金亚荣" => "AN5jk26rqhcWhVX-Q6Snfir-kOjHvBlRnq1S8dXzKtHVuK7b3Yg1KaRU0eQg_ZkzRngo49t5t5fx", - "girls day" => "AN5jk24N6PIbhvwVhxznuY-DPnsSuhc8SkO_am9Tmm1SEiDf4WMkhpAqBZzZMguLAHj2tJl8dmOw", - "aoa" => "AN5jk25zUMcgFvHjXlwVJ4q89qIcW0Cwl6X1KdB3ULU29PcD1uwQRNVrmJGmjbprkgEyuhecZ-wE", - "惠晶" => "AN5jk27Qcrz0mVT4N2_PXIxtt8rxFSiwTa5pa6He7Ie9N8YjQkeHGbz8NFBsbRL8n6tyomP4_ro2", - "洪真英" => "AN5jk25itTMdzq48a1PsJHaDaKyxYvzd94I9ITjZMlb0jdhCMvMjzSUcMAoOtZLQLXZurqn18m02", - "FIESTAR" => "AN5jk26HrEC34j8Y4RHXN12IbJY4L7MV5PAvxn_JnvnUP8mw2VRSIsr43qA7e2FPto2rN2vF9hlr", - "轩子" => "AN5jk25lXA20YReu5dRwsmi3Gli52eeZ3Tv2KttxZAM_4LdTrwiM8_tVQ2us7Qbm4jHLgfsJvpkj", - "hani" => "AN5jk26UtqkKnS_E72wvc4cg7pQY_J7CD09k5A1-6Flo2buoGv8W-4obg1noL10E3EZduu-eFiKk", - "香草喵" => "AN5jk26hs8RC6kZugTYJv6UgfEhpFXMSb7__IKEspfF6dJaZXdrgBn1f0ztondfflE9kPuJn8eJ8", - "B 站 主播录屏" => "AN5jk263ilWJTa0p1RFA4CtM6kqvVkRVTXlnRbjDwBbbITtsXaNPkrr8opjzURWXh3LLYrzrG8-o", - "beautyleg" => "AN5jk24Xv73jofZC0dGg8YZhihZPdKYdR9BSAnd5jni50GF4w9U1WJK7zuXb7fde_TTl6Lvx2qip", - "老片" => "AN5jk25rT4g7Gjmyq30SS_KRC8CjNiM5xguqQlVT76DxrGlZhBvCPyaSnCk8WQ4rLXhMwaLBtMm1", - "佳茗" => "AN5jk27wffk0AXbKtDwZCbiFJqvfjAVpu-MyKtlkETQHrPrPju0_rB5NiGFN72n8jCuu1ICthyPT", - "允儿" => "AN5jk25Mx7NlRQT71sG2hwcqXxR07YTMQGJ0bUAsS5GtC2bef2m8dJOBKFdS7T6WC2cQmTQtk45J", - "weibo" => "AN5jk25Ma4hPaY5kbJr9TrQFughTrhpNMQR7X_tgMLeSiYY_d4ErLvzRNgZXEk5BFR0tUJSeVfCJ", - "rainbow" => "AN5jk26Rr6-yVwE6vf2-16ng6HlyODV-gAjSpq-AzTt-tI8PkSN9qP8gWFcciHpjqKzcEWEl6OgO", - "BESTie" => "AN5jk270TMJjLRsadsozEhFttJkfFdiZiZ9Kv2HVxkHX7Wg-ahAHBCQlRMSjLhF85Jo5_xu4ntMQ", - "BerryGood" => "AN5jk25lWSyf7t4AuaQdTDMs6baCnPUnQBtKlD86GW_LAdL7CKLf_ZkUNgCoemH9H8fn26hupJTS", - "tara" => "AN5jk275Ovb6hHBF1K1nVDCHnw0Hxca8TgOgPa0hq2WiqcpXaSdb5pTbxqWFj3c8o0gDUiOpTMqF", - "9muses" => "AN5jk27OiTayPRuN7ZpnL8K20Ahx7cr9QZvR3Ytyb8c_tlDVX36DUTAoYVpw53rkKVExIMYKHHsq", - "腐团儿" => "AN5jk25xdKYk19YFjCfX2pHO49IR_YU5aR561hx6tTUnLFfocNSt7ENcw9rFsF13al0U7PXsMhYA", - "hua" => "AN5jk26_0XrVdQPze3Se_h6_HpXCSDjg-3IMpQwoRrevpJatTOYxLo-Hq8h6gae8jKgUDheyxlZs", - "陈佩奇" => "AN5jk25Fa5b6_qxKk23EKdeNcn41lOti2kfAJT04_P3ExyB8kL0UYb7Q-OoVy75dnrOuU_J_1lO7", - "NS允智" => "AN5jk26SB-uiegq4wbhvnl4n27VFVuI4QB_C7HW-441FqgNNfVt9WSmfOc_FG7mlXSr-Q4tszf86", - "大忽悠" => "AN5jk26L8xf36JkDlBSuJhYKEOJ4dzo6SD6QigfcYfKLtqyr1eDiQ6Wc97JhdEu7VHxC5Q_ytf-j", - "柚木" => "AN5jk26HPoIe52h0a3TSazT83yQd1eLLlNzm7qfJk4YKeSzIT-CrEFr1J5l3nXgaycTSwWxMfczj", - "耿清清呀" => "AN5jk26-B5DA3Z7MN0DwPoUW_HsLoV0jXPdTL9H7YIhswBJNHGSayw2HRe-Buv39LrK4cCXrOCbW", - "白银" => "AN5jk262SrJvPxD3x0CGRvHft17kudhcaSCVl-xPPinetvYsPNg4SVLBTMgddkcMGNgLEpcGsi2A", - "富婆七奈" => "AN5jk25zbDgcl2Yjhidxv9eoe0vBpyVUEQx9rVbz7YlSaZ1fr4nNDDF04ZLs18y7fPmgngiUt93g", - "绯绯" => "AN5jk27waUcw3T5TMo7AWw5aJM1qSM71wxeiMlEU-WqJ9t0SVLXDzV5Fpsz9QXV0IQaODH-4RIa8", - "小短短" => "AN5jk24YePtRh9c2grUel9dyVnZzFtImqouFCrvH443k97GCkc_smfSht3IOyTZmqxfR1pZBjWkf", - "koby" => "AN5jk27Th8MH64_M1zurWFb71GMZIYoufyo7JjyKk5l4WERRm60QSYBY-8uwtfh59X1T9XjHganp", - "韩国 Yeon_Woo" => "AN5jk25rGnj1kvmT6R_tgDc5Ye90kYaMt3JI3PNQpLMY_79ol18ZU4yyruIHwgS5bWnGhn_M67Om", - "强迫attack" => "AN5jk24zuHq1U9gU9QoUngL9YhKJBCRLHsDYHGj13_tMgDNCPUvXkQM8g_N6z8PKztsQXviFYgsM", - "tushy " => "AN5jk25UX7d0_0edFDpmHfTxfqwzb4FAgQ0baO_2JaJ2kh7-mKygDUncCqwQNqrZA7KGkN8yXXyC", - "AssTraffic" => "AN5jk26QzLBQLnfz8CN8T3Ajdlk0B-U3VWvSSfBJxg4R0vgZ1MDysyB2qc447abWECoyH1niwnxT", - "Gfphotos" => "AN5jk24YS7o-f50AHFny_qmhQlRghoJdyLgI92mXHciC5MYsAglGpXkXYmDESTHCgZj3bTnrGafA", - "酒酒老师" => "AN5jk24aAjxO7RAJf-AFV0AtJCjEWRYJikyll_Jf_HsdG_CKL8YrtLWH3l6RDrsbQlGfDIGL7DNZ", - "candice" => "AN5jk27T2dL95mPy2kAG3AaWFusKr2mZsGPp2k-SEvi5osggrNhT3CQRQn8WBuAyRtyU7_sbZ0rf", - "ParmyAU" => "AN5jk27pvLiA3SLWLYGNBp2IOJG99frl_XrUs1x4QEb6-itDQv5kV9S4msLAJJPSK9jJks3435GB", - "exid" => "AN5jk26XM2qkg4I5DyYUUE52xvgklyrIvZEXcq2bSaNfqImMsL95TeppBQA-ywe5Juxu6_LYG31v", - "aiss" => "AN5jk26_LgbmNzsiDXH47dxnr8taCwDsy5_kyvNjimSY9Xu5_FMmxzx6BacErqL6ieu_3E4NkF04", - "永远别问为什么" => "AN5jk25h3kTly3pPDjJQ6e5J9cYvPnYPNqv91arbeupp3b_r1XqzIcLJqwccFKrQ17NMelNP80IW", - "蠢沫沫" => "AN5jk26BHSyHTVm-ble5PgcS-zWVa9MjDytepZid0Hdn4BTH3qYnZHVp9BPstof50h913H_X1klb", - "麻豆" => "AN5jk24AdxC-jhsNkbwZGzz-slrFNR5W1w-ZreBXUN30K8muthRH76-e1vmU7dyVpK-3mH0F3cxN", - "周慕汐" => "AN5jk269APqrEJDRHkBHIHfJysg5-2aDvt1V3FYDHEx_o9GqRZYs7kr3cE5wWr7g6lYy25pcz4Kt", - "尤妮丝Egg" => "AN5jk2584D9p47dVeWQPwuCnpHPqMayWfhadFD5gk8UNlAk5E0pSMRwe0eawZGEVN3REPvv_xpU8", - "鱼子酱" => "AN5jk27orvZcFkktN4X7NNMWG94vFT-LV-xT4BeOZ9PUq8B0DzPcH63QfBhelqtY3Rwsp6bW9Rmt", - "绮里嘉Carina" => "AN5jk24qHCsn9m209sY6-e4zOJhanYJaLnUi5Lfr3U4IhK2eNbJAznDezuVJGby5kS7mdM6qqacY", - "周于希" => "AN5jk27I8tgcbQ_709S6pPUIuvgtTxvN7TURkuJNm2H_sv-5VjnWR38V7x4psclkk6iPj2tsiL59", - "美桃酱" => "AN5jk2440eEPLvNjBAo2FIi0uK_4cpI8k9rfcPegUgtTC1KgCZ6uLd_AJnoyr5gttJobWsufXkgA", - "王馨瑶yanni" => "AN5jk25Dj7w_310PIbYq6K78xYu4k98cIYJfitCZjx6fE4ijKFVhZT1kyGVFOb4vhFJa8hed4uAK", - "柳岩" => "AN5jk27Frm9FMK_BDERvGT84GkiiDSs_tfdbHH6jIrnMZ4bixQrNvE0kQMXkyYh4areIygaYe09q", - "好看的片" => "AN5jk27y5E_scjN8UrrFDDsUXIAKdgXjerctOLC8vL6dhADUcu16NNnOgjZ_g47lrwxSAiDtwuuY", - "探花" => "AN5jk27Vh7j2EmTkKLOGRALG6hxu2x0A3km0uYd4oCJSJlBV8MJo6-FMFl-WOKgPaH3tOxFJ87yh", - "anal" => "AN5jk27rXEmJduTKQFA9AcOpg1ctrBv9Sk--IZvBHL3mM18o_yg5jIgY9hypEcS4LWmiImVcltjc", - "田中ねね" => "AN5jk27lYm19YZps-KftDiOzwXdtAxhbRsMIDDaOOxyCRxpwjHPFluRHWFc_2P7TPf5ReIL9UtCs", - "高桥圣子" => "AN5jk263wX5ZcA67su0GXQaBdfQXcUtW7Dg_VikmBXXqXzsZFN8C9-Y6WSvqPyzw6vqTpLSPjOLm", - "Niki可雅" => "AN5jk25kgq4e7c0yiANf_RCAKwUVorXmv3PQL7pdowDIrhe48mXP1E8M2_f2zjFjftx35BO2XwO6", - "御姐果儿" => "AN5jk2674kz0l8gnMggb3iS8hY3wiV3n7OOarS1NMQj_JkbaaVaWOR-7MOl-NPkTWkjnipujEf05", - "梦心月" => "AN5jk25-DBfdCrNT7oNgX9r5jbR3BhzgIeV0Tw2moi5DaEcI61B6KFwb97eylHOzZ7M6nBfz-9fo", - "安然Maleah" => "AN5jk244N7j7YTnKU_LO0PkTsbrbfNElEXKtIYPLAZJlMitu4lpaCX34xK_H8FhTwTbpZNtqexPk", - "朱可儿Flower" => "AN5jk25WP3DlMJ0w5246hRKt4S6o5aH7kotGGxI-IywZdLIrqqZJiBnd3gAKJ8cuifwmSdP4V9UZ", - "小果冻儿" => "AN5jk26Hgr80inVJUWmuV1sv2Oc7i46f-84ukOVoE3bVjse0Tnl1Terf338nbapGUsba72NmJALi", - "田冰冰" => "AN5jk27mU5K8F9krgVn8ziSh14YP4bMZLpWthEz9IeDZU2Y-Aakmtt6CJih7Xh09ofvg5oYiADWW", - "夏沫沫tifa" => "AN5jk27tqBrYR1gYasNYZCsn8sUXKWTHAoebhsC8S7biKdHRk3IHhRXflAoj1_F-m3TWBRYu5Py1", - "唐安琪" => "AN5jk24ACY2BbWyge5DJ13ALpDOvKShHUJvK1khqwPULWbfFI6L3Oy_B4BN8MeoVMh3cUoS7OC-T", - "ycchs" => "AN5jk26M4hJ-wxLPKSzIDyjruMMkWjlDlVkgNaWWk3d3c7TGhm1vKU-YM0JhfgK5CfcfneoIx_8E", - "辛杜RUI" => "AN5jk26PM5Hgp6UxoAHjAwi0NZPjO71jO9OHng3fzuZeuVGRM6VHYtql0SIorjWAS30Km57nOO8-", - "萌汉药baby" => "AN5jk26Y1XGWa0CrsIJlz757NDvlR1A2MMXqnhNeTmjosI1GZWAJR8AcdEQRRwDTX1qGaxNYUQAr", - "月音瞳" => "AN5jk27Od__B9RlZDabBu_Xxv2LONhHERm8jnYO8XnhP9rrFZKwZTvEJl_MJZR27BuHnWmF1ryGL", - "陆萱萱" => "AN5jk25aeqvoYpV7XT2S4Hgfw485ValIgsQr0xnlIkj5m3rIJebkkIxekJQo-R4PsoIubhwxkaXX", - "大胸主播" => "AN5jk243kNKfYSu9EwBoEc97ZvnMqmtxxapITVrroAOJyq6QIuU_BXZbixM4UXC3dlH_5ofGIzYm", - "诗诗kiki" => "AN5jk25KsvVM7NeOG72-QAtf_CiRfDUhsPJ3nFLCPyowifZXfM5yfkX8RtP2fB4TalG8m_-OBQTN", - "言沫" => "AN5jk27QjbVjxDcOq2p0atoRpircBldq1KxqNIe3DMShh-LLKSGCAUKtMyP5dxlmOeLmKzfveuOb", - "一颗甜蛋黄a" => "AN5jk26Gd-b6VY6uEG5g708kd8GeMVW2McbSS99zLSgSNpzOW5vCa9u-C9_rNyWTuBFh57iKTDKj", - "久久Aimee" => "AN5jk27smHBnXhvbsUj51upTtiio8wHN2XIP6PGFHyIl0Vb017PEu9gASB26yLYVLkZaFxd5whfx", - "潘娇娇" => "AN5jk244kmRvqKN6AXax6VGSEZrFn8GONp6OxGwABXvT9hM9Gl1Jxbb2Cu4kJgOP_z3n-8h_JCr0", - "艾静香" => "AN5jk2657xBZ22KmrbozalEt0ZWQP_vHM67ICQUqxMpceUnin9rR8tAE4nv6pL6Qqaidhr_T6EYL", - "美七Mia" => "AN5jk265m7FP8RoEMomovpzElbF3NHk69Yz6PWqoRZk1QjXY6izfiHaHPcvVBuEiBYOpFo54yZyy", - "宥利" => "AN5jk26nNNnMHb_f5QDdnwwcSczqcxd5W6KRqmVE4X-yNycmvlt_w7kw6pt6-vqXgcNql_u5xwBt", - "apink" => "AN5jk27eImKZZKhBkvcBt3Ata77L2v5E4sN18Pqt6b8burJ8LrWYEL_5np01IZCVXMlBegvS9B4C", - "萌奈子" => "AN5jk26KQavf3Ow0jzGZYocSocxSZ0DyX91VZfooIKEvubbfbCWeu9L8URFP3NUqXI1FndrSxH6K", - "紫颜-小仙紫" => "AN5jk25rBo1XtR6YMqEsORlPG0T7p58D3X5VxDukt4P_cHbeJsN1AYUaaqYTky_lyvY6b7vfEUxR", - "凉森玲梦" => "AN5jk24_FMtPMqDVZQP_1R8GcLnBhNWbmpUyY7lE2qv8spgXX9f9rGYJKbEH_yMejo5p_Oo9gRsH", - "橙香静静" => "AN5jk24DBuzp8TrHz0sf41Y9_FwCPD42iPxklrQ1kMuBJE4TTG_O_u4mvfuI3rc2-77U7oeldkkD", - "MUM" => "AN5jk26ES33cohHyfGyLI8rq2nsuA6QdUgrQbm6Ao51_hE3Ykyxbx6EGc5bIz-cTyHcRSTnC8R5v", - "hook up girl" => "AN5jk25MYVkoRw55UZNrH0yAAyiw64E1o_4OHU0_0Ctqx1VctB2MemBU_p_mbiCIRs3bYaYT_fBB", - "白金Saki" => "AN5jk25puSD6WUF3UYUuYWTb0uG1wc2CfEsxENDhD_Z0E00JFdwPbR3iqrBXzbx5REMWj0wjwu53", - "夏西cici" => "AN5jk27xNBbGKmrsdCozR45pGt7vSZhY8Y1G6Ug0GZ8E2WYUfx7ZUjn0XZVTg-EWJaS0vgLYBBvH", - "允" => "AN5jk26iM-KixSiTrGjmq7lgA7HdV9fVPhSzFeJCk9AhlTtRFAuq4NAmkheHb_f2o_enJMma19hP", - "唐心" => "AN5jk24m9IGmtCx2iUYGb7LjAmzPIOoHqzBrzwjbGNC0fxBHxoiKYjQos6qUPBMN9z49wm3muHoV", - "痴女" => "AN5jk26HiwLAdaRFnoqdlCAR4KCCzC76_TLhoZJXwAx35d3V8kqk6iIJF6Gj9HhZHppjtfFK-_hJ", - "李雅柔" => "AN5jk259PTcLI49JguztLliwLs-WqEPNdlDRGocB2mqWZctGb85mMK283lmAOU1ND4QIFqbZzyqM", - "明日花桃桃" => "AN5jk24rqzMgAd-FanuzuJDaER9OGpbRDia2ms0onFbPL8FuoA9gF0pViXVaSZqRX90sfX_SgVAD", - "徐安安" => "AN5jk25WM23iaBD-3gSBjLTEqsWPHJHbmpv5Ymp1fMPhRk72XLv9cC3KvFrDBc5xKUEdECBDZO68", - "小爪几" => "AN5jk27ykEfWrNja7XWuIAtV1DgbcMLF2r3El6lFPo7eKo6B6cb7C6fJdYDlXEtKG1b8TLoPkqkr", - "玉兔miki" => "AN5jk25yYhJ2jptMekT29_0r1Jp3EZy55XhC4uK4_sQyQry-t5jkAhPb0Ra_jZVoVXmZb-qCLtnW", - "尹甜甜" => "AN5jk25241u9omLUYONVD7O5k0sNJE-ZDVKvIQvV3X6RuHV6ICI8vkU78_OndLp3V1IhoUbOqvWl", - "熊小诺" => "AN5jk24z4PoTYM0oy9WZZZ9ygtPnTDlP8wPt-s9L2bRbb-GKld1wl4lZHCX6_3PZev_nJu4OG2Kd", - "豆瓣酱" => "AN5jk25ImRsMpwvEgpZ5do6CIKjit5lCEgwe-zM8XvCWiQxlBkpeuPyln8UHQBPrVKW1Wdv_cWhJ", - "张欣欣" => "AN5jk24xyL4XqEk7ZrzZIOqQ5eQn4Z6tFXH19RyVxprWh9r31xVUHiopc87c9sn1yUyqhjxe8VvN", - "Arude薇薇" => "AN5jk24A9MJzalEL3Y6DRDizE5aHJVbUQU8wHLFAkfY0VVBJXWhXE_hv6yP3uZzJjyFZfsKSJLTq", - "刘艾琳Allen" => "AN5jk25PFtha3iqdQi8nq5TYBcE5zev8LXU_CAfKKp1bNiqXMZXgGz31eh8daRo1OARkQs8waFjM", - "蓝夏Akasha" => "AN5jk25dz_j_B1ojdfFeZ7doqqFydfE9ptRMSUtXzCKUw8s3TMYC6hYbyOFW0W3ywzA5q0Dq0kCa", - "模特合集" => "AN5jk27X8sFbzAZ70aPozVdFd1NVK9I9GdfZCXI19u6r9C_U33tIjPJ1gwPZefsYmKJMQC5dF0XN", - "夏可馨amii" => "AN5jk27vx7HY11TGNkN-xD7GVgP7oI2zKBDcwTIJCvV4PJNvtYd4XOs6ms7qU0vmqZGHJwd7Tp3Q", - "沈梦瑶" => "AN5jk26ZMepGRkHFi1SmczIy9zTMBrYDyBRmA5ySoq3WZspSvwK4B-8NxiC_LEB8QTHKQK7b9rr4", - "白茹雪" => "AN5jk274Nzhp3KbN7YUQreqcgocMY2rCgDs8AksaAlZeUJXrvmqwddVmaRVjb-nNmVSQ1a_f9Msj", - "奈沐子" => "AN5jk24hd-zRqP2ZB0BUC8fvZqsu5rObLsTlGoZ6pMSSa6eFvNIXRNV6S4Y_fxcoESur1H-FlVCG", - "韩静安" => "AN5jk25nhg6layVcZz9WJRhklnZbDlvmJlEPhwlEQcGfstjyML4wkmsHth1Vu8UKnHXzdgN_mWH5", - "玥儿玥er" => "AN5jk24t3FFWyj5G-VBaKcyXgHDs1z-jpNfd_9J6fAh3mbk_WGPVrBIdleo6gUxVgwIG5z-ZZyFj", - "MIAD" => "AN5jk2671bubTQlT2pWWeJQBS98UrPMkkEwt2GojjHKbIvU2W4zIeXP6pgSdDNGvCshNvX6dxSiq", - " 吃一口兔子" => "AN5jk268J5TEFhAOmcsikeOvNWa_hYPfGdUc2hK2jgWxxpxYQgwvhJhO77IAVwk0C3ULwVafp6ov", - "SSNI " => "AN5jk27__JDjdzUH1FX0nbTTWY_j5tpRtslY4XHzfl9EDYuhwGgM8kBxsXJ3ljqpWngP5XY_p_iI", - "吃货小绿" => "AN5jk24e_ZCFgYfGZ3dv1pKtjy83fV3bbsRUaoCVZ2KiSEk8kEx5mOqGYGg8HwwyBVJFsaW717oR", - "布丁大法" => "AN5jk26n_vGGqnxxN-pF-ef1qjMk0hdiX6yrKH719eS0v8d279xaGIOwfsLsbpQOeSRi7YG0VQJk", - "隔壁小姐姐" => "AN5jk27rko65IZlqCtkkQMVoBhjaqk9eQMiTaZET9Gizogca5USPhSBtE6KjsajEUjXX9ApLYGmm", - "kanami酱" => "AN5jk25Ho-FKpo6a-8GX1AdAWluA4aLRN1Tdc1ttGzdlOKhaZtIOw-GydX91jCvwhBQKRklJ2O_1", - "由衣酱yu1" => "AN5jk248VYP6Zz0kpFx3aF6c_m7yyi_Q68Cx3TcuEyEtnTyFo6RbAgugMY8t5vdmrWsaTIh_oX2j", - "猫性大扎" => "AN5jk27_FCpSMeU8kyh1hV9yiy3MQLm-UoB0VwZ0AzxwJRasBB4fwGbvYTaIcp6SnylPMP4ynXhw", - "Leghaker No 111" => "AN5jk24rwAXQXJMG04Rumyk-XY3KGqNL7jvWGyco8QQx-sleGwXbeoG4BkOcL8qkoBgjpPpAOkt6", - "TouTiao头条女神" => "AN5jk26e1G-WHKzcDMa0sNjZFw07QD77ROP-FOwaKAXkozMSM1sXP4fSJKtScuccSyRXTCziSuqK", - "[Leghacker] NO.139 [91P]" => "AN5jk24UEIXe41T4sPph1WDwOjTbtSeSj2Ksg4P0FAHXv0r2bvvHE2rrU5xuNTQ3f1-VAsJxmAj7", - "[Leghacker] NO.182 Olivia [92P]" => "AN5jk25WeE1mzUN16vHY79LJyJlW1YLUb0lJ-o6yFcrr4NH2_9xLyrVo01qFZHpQPIrSMW8S8AT2", - "[Leghacker] NO.150 [93P]" => "AN5jk25etiQ3zGDQLmHnwKVRmqsWVAKnmsrpbgTAqBO7FJLyinnWldAD5uI30Gqz3CIEy2qKypG1", - "Leghacker" => "AN5jk27g_zmynNOPcOxKPGIkArOmXjX2cywc4OcX--QGkYZhHy_s3TvwpOa4Qk3-KHZn5BfIl829", - "TouTiao头条女神 李媛媛" => "AN5jk24R85EVaTSKoeLHp1VGzu4UsdCNGG-z9tUPLX2zXoe_atM-HaOi5r0Vc6jNmZAPAmIl-U2o", - "TouTiao头条女神 营营" => "AN5jk24_D9DwFlwsSjPjQIMLw4BWHmu6Pg5Mwcy6Lj5mVCYLsx3qNQBSmFQhwrz5nzmtGKHEDKi6", - "[TouTiao头条女神] 038 SM捆绑" => "AN5jk26whRwVBXPOnwTRioNVCemFrTeSLNmFbLzQqQ0NmqlPlq-tKZBTLghHRCCZyhO59rUKa1aN", - "头条女神 035 苏子淇2" => "AN5jk269d5UyEMZJ0vUTLRGANZhvYXmR1I-Cvsg0y4oKRTlhLEejStGXSMKktxhG4WtEtdA3-r_9", - "柚子178" => "AN5jk245xTUoObdume1Zy0JlE1UzzAJIewEI6fjtsCVkSwTk5OwynwJxJdlQdopZ0iab77pyUZaS", - "苏小曼" => "AN5jk266jMC6E1u2KURLvUw2QJBw1jxZzeO9VAJwriLDJDyyqKvoYhfdQrxzDBaXOled8BbWzZw4", - "吴雪瑶" => "AN5jk27Uj_5mhztRD0LMjGspn6D2ZlwyBVqh4a-QKZ-S6xQW_T_5Gd93huOCfTWc4QIR5v0F5vf0", - "尹菲" => "AN5jk27_JOazNZTiK1sX_Yu3xg3aKP2Kg3rRvnFuruRcg-tBMTAP07na3fIY0TmDUOsi2E1eZlob", - "可Vicky" => "AN5jk25e_igbBk08iuGmks5uLHBMcK7DFQ-5mhkNH8dSNRrABeX_sP6_m--vQgPfUujvuDInmfFH", - "MIDE" => "AN5jk26_fJ7TMlSzq-yO7rrO08uhvLWJzZfDJYlVe_ZHirAR4sonLEUtclDbYBLUga8RLgpBxJqZ", - "枫哥" => "AN5jk26luqXd1sNv_FvfJEiMZ1zIp3BoLip7sZUyJUwtS0g6euxhWupyksj46Mt8X7Bsv1Os6bZV", - "戴诺欣" => "AN5jk27NIKnOJzHLEYU-FD-snw9OXKyB6T52xJZVnW4G04glRSIEUMqCP9vV_k94D0OeNkEU_5hu", - "浪味仙儿" => "AN5jk27dZahmzq5_xPQY98jgIUFHSueFDPcieH_f92TP6OxbubqDZtvNWRy5QX7aCRApX5Uselgs", - "黎子大人" => "AN5jk24sbjYeIRzd-WVCSgENllgAfQElEySEpCH_wa0wP2iCZAlY1-FZYyymZ-GUNy4upbb1Zkwr", - "阿诺不是施瓦辛戈" => "AN5jk25HPazH7g7_wLUGozTG7Q9ZgIqcXcG5nxUtWafSm82tfXiOmqgI0Phq9HDk2VxCEu3gTIJ2", - "咲优酱" => "AN5jk27fltg56dgTJdxXAqD2jckPVRwrrRgXqFQfKp7PnioKzDkhvTEKoVpqzKcKiaZ5779TdPmc", - "w棉尾兔几w" => "AN5jk258XGSRY2MfPee730qWEfjCsICDo6eyUQHUxhXV29t_HX5FWpNWUuI2bmDLLJizb5lIRUUK", - "呆萌橘子酱" => "AN5jk26G1cKIIaF01NQcKi-NsTpV03W2ab21SMl_e485Xoa8R2U1RD1XNdEEh-2dpkrPZbbFIPtq", - "安久奈白" => "AN5jk267Ef87rYppJ1Qc4bmbBl7bpZKai6G3lNpNCQcW8IxmYbaXNZDPHWHYOXc1XV175fYax1Q1", - "押尾猫" => "AN5jk25xf_NTc-9YLkMJlxf1qFl-G6PVATh3U8WrbQB7TuUPCvMWw9NiCWbwFvAp8Vnc2Pchvfp3", - "小v" => "AN5jk25lBGiL1tcdnvN92b7x5R5Ne1siPJoJqDE7qo_RLimxzy0BSlxh_Tm1u_xNUSBd27Z8T6vX", - "15岁loli少女九" => "AN5jk261fRssmUGxOVnT8UzifusrlaY4ghcJR1GcTCqlrb1Onsm5qRSeRZUtNsKi9f7E8_wRACMI", - "夏沫果果" => "AN5jk25FZBrGzpLh68pu0y4hkL0xkTpJcPOV78x5FUq0VM2PTqfuYZumYBNLmwkVJFMDOgZ1PQnH", - "ran冉酱" => "AN5jk25wqABR3xTrFOXrbnKN8SxJgVYHWJJCIqNHGQv4U5jh0QUwjpgrLE8uNm-dlNxCSrij2ROg", - "软萌萝莉小仙" => "AN5jk25PGLVSm-lP0mtCDSUdA-2uAZ7GCjTIHw4nESlfUe4aWXf-xJVpAuii3CAHcdjJU4D9sHVI", - "张雨萌" => "AN5jk24ZWVlThrsGg_-xDBY56Z-zzMSYCjJVXxSQN19iaOan5oDJSecRCPwCmOw5kkrt8QDciTnK", - "可乐Vicky" => "AN5jk24PYhVxauRmhnp1KkHHA5fEWPFn4pXfXjyM9xlHHIMHb_OaVnpcynS9ArgAPglRn0G7CP00", - "媛媛酱" => "AN5jk26huI0Z7ZwppxoT-qR3usspr7OWKF4QaMgq9ZBeJs05mTmEX3LfVhO0Hyz4XA_Bo7CTvLgz", - "IPX 400-500" => "AN5jk24M2PEi96lIlL-HmmNNL_uNjnjwj5m9dKwbpx2AM5rt8yj9PzXpvEsdXEnXhPUlHjXitRh-", - "beautyleg lora" => "AN5jk24nL3hHDiwEtDsNEix-3a-zh-OVSfW7GBeXs62dBeBbLGalam-A7J3b-bIjsGLhrskyfXoV", - "佐佐木希" => "AN5jk26_KPPbFIt5LDwOVSjylO4jfa11C_PqrkDMUmb2ZclqttDBylIp6o6_DALRNh8qAhA8_S1P", - "水野朝阳" => "AN5jk26sDS67t69sYdQ771O7FB-YXsGfacghKzKTUvIxO-WEbLxYnQbRm7GLGJC1ahixTZItXA0J", - "明月紬" => "AN5jk26VtmNGPv63wms-0pOPSpmRoGmFE0w8WsHXreFJ6leEkrAnJkcjW4KUXsZFsjjGdshfxC5g", - "满员列车题材" => "AN5jk26aQH4kAyAnSfG1vqhfPstZBPJ98dwzt-YVdumuCnYzlXcTOmZGHRBoxhQjKnjAwrXBU2No", - "葛征" => "AN5jk26n8n-0brWLWtJhFopY8Rg1koyOd-h8_Ve5prPO1n895kZCwz0u9rdi7NSZm7ImnQGE9KXn", - "佘贝拉bella" => "AN5jk24mPSwhuh5t6O51_LLqu5wYY8JcMJ03xHLJHN2ssOFTMXzcWpogdjBRACGEL_Yqrip5rKaJ", - "桜井あゆ " => "AN5jk26QBC0sRR7Fds4ZTq0t6-eJ33htAU0kCHhHEa2W6_MakPXeFWWKx4Asdw3cb4FkfYkvcI0h", - "肉晴MINI" => "AN5jk25uv3yKBZsCA0ljhayejBkbNvVqw-dYWKtxnp7Rkd3Csd7ZNOskTcDslMRpmeWD5IL23xOQ", - "Cherry绯月樱" => "AN5jk27sY3sYgn5hvJWvtMN819MGq-b_Ae89FJn3R_YYOI8PQORn77Oh4ZGeEWjFpYEqKkvCsYV1", - "文芮jeninfer" => "AN5jk26W6tEP0g2SLi20iDSLK3-mA55H0RA5nP0wgTVtZpZp7Yh3s8hSAKlp3wvoni-aYuB9QWPE", - "Emily尹菲" => "AN5jk24xhjvS1kt44Rq4yJU5bzC3EN4IXNY6Vq6e9K5W1gPwvKP91BRozQ9bYk2pvNFctgxaK1DO", - "乖乖小野喵" => "AN5jk25ffAXUTDvk6NUC6AIyvuqcgosP_JoV5u1SYcICOYTM_62fFT2VMRiNfJGiDRjBDmt8jFSa", - "娜比" => "AN5jk27LbXjALstyxODetUZDJuLUzrf4u85g61eDz2DYpQaW8TgagnACXicHlaMLsXJp-mJWZfbb", - "果儿Victoria" => "AN5jk24QF3qyiwKwmTGot04myeclEWAWUjx6DOj6f9h-5B5h4VGzmqLOATomQe1GNuQIaV0YBBQE", - "中田合美子" => "AN5jk26KrRKddP4s9as87ssLwCw5jp8smn1jHGFpo8GMio6UbuQyczHAs-wKLNWL-MKYrZvfZiA6", - "星萌" => "AN5jk27LDt_AFmPpoyyxYbKdG-8fl3XvLcDExdrzHTwKPyPO9tJ46pj_mS2CTMzZzCDLW7MFToc_", - "沈梦瑶" => "AN5jk25V_5gfrIMqqcIH8GU2gXegGFxGoE5TPGdyX0Q2l5YUU-0KU27MnCg0geTJfkRdO1VJggpB", - "羽田爱" => "AN5jk26UO41bV-qGSaC8ao9Y1cfyTelr2sdtg09XQpm-pTj6YNlIfaRua6Lteo6_aR1jW4gV0l14", - "hello venus 权娜拉" => "AN5jk25tkT7wy8rZleuO1InaG5fuCHiPYtSJJDb0Onmsz0D7PfEfSQAlJJQOChwPrGZF3pUqyCNi", - "Fairy如歌" => "AN5jk24JTkG_VNrUv7RRhSuOnfOmvZv-K5maR3p02rlE8Et1N5FCN7i2YgIGJgLk7yKQWvEiE-Cs", - "小雨baby" => "AN5jk27y3UlVc9VkA5DRY9Zoi1OH30OZDL_RGQ6XYTnmIbHH3oZH2bszyxICl7_SKe8bsUDotktk", - "陈舒羽" => "AN5jk263Hggv_v3p7PzJ3UGmfHdjqq4pEzP6DwMGOV88geDTzZIQroQUwvqL58ChCtUzk_R8lbCJ", - "方子萱" => "AN5jk24SSQfzhN8adqbLTBh2ZSdwIgdDJzoRhMJ2h1Wbyd3MgChLpgTMb5wYy1efRYUs1DeIRzwN", - "林子欣Freya" => "AN5jk25KDihYlpa6MPkesYbf8ym2iLgGHowtXGLPKeKiHknYs-M4ApHUqhBeht8do8OX7KnBBKzM", - "龙女宝宝" => "AN5jk26mmP98Blz8rYaQDKXHki92mmcoW3sZY4rSTlV2-CoDPMr1q6ifUaT9JOyhn9xSVwzJiddO", - "林煊煊" => "AN5jk2798lZVXzlU9lg34EDe5fQ3C3_jqJOydrnsWMbed5SthNXWyU4dSZ3btV0q4MbxBiAXuOoM", - "张雨蒙" => "AN5jk25IRPqmPEXzEHXVUfkBzsBEmxrS9XyLe23k6x_Uyv-LlP3EAdOWZE7FTH1Su9I1G_T55W2Y", - "HeyuZhang" => "AN5jk266ubXN1DFQQtdbt7lbEAAWPABNiZ4QhmgIEBM9bHdhdDEafdTpVq4LBWD_kJBJdAS1BoZj", - "筱慧" => "AN5jk25zDcU3tv2vSR1i5I55Z8DQvfFKA5qt7a531aTmdjB-R7N7Fl0zBq2Y2F-wCWABOBl8FHqD", - "momoland 妍雨" => "AN5jk24mjDNb9wdw9qrncku9f96c9SrXP1wRIgM_kFsS6X59j_5Q-W7Ey4cYoYPHs0wl6BzqS2Ze", - "AOA 雪炫" => "AN5jk24fRRj7lcHZUB6bR601ZV7HE07M1_wEXz1VSqAphrActVuCt6NgPWt5LjbgSyO-ZOG1j7kn", - "x-art" => "AN5jk25HDgOfH6uKGfW0LZ5-kexGXEXa1Xuob9w1Jr7HpHWtD8TMfKrwnwGue7wef-k4_Y6sSVYC", - "swag" => "AN5jk25pSNNA15I9Drpz-lyURia0p6_9K0uW_n_vmjATqAszRX2Ww0Ks28wsjVCTLSFANYVnXAir", - "陈小喵" => "AN5jk25czKWawAHrXQTKyXaT3MC7qpulAA99dKA6sOcqzi6jZFhUScwx4AVkReUfEZFz9j7D31wi", - "kelly凯莉" => "AN5jk25-1eQAeRLYtGv5tA9YIGRCmk6Br1H1LoHrITP-JhedYVd6PPLq6kPezfhZBALGRx9D4O7h", - "cosplay 小视频" => "AN5jk24pcB_LfftmfjteK7BrIdBmLLgpJDIQRC25emVD-GXgsfghJID3rwWl9i8hJVBHKMSpSRzJ", - "IU" => "AN5jk25LOFfHQ6KRBCZk0k1TMIPuX4Ga1EpGol4UIPKSOw9Ss0WcqVD0MbB5ftyjjrnBnkhUQbRG", - "nine muse" => "AN5jk24l-cMG1kWS2knxMJQGqfG_ciY3E5eUmJ8xJGIh--wa1x-cVChiMAWJRuMvp4g_-vHYFbs5", - "橘子焦糖" => "AN5jk24bulGLU6aJy-SmWygzrPklPHFtaygY4v-sQLJmSh7pnCnf8bnUZH3ZIsLvQ7vU5a6Fbg2L", - "brave girls" => "AN5jk27EzveLBwrCJRLwitfBUEIzLpVoftaRiuruzExk0WNqWrz4Q3gCC-IV8dak5W3ofPH_vivR", - "顾乔楠Cora" => "AN5jk24ioqw1SehoDf00L_NC7HDEglTV71LNOgjCruyrMJ38d3bMWcSduaHZ8MkgKpJGjb7-7USd", - "泫雅" => "AN5jk27-xXuKW-JXq5I0IoCZ83lBuJ4ZhKKdHgTgceHVek2xpMf8itxB3zRPC6YX1V_oNpKl7Rma", - "张小琪" => "AN5jk24ucX9gONu3OIMTUYb4UzVrqs3DfbyBHf9E05aQZdqA7pXKVdYsDBcMLFQkeAgXfkEtmfEY", - "璀灿" => "AN5jk26Sepqxnt8rLXgu3FBOD8eHfYDw_DcRKvUDyvUt7PwcP4hin4rJjxYE5slB73oDL4kAUuVI", - "青稞芋泥陶可爱" => "AN5jk25Af3J5I24AqyYtE9eWQkS6n2jr4O2qXQf5lPmobGq-Qrbu76I7nDHeJFH3RVg2XHFPNKz5", - "郑颖姗Bev" => "AN5jk25kitLb5bs0tQXayH3LjJyO5zK6MdbFfPOcn8wlQp6PJh-XdaYZzLiqLnv5ua5TnwukBV2q", - "悠宝" => "AN5jk25RZjtK_ZfGiVc81X0edgwhB_VBkxR2yx2Mg9I2_6c_8KgUzbT4yVLCE7DQu-FOJJGXt6rk", - "吴雪瑶" => "AN5jk27b46XLsvnDMveXKzdK-pg7SWhPVvOsVJfJTPuamJ2q9QLZYIqHIunNOJVqUC_6HfmtL0Gy", - "blackpink" => "AN5jk24Dvj70ZC0e6oLC9oUTT1LzQpXxYYv7R4pgBm809oynjBK6y1-agIXElPzkZvPFTzjNirnH", - "唐心" => "AN5jk25kNEGEOowk0uom2IoISt2fpJptjxkj2wEI-v-cOeCZPRUOaemiWvugpN623MaoRCjxUO1h", - "Kanami酱" => "AN5jk262VtPLCclSAVquap4wiNH6FthXkmZa2XR81sI5W7_LnE3p-hvWOSENBNyJxghl7xKAbQV7", - "软萌萝莉小仙" => "AN5jk24JEdlL8KV3OMnpJbDNOkiiEyxzLX2wAozSMEQI2J0gpbVXR3ty2ha2iAeJ6yVw-j50T0tt", - "玩具少女" => "AN5jk25wN0X5aN8b5__1qp2b8peyFjT6yEKtghAZ14R2y2MwJVIHxbeOwseV9MkbFVOt-9xfcijc", - "豆嘟嘟" => "AN5jk24TmcFvo3-Idcc808zIARtIVVKWUprub3p77uaZFwS9rOoRz_dSEfSR4LbNSkCZjthF1Tfg", - "奶瓶子" => "AN5jk26-qiih2MzQEm01Ai5fQF3hviu2YkBrdBF84aRwafYot90Bo0bQat8qn0D8ycjmlQg0I6dG", - "糯美子" => "AN5jk25q13-PYH9nioqzvgmLLVFVANE83DYlo9FlQmL7Do6bOcG8D6XDTXtOHLNQBtZGTtGdKZyx", - "萌白酱" => "AN5jk26EcMJn-31YHy3X1QPWuP9ohzNvD60FGIqslSqh4E-dC8kAV9K6HocTWRbsn3ZrdGG7PV6v", - "Laura苏雨彤" => "AN5jk26QKqV1U_YDunQpX2yGLGGvcVDHTGeo_l7L6sVxQMYPgPFoo5pLg3Yh0PdyWepgyI3sW0MG", - "林文文yooki" => "AN5jk26NLcF64X0tBc0EWUtdiANQQj1GwoFZnhL-KC53dzMSz4UhoawEJgj8XdoJVQco29wBK_ly", - "林文文" => "AN5jk26h6iiV3zT5PZFCQCcjRP5sl3-Q2MVyC8D2fNoXVzMQXooqE5Ue1Nw_FUQuYwnMhvNJuBMs", - "心妍小公主" => "AN5jk25djKAFoyRtlVN1R2Es-2RNj3XxXgUrSh5pgcYynbQKFwOQYskk89MzOJSLD0Ms-XHwm0Zz", - "Xiuren 凯竹•廿十" => "AN5jk27jr5iCm1_TDKxpHoKKTFArAVZirY0CWUcb7zdxdx3vpvYuGQCBInVqeM6gXQE8nso2Hg5x", - "韩姗姗" => "AN5jk24phhg13pLEeNzqWKbvxoDH_-jncXKsuy4hcjdblaop93pFQG-LBCta1X2mPBgkyFERNo1e", - "妲己_Toxic" => "AN5jk26P1Bvv9RIARPHfwuiLZ4R2_g946F6YwBynJiEUY6_TUNYNdS4u11EriFwRy6i-h0sOEmTZ", - "晓鱼酱" => "AN5jk246qitYJQZP81uU6Gw2zDUr2rsEo9akaS6ro-aPfB3OaMR3U4Gf48YFNwn5A9YwJFmjimIm", - "2021年4月8-11日厦门游" => "AN5jk27Se8aCOZxvjHG5YmNzsncYKP6W1RsZt4TEwsj_3X3cZaFChLR1MaAw1hl5nhA7elL4YrTB", - "林芮希" => "AN5jk24ok_afmMk6NIuQjv0Xj3fRlY10wKgJRKjJEtrUY45FEWH4181QJu0TUvG2hh_2xva8FFQB", - "芷萱mimi" => "AN5jk24r3E2vyFjQ7X5fmI97GtNW8mkOc8nzeUizdc8u13V1QxF_6NuYxmfSX5aVE2N4SXWwHZAA", - "赵万灵" => "AN5jk242aDkP3fdKOpJ2f1uSlVzI3QUIG7RNS58JSdTC9uZoRwRH8V-7S0TU4S21u8Pqhcc3IfrS", - "九月生" => "AN5jk24IoqMyWYlfJoFx2UzV1QfAeXwAeskdRimOTbGmuQcbbXbhIqSJjnVLearws-99k8IpUjb1", - "揉揉肉肉" => "AN5jk27ar-uRdFPfHcXWSQow0vyFuIp3AyJgRWIzQ8M30MQmmMTtfz1FdftnCJGhQHW38WDHRf_0", - "文静" => "AN5jk27ET2HIhhtgbjfMH-Qte4QM4YQZjTiB13b9esIETMoJqyjCOf7hkIO_7Rq_OCMW0WKt417V"]; - } + public function queryAlbumId() { + return [ + "B站羊小雪" => "AN5jk25l2xj_UNim2Xgb4TXS9MHEi6Y256I0Ilg2UVGlNQk6-gVPH_KybP8gmLVPP7oAoLPar8UW", + "kyokyo" => "AN5jk27rIB7bOn9uLU2dZKP9dFi1BiZCumy9AojMjD0e9gtIs6cmNJe--vMweua9lcRxo0bD_tyW", + "徐珺大哥" => "AN5jk25EY7SydD_oXiD61hdGRNgOJzC76QJ8ack753a7vP2i9xl0CzmITDxURxrgVajyttS908Zt", + "小仓千代" => "AN5jk24nP2ipRhnd4MHEFGApanqOY-DJfeLcemVZjPwI0LbkY9taEBg2YV6hKAhT08W3VViwvXxJ", + "岚西啊喵" => "AN5jk24izpAkc6FJzygL3WpUJPUE1tAOX735LkOTbeo2fP2GeUsrF92kovlah1AVG8o2FrvFJ0-F", + "小须须" => "AN5jk25-IHtbs_BVtQcmlb54hH4-o2TQItfqrnQixRp02YdzTr-m4ThMJ9mv4ndcczaDeJ6StNUG", + "MyMy麦麦" => "AN5jk27UkggfQr1QFNx7OlYHiqRJ5n_6R5hLOgtSSPwtxIIcpS7oqR8Rep-V8k-nxVE7IJab7r5U", + "一只小仙若" => "AN5jk251wDCqfYEV6kCSUKdFlgkOXtHUNfKFlwzYvhQ-GH60tZWVLxie4tzkoqaGXdOsp_4IIo1D", + "小深深儿" => "AN5jk27VCc1ERjTeUSbn6lT7rmUkJ1H_2T-fDVe8TbBUtvDkvj1LERVY3R43mMcfldy3MGPbRJ72", + "Fanpai Video Pack Part5 1080p&4K 20191124-512GB@Amber" => "AN5jk25o4csx5DsxCTx5ztuKSEFg30XXCwzrQ0f6fq3GDiNmIN1gKi0omxY8MvDXfBa38sujkEVe", + "sejinming " => "AN5jk25ztHdEAPN_aKSCjm1vjcQXvYFvDWhZb4sDsMJaVZNj9HjonGpP0AfGQwBH5bac1NDg9tUt", + "羽柴" => "AN5jk27V1c7Y_sAnM_kTPIrPeuLUx2WtrZG6Svog95sD20-3tovtypEOD1AwNPhcVsRB4yjBtzBC", + "mobe_carrie" => "AN5jk27ikbN5nLdkS9dGn__4QbJSUzdzz3tnWn5wahIPXtAE4T5VtStArpGBW8h4yUOTDYA_uwng", + "cxxsomi" => "AN5jk26UZYbn-OJT6XJn1iVgkoZ0gYDKzEktVBE1t9hjek8biozrqSVdQs_G5rG09P_TcKGT17Ti", + "chen雅臻" => "AN5jk27imv7LENP8b4MQ15-FqMAY5QEuWtktLO142vhmoIisjQ8WLYil4Ll5CRRETFWWFPFR8gZL", + "贤荣" => "AN5jk24GFKFRrgI4ruBeDbUutoLPwX8IyxiVAkp0il0-I0gcwMdjFRbK3zNDkUnfmgyPqFcbH9xY", + "boram__jj" => "AN5jk25F0QGJCKwEPIXhu1AWd2gOJpR0a6s5FxYODjHtut1pO38iPTsMnGP8ouyqga6a2Ive_yk_", + "insLike" => "AN5jk25Bgx2WPGUoL1R5wZ6P8_PItRgNAQPM5IZOwoTR8fEWXnBpHvgWaeGG3jurh9hQA_ZmnNPh", + "naughty_rabbit_" => "AN5jk24ml-vQd6R505oNneX-4iXkwINm2CtnYU4Lwr-z7LjLPVjY9mBJlLlLGM3s4_WTh2DLDg5b", + "小雪" => "AN5jk25FECceN0LL7UkqEIw6a_rJKk_cvjuw_3VIDdkcV_YwYvzOxNDshTDr77cj534Pxa0UqA5J", + "姜仁卿" => "AN5jk24K7uRir3spvA-4MS1PoliwyMQP5i7Q8kZCUrstN39CSqG9QA2VBtdD8cTGGn3-oCx6GFKI", + "芝芝booty" => "AN5jk24q4bCrA8bUCwgY8M_5DPzms3XA3ooLJYsT8xZIdMhN830kM33b4VbeeLXp3qCzGGGQ-x4F", + "zyzyxin222" => "AN5jk27yI84XcpDBnqik7X2qJGyY7nXU8ESa4NaR2SltjPBK_pk9zwfs05zzrwPiaqp7tRDZA5_j", + "2021.11.30起 杨晨晨 + ycchs" => "AN5jk27oZ9-aysBLbuG82bycEmyrMI5asHdKO1jRLyWTKcteFZ2ugkQk7qsrRNf0FpSEouYng660", + "王雨纯" => "AN5jk2677PpTKkwyCw7cgbZg3wLCmAni_IE5o-iPAswl4XUqHawiQFilDmiMB2lPy6I7UpjjdJi5", + "FC2 " => "AN5jk25hob7HZ4ko4QKQfMJTofP7IjCDiiyXS-pW71t1jDF1GaypcfhgeQ9NoLxBbwEQFYePUF38", + "小琪" => "AN5jk26ponvdzzSYNIWYzk_Lm3rKYKROCVQ33P2YJbJuX5_3n5ufX18DdOS2QUEnIfw8-iCSR4Q3", + "是阿朱啊" => "AN5jk267FxlK3rVCY8hIPQVfgq7zSyQpbYvF6yxsWDQsaddYeSYyVlm3iigbMq1uFENtrK9z2669", + "黄楽然" => "AN5jk25mAKY9jeO58fXWRK2I6dpfypHPg14KFaFMr-3KF49MS0WOBsJf5B1Id9p2m7RqbUQhaCYf", + "iPhone手机" => "AN5jk27kd8Rf9amIUIaTvns3ZEf_L8eDwzX5fbDoLD0L95g8g74-mp_DR-4Fo9_T3enasyQq8d4Z", + "weibo01" => "AN5jk24JcsN9H9SE_qye9MLzvuX1YykOT6e6SQtjciV2Zlq1B1eNbka0aKw77yXEUjI3JwE18TPt", + "国产视频 91 精东 麻豆等" => "AN5jk27TNaI6ja3GVQTBAw3p1SDfRPhzoodIp5NY44HFZlJ9D3d7i3keZjXkY3HkWmnuOPiahfW1", + "china_cam" => "AN5jk27N6gV8J6MTTv5ST24enUoQrXpZ47AF-aCdPNIK7ek425fAI7ekFz_u-k9EpGw9rYybA9dX", + "bilibili收藏夹" => "AN5jk25Le2pL--4IUGFCJf27arcUDvT4SP6N5wxS6FmjuWYk_4GKDoUoIPcsxzNeqKthweAnA4dQ", + "上原亚衣" => "AN5jk26QM6DwYjJzha8l6NHNKqrL9xl3DtNsMhabXk9x6yM7o2vBKCTIkXjMmG4JuZCb2wmEf4h2", + "hello venus 宋珠熙" => "AN5jk26gSZ4SR_ofcI8ulq98P5F55-4QYHD3D7pWRtyj3R-uzo3uic97zZGpby0pASdsRt--A8t-", + "优质女团" => "AN5jk27NWRe6Q7BfO-iqJwKi2r0KhxPvGjqpjrZnyeI9g347uJXgm4d7CyXcQYXAqb0677WyRh3v", + "小巫酱w" => "AN5jk26Z4gt7t3ipYXZ1iIH7ag3PyVc98z9lD1oRdQYSRAgZH2q8yhcbq3-NwaDpHIR6a9u2FSwm", + "Misamisa" => "AN5jk24df5-g5rkjf7WbF07r8m96VG8dkVGhHN8cI_i-l9_7y5QXaAy2aMKpW-v7jluApSdNBFYd", + "伊東ちなみ Chinami Ito" => "AN5jk275ufDnx6YFuWwxqGzd46Ms4ZhxY33FaKfSgfbXrrWa6J8RydXAnh5mXpGlZNGC9Nm4bvh5", + "RCT 001-399" => "AN5jk244NQb4gqRwzwEHP2m0Zj9Q_48y5eym_GgEPGJMhqwAFWU-2goJh9ycClqbk61f6SoyPAj_", + "扛里个扛" => "AN5jk27rFjlYff1GLWJT69TXtZe1F3dRZYaYpBiwcPzsYR2YhpbArOkNbNxSrhd4S0_Lbo5PNZM_", + "hello venus" => "AN5jk25srua1dMd3muXICOYzSR4Gt1HckB9lRvtv4q8BrozVlbJhiXyyFOpNzko_xtNUwSwby5Mn", + "智秀" => "AN5jk25ZKvClorlQXnqbwLjsJ2xhdXghgWPn5Gw-ZQr9sdNQrVRYsi893G7zSFmQT3TZK8YQOcvC", + "裴珠泫 Irene" => "AN5jk24I4-BX364rrZKfy_XwZ_HRwxKtkrP-RS8R7iokdWmEF0pxAN5_jBq0Iltl_TI0zqFDcRXF", + "新村あかり" => "AN5jk27BIHOLylpmlKti4wxxBST7kKpNqhBWpf-LOUoz1aB9IzD67-QZNggJnuuhjoLvlU0q9s_t", + "少女时代" => "AN5jk24QmEgfeHp9IZrkujEnAMPQIWtc3K4KTmm1BoOprn4Zf-iWQfSsXJT8G7N_Z_xRMLLG93p1", + "tpimage video" => "AN5jk27de0SmuWLC_NAsz6-ziBVAQ64nLaZD5hhUc4WQs2Z4eHg08l0I8EBYJcQeM_WxOdtvra8N", + "acfun" => "AN5jk24RfoZ8ra5jstLcLsl0gCQnACbabxz4plLaoa2LY57AUOrU-C6h4qLX4FcH8BkyEJsvJJaZ", + "小清晨儿" => "AN5jk25hADdDWK5VFrgII5kcw4WklzCJcBzjCuLE8unXnItpr189NPsIeUdKHrbsQKTCE8vz4y4L", + "momoland" => "AN5jk26F6vSFQEnvaoCqJDRrwtQlsCk3M4S5IRNsT_yAu6HSZ9D8MMW6MGE-_N1Jax3Zcsppu8Jy", + "momoland nancy " => "AN5jk254drfClWR125lhSQKfrRfeDDREOenr6h4FH2rGx1qHZg0TDLQr2tYfhv2_WlQjfdiknQyP", + "几兔灰" => "AN5jk27kaKWK2bJZLniHNhew_a7GLTvAXbkdb0zkYRy5WVkQS_XXHpkOfvWGnXwGPvl1kLOs7Bno", + "国产自拍偷拍" => "AN5jk25YdiBaTiYEkBFQhJ7Y8UoXwYXJxyjy5ugXXyUZMzJAEyYY8slix7JLdPmrrwInoX1cu32S", + "Premium Bukkake 2160p" => "AN5jk25LapcCGG-dElWnqslBO1RScTi6RCuU4vx1H_Z-uq65GB8Er-kX-csnNscL2vFjJN-IRWum", + "Asa.Akira.MegaPack" => "AN5jk25bCDMrPpxQC3MFfOfj07IAqoCbf_N41lpljEbDPe2pxRV4gN28nsW8uuVDBEjXTWlOPTl_", + "private feitish" => "AN5jk25rT6HJrxLb4KkIGUvgHCiti2mDzAbZA1YHDoo9gYSHyzLC7UC8abU6dEXtFX9iN0ZwSsWD", + "Red Velvet" => "AN5jk26usFpFuj25OuenmxOuKbK86IwzVm6kDD00d1--YdxTpe8Y9RuaFsL3vhbrFdT2avlf0OSY", + "扛里个扛1" => "AN5jk25j3xa1RCdIemJgM4yjoGJ8ROXhRSuJISGsLOgKB8QsUs2UGqFu0BCy-BgEcsHpIxtgXCgs", + "91丝袜" => "AN5jk26SjenRER3tHQLNWg2dzFlbFDuy2-40nEOonTeEk5kkcFn2nK1tpicpvlXGQGjSg2gq9qpI", + "清风与鹿_Deer 丝袜" => "AN5jk25vp0XQLKb6cWOiTOOvYxkGnAsCTiI9VcoGWhb5jG7LVwK6VNY15y1t9Nboei1VKScR2YHd", + "外国小视频 Jillian Janson等" => "AN5jk251oKvUI3lDKnDI2rstwPUaUSOD4_AILdDhLF-04hrbPOKGEJAUV-oId56bSH9tawn1rgrr", + "抖娘利世" => "AN5jk24JCmkOwg4aSiOwpUmwsZ0sxS3Nzhim-6KP7nCIPSgHKdsTIvtwgctxe_WW_N4lPwF-RLli", + "韩国非著名女团spica等" => "AN5jk25gFqAHKWHzLGpXKMRhtdMCV7zy1euQw6_CW6PieAIZ-wMYUfJoNFgDGRZjf4Eb1BQ1EYRj", + "过期米线线喵" => "AN5jk27AC3AE1vlDN4ZS_wQrWvL_yR8wjav_9CKuVZpC3h7ulokooYSzhrsWDAHwN36cQcMYWNNf", + "stellar" => "AN5jk26wLh6KMfBt33gkUwA8u7e4sdAwahMmSUw99_zd00JuR7uzUo56YPJmAVIzmJhH4RC6eGWu", + "Dal★shabet" => "AN5jk27vFKaELRJnRqEIRGAJMHl2a6qzH63JwF-saM9bCzLql-_5vkevEtx0kLZpzLxPAY157fOL", + "雯妹" => "AN5jk26fSKAZyrl9TbUv083UoEPwjgqM2NPibNvNWPNlQtx6WTy4QF5EBcOyJvT6_4PK4-5oAgyP", + "徐雅" => "AN5jk25v7p1PdXvzsDXudpeWcoLoj0ZWwEtTLS1dv9q2SOIzDRFQER7pRHb-saawfsXiRx-vSKaH", + "JBD " => "AN5jk25I32uFGYIUAoA_F014qAlaWe18p0DYY1xA4cvi8G7jSkOa0HJH13BGtnUj4LXu1NRfDRRZ", + "RBD " => "AN5jk25KzjNUbsfYNLUq7oiqK6CsIimP15FwpAztnbLByFHBEIz1_7kiDODOCxbdRIA3l8TDDm6D", + "金亚荣" => "AN5jk26rqhcWhVX-Q6Snfir-kOjHvBlRnq1S8dXzKtHVuK7b3Yg1KaRU0eQg_ZkzRngo49t5t5fx", + "girls day" => "AN5jk24N6PIbhvwVhxznuY-DPnsSuhc8SkO_am9Tmm1SEiDf4WMkhpAqBZzZMguLAHj2tJl8dmOw", + "aoa" => "AN5jk25zUMcgFvHjXlwVJ4q89qIcW0Cwl6X1KdB3ULU29PcD1uwQRNVrmJGmjbprkgEyuhecZ-wE", + "惠晶" => "AN5jk27Qcrz0mVT4N2_PXIxtt8rxFSiwTa5pa6He7Ie9N8YjQkeHGbz8NFBsbRL8n6tyomP4_ro2", + "洪真英" => "AN5jk25itTMdzq48a1PsJHaDaKyxYvzd94I9ITjZMlb0jdhCMvMjzSUcMAoOtZLQLXZurqn18m02", + "FIESTAR" => "AN5jk26HrEC34j8Y4RHXN12IbJY4L7MV5PAvxn_JnvnUP8mw2VRSIsr43qA7e2FPto2rN2vF9hlr", + "轩子" => "AN5jk25lXA20YReu5dRwsmi3Gli52eeZ3Tv2KttxZAM_4LdTrwiM8_tVQ2us7Qbm4jHLgfsJvpkj", + "hani" => "AN5jk26UtqkKnS_E72wvc4cg7pQY_J7CD09k5A1-6Flo2buoGv8W-4obg1noL10E3EZduu-eFiKk", + "香草喵" => "AN5jk26hs8RC6kZugTYJv6UgfEhpFXMSb7__IKEspfF6dJaZXdrgBn1f0ztondfflE9kPuJn8eJ8", + "B 站 主播录屏" => "AN5jk263ilWJTa0p1RFA4CtM6kqvVkRVTXlnRbjDwBbbITtsXaNPkrr8opjzURWXh3LLYrzrG8-o", + "beautyleg" => "AN5jk24Xv73jofZC0dGg8YZhihZPdKYdR9BSAnd5jni50GF4w9U1WJK7zuXb7fde_TTl6Lvx2qip", + "老片" => "AN5jk25rT4g7Gjmyq30SS_KRC8CjNiM5xguqQlVT76DxrGlZhBvCPyaSnCk8WQ4rLXhMwaLBtMm1", + "佳茗" => "AN5jk27wffk0AXbKtDwZCbiFJqvfjAVpu-MyKtlkETQHrPrPju0_rB5NiGFN72n8jCuu1ICthyPT", + "允儿" => "AN5jk25Mx7NlRQT71sG2hwcqXxR07YTMQGJ0bUAsS5GtC2bef2m8dJOBKFdS7T6WC2cQmTQtk45J", + "weibo" => "AN5jk25Ma4hPaY5kbJr9TrQFughTrhpNMQR7X_tgMLeSiYY_d4ErLvzRNgZXEk5BFR0tUJSeVfCJ", + "rainbow" => "AN5jk26Rr6-yVwE6vf2-16ng6HlyODV-gAjSpq-AzTt-tI8PkSN9qP8gWFcciHpjqKzcEWEl6OgO", + "BESTie" => "AN5jk270TMJjLRsadsozEhFttJkfFdiZiZ9Kv2HVxkHX7Wg-ahAHBCQlRMSjLhF85Jo5_xu4ntMQ", + "BerryGood" => "AN5jk25lWSyf7t4AuaQdTDMs6baCnPUnQBtKlD86GW_LAdL7CKLf_ZkUNgCoemH9H8fn26hupJTS", + "tara" => "AN5jk275Ovb6hHBF1K1nVDCHnw0Hxca8TgOgPa0hq2WiqcpXaSdb5pTbxqWFj3c8o0gDUiOpTMqF", + "9muses" => "AN5jk27OiTayPRuN7ZpnL8K20Ahx7cr9QZvR3Ytyb8c_tlDVX36DUTAoYVpw53rkKVExIMYKHHsq", + "腐团儿" => "AN5jk25xdKYk19YFjCfX2pHO49IR_YU5aR561hx6tTUnLFfocNSt7ENcw9rFsF13al0U7PXsMhYA", + "hua" => "AN5jk26_0XrVdQPze3Se_h6_HpXCSDjg-3IMpQwoRrevpJatTOYxLo-Hq8h6gae8jKgUDheyxlZs", + "陈佩奇" => "AN5jk25Fa5b6_qxKk23EKdeNcn41lOti2kfAJT04_P3ExyB8kL0UYb7Q-OoVy75dnrOuU_J_1lO7", + "NS允智" => "AN5jk26SB-uiegq4wbhvnl4n27VFVuI4QB_C7HW-441FqgNNfVt9WSmfOc_FG7mlXSr-Q4tszf86", + "大忽悠" => "AN5jk26L8xf36JkDlBSuJhYKEOJ4dzo6SD6QigfcYfKLtqyr1eDiQ6Wc97JhdEu7VHxC5Q_ytf-j", + "柚木" => "AN5jk26HPoIe52h0a3TSazT83yQd1eLLlNzm7qfJk4YKeSzIT-CrEFr1J5l3nXgaycTSwWxMfczj", + "耿清清呀" => "AN5jk26-B5DA3Z7MN0DwPoUW_HsLoV0jXPdTL9H7YIhswBJNHGSayw2HRe-Buv39LrK4cCXrOCbW", + "白银" => "AN5jk262SrJvPxD3x0CGRvHft17kudhcaSCVl-xPPinetvYsPNg4SVLBTMgddkcMGNgLEpcGsi2A", + "富婆七奈" => "AN5jk25zbDgcl2Yjhidxv9eoe0vBpyVUEQx9rVbz7YlSaZ1fr4nNDDF04ZLs18y7fPmgngiUt93g", + "绯绯" => "AN5jk27waUcw3T5TMo7AWw5aJM1qSM71wxeiMlEU-WqJ9t0SVLXDzV5Fpsz9QXV0IQaODH-4RIa8", + "小短短" => "AN5jk24YePtRh9c2grUel9dyVnZzFtImqouFCrvH443k97GCkc_smfSht3IOyTZmqxfR1pZBjWkf", + "koby" => "AN5jk27Th8MH64_M1zurWFb71GMZIYoufyo7JjyKk5l4WERRm60QSYBY-8uwtfh59X1T9XjHganp", + "韩国 Yeon_Woo" => "AN5jk25rGnj1kvmT6R_tgDc5Ye90kYaMt3JI3PNQpLMY_79ol18ZU4yyruIHwgS5bWnGhn_M67Om", + "强迫attack" => "AN5jk24zuHq1U9gU9QoUngL9YhKJBCRLHsDYHGj13_tMgDNCPUvXkQM8g_N6z8PKztsQXviFYgsM", + "tushy " => "AN5jk25UX7d0_0edFDpmHfTxfqwzb4FAgQ0baO_2JaJ2kh7-mKygDUncCqwQNqrZA7KGkN8yXXyC", + "AssTraffic" => "AN5jk26QzLBQLnfz8CN8T3Ajdlk0B-U3VWvSSfBJxg4R0vgZ1MDysyB2qc447abWECoyH1niwnxT", + "Gfphotos" => "AN5jk24YS7o-f50AHFny_qmhQlRghoJdyLgI92mXHciC5MYsAglGpXkXYmDESTHCgZj3bTnrGafA", + "酒酒老师" => "AN5jk24aAjxO7RAJf-AFV0AtJCjEWRYJikyll_Jf_HsdG_CKL8YrtLWH3l6RDrsbQlGfDIGL7DNZ", + "candice" => "AN5jk27T2dL95mPy2kAG3AaWFusKr2mZsGPp2k-SEvi5osggrNhT3CQRQn8WBuAyRtyU7_sbZ0rf", + "ParmyAU" => "AN5jk27pvLiA3SLWLYGNBp2IOJG99frl_XrUs1x4QEb6-itDQv5kV9S4msLAJJPSK9jJks3435GB", + "exid" => "AN5jk26XM2qkg4I5DyYUUE52xvgklyrIvZEXcq2bSaNfqImMsL95TeppBQA-ywe5Juxu6_LYG31v", + "aiss" => "AN5jk26_LgbmNzsiDXH47dxnr8taCwDsy5_kyvNjimSY9Xu5_FMmxzx6BacErqL6ieu_3E4NkF04", + "永远别问为什么" => "AN5jk25h3kTly3pPDjJQ6e5J9cYvPnYPNqv91arbeupp3b_r1XqzIcLJqwccFKrQ17NMelNP80IW", + "蠢沫沫" => "AN5jk26BHSyHTVm-ble5PgcS-zWVa9MjDytepZid0Hdn4BTH3qYnZHVp9BPstof50h913H_X1klb", + "麻豆" => "AN5jk24AdxC-jhsNkbwZGzz-slrFNR5W1w-ZreBXUN30K8muthRH76-e1vmU7dyVpK-3mH0F3cxN", + "周慕汐" => "AN5jk269APqrEJDRHkBHIHfJysg5-2aDvt1V3FYDHEx_o9GqRZYs7kr3cE5wWr7g6lYy25pcz4Kt", + "尤妮丝Egg" => "AN5jk2584D9p47dVeWQPwuCnpHPqMayWfhadFD5gk8UNlAk5E0pSMRwe0eawZGEVN3REPvv_xpU8", + "鱼子酱" => "AN5jk27orvZcFkktN4X7NNMWG94vFT-LV-xT4BeOZ9PUq8B0DzPcH63QfBhelqtY3Rwsp6bW9Rmt", + "绮里嘉Carina" => "AN5jk24qHCsn9m209sY6-e4zOJhanYJaLnUi5Lfr3U4IhK2eNbJAznDezuVJGby5kS7mdM6qqacY", + "周于希" => "AN5jk27I8tgcbQ_709S6pPUIuvgtTxvN7TURkuJNm2H_sv-5VjnWR38V7x4psclkk6iPj2tsiL59", + "美桃酱" => "AN5jk2440eEPLvNjBAo2FIi0uK_4cpI8k9rfcPegUgtTC1KgCZ6uLd_AJnoyr5gttJobWsufXkgA", + "王馨瑶yanni" => "AN5jk25Dj7w_310PIbYq6K78xYu4k98cIYJfitCZjx6fE4ijKFVhZT1kyGVFOb4vhFJa8hed4uAK", + "柳岩" => "AN5jk27Frm9FMK_BDERvGT84GkiiDSs_tfdbHH6jIrnMZ4bixQrNvE0kQMXkyYh4areIygaYe09q", + "好看的片" => "AN5jk27y5E_scjN8UrrFDDsUXIAKdgXjerctOLC8vL6dhADUcu16NNnOgjZ_g47lrwxSAiDtwuuY", + "探花" => "AN5jk27Vh7j2EmTkKLOGRALG6hxu2x0A3km0uYd4oCJSJlBV8MJo6-FMFl-WOKgPaH3tOxFJ87yh", + "anal" => "AN5jk27rXEmJduTKQFA9AcOpg1ctrBv9Sk--IZvBHL3mM18o_yg5jIgY9hypEcS4LWmiImVcltjc", + "田中ねね" => "AN5jk27lYm19YZps-KftDiOzwXdtAxhbRsMIDDaOOxyCRxpwjHPFluRHWFc_2P7TPf5ReIL9UtCs", + "高桥圣子" => "AN5jk263wX5ZcA67su0GXQaBdfQXcUtW7Dg_VikmBXXqXzsZFN8C9-Y6WSvqPyzw6vqTpLSPjOLm", + "Niki可雅" => "AN5jk25kgq4e7c0yiANf_RCAKwUVorXmv3PQL7pdowDIrhe48mXP1E8M2_f2zjFjftx35BO2XwO6", + "御姐果儿" => "AN5jk2674kz0l8gnMggb3iS8hY3wiV3n7OOarS1NMQj_JkbaaVaWOR-7MOl-NPkTWkjnipujEf05", + "梦心月" => "AN5jk25-DBfdCrNT7oNgX9r5jbR3BhzgIeV0Tw2moi5DaEcI61B6KFwb97eylHOzZ7M6nBfz-9fo", + "安然Maleah" => "AN5jk244N7j7YTnKU_LO0PkTsbrbfNElEXKtIYPLAZJlMitu4lpaCX34xK_H8FhTwTbpZNtqexPk", + "朱可儿Flower" => "AN5jk25WP3DlMJ0w5246hRKt4S6o5aH7kotGGxI-IywZdLIrqqZJiBnd3gAKJ8cuifwmSdP4V9UZ", + "小果冻儿" => "AN5jk26Hgr80inVJUWmuV1sv2Oc7i46f-84ukOVoE3bVjse0Tnl1Terf338nbapGUsba72NmJALi", + "田冰冰" => "AN5jk27mU5K8F9krgVn8ziSh14YP4bMZLpWthEz9IeDZU2Y-Aakmtt6CJih7Xh09ofvg5oYiADWW", + "夏沫沫tifa" => "AN5jk27tqBrYR1gYasNYZCsn8sUXKWTHAoebhsC8S7biKdHRk3IHhRXflAoj1_F-m3TWBRYu5Py1", + "唐安琪" => "AN5jk24ACY2BbWyge5DJ13ALpDOvKShHUJvK1khqwPULWbfFI6L3Oy_B4BN8MeoVMh3cUoS7OC-T", + "ycchs" => "AN5jk26M4hJ-wxLPKSzIDyjruMMkWjlDlVkgNaWWk3d3c7TGhm1vKU-YM0JhfgK5CfcfneoIx_8E", + "辛杜RUI" => "AN5jk26PM5Hgp6UxoAHjAwi0NZPjO71jO9OHng3fzuZeuVGRM6VHYtql0SIorjWAS30Km57nOO8-", + "萌汉药baby" => "AN5jk26Y1XGWa0CrsIJlz757NDvlR1A2MMXqnhNeTmjosI1GZWAJR8AcdEQRRwDTX1qGaxNYUQAr", + "月音瞳" => "AN5jk27Od__B9RlZDabBu_Xxv2LONhHERm8jnYO8XnhP9rrFZKwZTvEJl_MJZR27BuHnWmF1ryGL", + "陆萱萱" => "AN5jk25aeqvoYpV7XT2S4Hgfw485ValIgsQr0xnlIkj5m3rIJebkkIxekJQo-R4PsoIubhwxkaXX", + "大胸主播" => "AN5jk243kNKfYSu9EwBoEc97ZvnMqmtxxapITVrroAOJyq6QIuU_BXZbixM4UXC3dlH_5ofGIzYm", + "诗诗kiki" => "AN5jk25KsvVM7NeOG72-QAtf_CiRfDUhsPJ3nFLCPyowifZXfM5yfkX8RtP2fB4TalG8m_-OBQTN", + "言沫" => "AN5jk27QjbVjxDcOq2p0atoRpircBldq1KxqNIe3DMShh-LLKSGCAUKtMyP5dxlmOeLmKzfveuOb", + "一颗甜蛋黄a" => "AN5jk26Gd-b6VY6uEG5g708kd8GeMVW2McbSS99zLSgSNpzOW5vCa9u-C9_rNyWTuBFh57iKTDKj", + "久久Aimee" => "AN5jk27smHBnXhvbsUj51upTtiio8wHN2XIP6PGFHyIl0Vb017PEu9gASB26yLYVLkZaFxd5whfx", + "潘娇娇" => "AN5jk244kmRvqKN6AXax6VGSEZrFn8GONp6OxGwABXvT9hM9Gl1Jxbb2Cu4kJgOP_z3n-8h_JCr0", + "艾静香" => "AN5jk2657xBZ22KmrbozalEt0ZWQP_vHM67ICQUqxMpceUnin9rR8tAE4nv6pL6Qqaidhr_T6EYL", + "美七Mia" => "AN5jk265m7FP8RoEMomovpzElbF3NHk69Yz6PWqoRZk1QjXY6izfiHaHPcvVBuEiBYOpFo54yZyy", + "宥利" => "AN5jk26nNNnMHb_f5QDdnwwcSczqcxd5W6KRqmVE4X-yNycmvlt_w7kw6pt6-vqXgcNql_u5xwBt", + "apink" => "AN5jk27eImKZZKhBkvcBt3Ata77L2v5E4sN18Pqt6b8burJ8LrWYEL_5np01IZCVXMlBegvS9B4C", + "萌奈子" => "AN5jk26KQavf3Ow0jzGZYocSocxSZ0DyX91VZfooIKEvubbfbCWeu9L8URFP3NUqXI1FndrSxH6K", + "紫颜-小仙紫" => "AN5jk25rBo1XtR6YMqEsORlPG0T7p58D3X5VxDukt4P_cHbeJsN1AYUaaqYTky_lyvY6b7vfEUxR", + "凉森玲梦" => "AN5jk24_FMtPMqDVZQP_1R8GcLnBhNWbmpUyY7lE2qv8spgXX9f9rGYJKbEH_yMejo5p_Oo9gRsH", + "橙香静静" => "AN5jk24DBuzp8TrHz0sf41Y9_FwCPD42iPxklrQ1kMuBJE4TTG_O_u4mvfuI3rc2-77U7oeldkkD", + "MUM" => "AN5jk26ES33cohHyfGyLI8rq2nsuA6QdUgrQbm6Ao51_hE3Ykyxbx6EGc5bIz-cTyHcRSTnC8R5v", + "hook up girl" => "AN5jk25MYVkoRw55UZNrH0yAAyiw64E1o_4OHU0_0Ctqx1VctB2MemBU_p_mbiCIRs3bYaYT_fBB", + "白金Saki" => "AN5jk25puSD6WUF3UYUuYWTb0uG1wc2CfEsxENDhD_Z0E00JFdwPbR3iqrBXzbx5REMWj0wjwu53", + "夏西cici" => "AN5jk27xNBbGKmrsdCozR45pGt7vSZhY8Y1G6Ug0GZ8E2WYUfx7ZUjn0XZVTg-EWJaS0vgLYBBvH", + "允" => "AN5jk26iM-KixSiTrGjmq7lgA7HdV9fVPhSzFeJCk9AhlTtRFAuq4NAmkheHb_f2o_enJMma19hP", + "唐心" => "AN5jk24m9IGmtCx2iUYGb7LjAmzPIOoHqzBrzwjbGNC0fxBHxoiKYjQos6qUPBMN9z49wm3muHoV", + "痴女" => "AN5jk26HiwLAdaRFnoqdlCAR4KCCzC76_TLhoZJXwAx35d3V8kqk6iIJF6Gj9HhZHppjtfFK-_hJ", + "李雅柔" => "AN5jk259PTcLI49JguztLliwLs-WqEPNdlDRGocB2mqWZctGb85mMK283lmAOU1ND4QIFqbZzyqM", + "明日花桃桃" => "AN5jk24rqzMgAd-FanuzuJDaER9OGpbRDia2ms0onFbPL8FuoA9gF0pViXVaSZqRX90sfX_SgVAD", + "徐安安" => "AN5jk25WM23iaBD-3gSBjLTEqsWPHJHbmpv5Ymp1fMPhRk72XLv9cC3KvFrDBc5xKUEdECBDZO68", + "小爪几" => "AN5jk27ykEfWrNja7XWuIAtV1DgbcMLF2r3El6lFPo7eKo6B6cb7C6fJdYDlXEtKG1b8TLoPkqkr", + "玉兔miki" => "AN5jk25yYhJ2jptMekT29_0r1Jp3EZy55XhC4uK4_sQyQry-t5jkAhPb0Ra_jZVoVXmZb-qCLtnW", + "尹甜甜" => "AN5jk25241u9omLUYONVD7O5k0sNJE-ZDVKvIQvV3X6RuHV6ICI8vkU78_OndLp3V1IhoUbOqvWl", + "熊小诺" => "AN5jk24z4PoTYM0oy9WZZZ9ygtPnTDlP8wPt-s9L2bRbb-GKld1wl4lZHCX6_3PZev_nJu4OG2Kd", + "豆瓣酱" => "AN5jk25ImRsMpwvEgpZ5do6CIKjit5lCEgwe-zM8XvCWiQxlBkpeuPyln8UHQBPrVKW1Wdv_cWhJ", + "张欣欣" => "AN5jk24xyL4XqEk7ZrzZIOqQ5eQn4Z6tFXH19RyVxprWh9r31xVUHiopc87c9sn1yUyqhjxe8VvN", + "Arude薇薇" => "AN5jk24A9MJzalEL3Y6DRDizE5aHJVbUQU8wHLFAkfY0VVBJXWhXE_hv6yP3uZzJjyFZfsKSJLTq", + "刘艾琳Allen" => "AN5jk25PFtha3iqdQi8nq5TYBcE5zev8LXU_CAfKKp1bNiqXMZXgGz31eh8daRo1OARkQs8waFjM", + "蓝夏Akasha" => "AN5jk25dz_j_B1ojdfFeZ7doqqFydfE9ptRMSUtXzCKUw8s3TMYC6hYbyOFW0W3ywzA5q0Dq0kCa", + "模特合集" => "AN5jk27X8sFbzAZ70aPozVdFd1NVK9I9GdfZCXI19u6r9C_U33tIjPJ1gwPZefsYmKJMQC5dF0XN", + "夏可馨amii" => "AN5jk27vx7HY11TGNkN-xD7GVgP7oI2zKBDcwTIJCvV4PJNvtYd4XOs6ms7qU0vmqZGHJwd7Tp3Q", + "沈梦瑶" => "AN5jk26ZMepGRkHFi1SmczIy9zTMBrYDyBRmA5ySoq3WZspSvwK4B-8NxiC_LEB8QTHKQK7b9rr4", + "白茹雪" => "AN5jk274Nzhp3KbN7YUQreqcgocMY2rCgDs8AksaAlZeUJXrvmqwddVmaRVjb-nNmVSQ1a_f9Msj", + "奈沐子" => "AN5jk24hd-zRqP2ZB0BUC8fvZqsu5rObLsTlGoZ6pMSSa6eFvNIXRNV6S4Y_fxcoESur1H-FlVCG", + "韩静安" => "AN5jk25nhg6layVcZz9WJRhklnZbDlvmJlEPhwlEQcGfstjyML4wkmsHth1Vu8UKnHXzdgN_mWH5", + "玥儿玥er" => "AN5jk24t3FFWyj5G-VBaKcyXgHDs1z-jpNfd_9J6fAh3mbk_WGPVrBIdleo6gUxVgwIG5z-ZZyFj", + "MIAD" => "AN5jk2671bubTQlT2pWWeJQBS98UrPMkkEwt2GojjHKbIvU2W4zIeXP6pgSdDNGvCshNvX6dxSiq", + " 吃一口兔子" => "AN5jk268J5TEFhAOmcsikeOvNWa_hYPfGdUc2hK2jgWxxpxYQgwvhJhO77IAVwk0C3ULwVafp6ov", + "SSNI " => "AN5jk27__JDjdzUH1FX0nbTTWY_j5tpRtslY4XHzfl9EDYuhwGgM8kBxsXJ3ljqpWngP5XY_p_iI", + "吃货小绿" => "AN5jk24e_ZCFgYfGZ3dv1pKtjy83fV3bbsRUaoCVZ2KiSEk8kEx5mOqGYGg8HwwyBVJFsaW717oR", + "布丁大法" => "AN5jk26n_vGGqnxxN-pF-ef1qjMk0hdiX6yrKH719eS0v8d279xaGIOwfsLsbpQOeSRi7YG0VQJk", + "隔壁小姐姐" => "AN5jk27rko65IZlqCtkkQMVoBhjaqk9eQMiTaZET9Gizogca5USPhSBtE6KjsajEUjXX9ApLYGmm", + "kanami酱" => "AN5jk25Ho-FKpo6a-8GX1AdAWluA4aLRN1Tdc1ttGzdlOKhaZtIOw-GydX91jCvwhBQKRklJ2O_1", + "由衣酱yu1" => "AN5jk248VYP6Zz0kpFx3aF6c_m7yyi_Q68Cx3TcuEyEtnTyFo6RbAgugMY8t5vdmrWsaTIh_oX2j", + "猫性大扎" => "AN5jk27_FCpSMeU8kyh1hV9yiy3MQLm-UoB0VwZ0AzxwJRasBB4fwGbvYTaIcp6SnylPMP4ynXhw", + "Leghaker No 111" => "AN5jk24rwAXQXJMG04Rumyk-XY3KGqNL7jvWGyco8QQx-sleGwXbeoG4BkOcL8qkoBgjpPpAOkt6", + "TouTiao头条女神" => "AN5jk26e1G-WHKzcDMa0sNjZFw07QD77ROP-FOwaKAXkozMSM1sXP4fSJKtScuccSyRXTCziSuqK", + "[Leghacker] NO.139 [91P]" => "AN5jk24UEIXe41T4sPph1WDwOjTbtSeSj2Ksg4P0FAHXv0r2bvvHE2rrU5xuNTQ3f1-VAsJxmAj7", + "[Leghacker] NO.182 Olivia [92P]" => "AN5jk25WeE1mzUN16vHY79LJyJlW1YLUb0lJ-o6yFcrr4NH2_9xLyrVo01qFZHpQPIrSMW8S8AT2", + "[Leghacker] NO.150 [93P]" => "AN5jk25etiQ3zGDQLmHnwKVRmqsWVAKnmsrpbgTAqBO7FJLyinnWldAD5uI30Gqz3CIEy2qKypG1", + "Leghacker" => "AN5jk27g_zmynNOPcOxKPGIkArOmXjX2cywc4OcX--QGkYZhHy_s3TvwpOa4Qk3-KHZn5BfIl829", + "TouTiao头条女神 李媛媛" => "AN5jk24R85EVaTSKoeLHp1VGzu4UsdCNGG-z9tUPLX2zXoe_atM-HaOi5r0Vc6jNmZAPAmIl-U2o", + "TouTiao头条女神 营营" => "AN5jk24_D9DwFlwsSjPjQIMLw4BWHmu6Pg5Mwcy6Lj5mVCYLsx3qNQBSmFQhwrz5nzmtGKHEDKi6", + "[TouTiao头条女神] 038 SM捆绑" => "AN5jk26whRwVBXPOnwTRioNVCemFrTeSLNmFbLzQqQ0NmqlPlq-tKZBTLghHRCCZyhO59rUKa1aN", + "头条女神 035 苏子淇2" => "AN5jk269d5UyEMZJ0vUTLRGANZhvYXmR1I-Cvsg0y4oKRTlhLEejStGXSMKktxhG4WtEtdA3-r_9", + "柚子178" => "AN5jk245xTUoObdume1Zy0JlE1UzzAJIewEI6fjtsCVkSwTk5OwynwJxJdlQdopZ0iab77pyUZaS", + "苏小曼" => "AN5jk266jMC6E1u2KURLvUw2QJBw1jxZzeO9VAJwriLDJDyyqKvoYhfdQrxzDBaXOled8BbWzZw4", + "吴雪瑶" => "AN5jk27Uj_5mhztRD0LMjGspn6D2ZlwyBVqh4a-QKZ-S6xQW_T_5Gd93huOCfTWc4QIR5v0F5vf0", + "尹菲" => "AN5jk27_JOazNZTiK1sX_Yu3xg3aKP2Kg3rRvnFuruRcg-tBMTAP07na3fIY0TmDUOsi2E1eZlob", + "可Vicky" => "AN5jk25e_igbBk08iuGmks5uLHBMcK7DFQ-5mhkNH8dSNRrABeX_sP6_m--vQgPfUujvuDInmfFH", + "MIDE" => "AN5jk26_fJ7TMlSzq-yO7rrO08uhvLWJzZfDJYlVe_ZHirAR4sonLEUtclDbYBLUga8RLgpBxJqZ", + "枫哥" => "AN5jk26luqXd1sNv_FvfJEiMZ1zIp3BoLip7sZUyJUwtS0g6euxhWupyksj46Mt8X7Bsv1Os6bZV", + "戴诺欣" => "AN5jk27NIKnOJzHLEYU-FD-snw9OXKyB6T52xJZVnW4G04glRSIEUMqCP9vV_k94D0OeNkEU_5hu", + "浪味仙儿" => "AN5jk27dZahmzq5_xPQY98jgIUFHSueFDPcieH_f92TP6OxbubqDZtvNWRy5QX7aCRApX5Uselgs", + "黎子大人" => "AN5jk24sbjYeIRzd-WVCSgENllgAfQElEySEpCH_wa0wP2iCZAlY1-FZYyymZ-GUNy4upbb1Zkwr", + "阿诺不是施瓦辛戈" => "AN5jk25HPazH7g7_wLUGozTG7Q9ZgIqcXcG5nxUtWafSm82tfXiOmqgI0Phq9HDk2VxCEu3gTIJ2", + "咲优酱" => "AN5jk27fltg56dgTJdxXAqD2jckPVRwrrRgXqFQfKp7PnioKzDkhvTEKoVpqzKcKiaZ5779TdPmc", + "w棉尾兔几w" => "AN5jk258XGSRY2MfPee730qWEfjCsICDo6eyUQHUxhXV29t_HX5FWpNWUuI2bmDLLJizb5lIRUUK", + "呆萌橘子酱" => "AN5jk26G1cKIIaF01NQcKi-NsTpV03W2ab21SMl_e485Xoa8R2U1RD1XNdEEh-2dpkrPZbbFIPtq", + "安久奈白" => "AN5jk267Ef87rYppJ1Qc4bmbBl7bpZKai6G3lNpNCQcW8IxmYbaXNZDPHWHYOXc1XV175fYax1Q1", + "押尾猫" => "AN5jk25xf_NTc-9YLkMJlxf1qFl-G6PVATh3U8WrbQB7TuUPCvMWw9NiCWbwFvAp8Vnc2Pchvfp3", + "小v" => "AN5jk25lBGiL1tcdnvN92b7x5R5Ne1siPJoJqDE7qo_RLimxzy0BSlxh_Tm1u_xNUSBd27Z8T6vX", + "15岁loli少女九" => "AN5jk261fRssmUGxOVnT8UzifusrlaY4ghcJR1GcTCqlrb1Onsm5qRSeRZUtNsKi9f7E8_wRACMI", + "夏沫果果" => "AN5jk25FZBrGzpLh68pu0y4hkL0xkTpJcPOV78x5FUq0VM2PTqfuYZumYBNLmwkVJFMDOgZ1PQnH", + "ran冉酱" => "AN5jk25wqABR3xTrFOXrbnKN8SxJgVYHWJJCIqNHGQv4U5jh0QUwjpgrLE8uNm-dlNxCSrij2ROg", + "软萌萝莉小仙" => "AN5jk25PGLVSm-lP0mtCDSUdA-2uAZ7GCjTIHw4nESlfUe4aWXf-xJVpAuii3CAHcdjJU4D9sHVI", + "张雨萌" => "AN5jk24ZWVlThrsGg_-xDBY56Z-zzMSYCjJVXxSQN19iaOan5oDJSecRCPwCmOw5kkrt8QDciTnK", + "可乐Vicky" => "AN5jk24PYhVxauRmhnp1KkHHA5fEWPFn4pXfXjyM9xlHHIMHb_OaVnpcynS9ArgAPglRn0G7CP00", + "媛媛酱" => "AN5jk26huI0Z7ZwppxoT-qR3usspr7OWKF4QaMgq9ZBeJs05mTmEX3LfVhO0Hyz4XA_Bo7CTvLgz", + "IPX 400-500" => "AN5jk24M2PEi96lIlL-HmmNNL_uNjnjwj5m9dKwbpx2AM5rt8yj9PzXpvEsdXEnXhPUlHjXitRh-", + "beautyleg lora" => "AN5jk24nL3hHDiwEtDsNEix-3a-zh-OVSfW7GBeXs62dBeBbLGalam-A7J3b-bIjsGLhrskyfXoV", + "佐佐木希" => "AN5jk26_KPPbFIt5LDwOVSjylO4jfa11C_PqrkDMUmb2ZclqttDBylIp6o6_DALRNh8qAhA8_S1P", + "水野朝阳" => "AN5jk26sDS67t69sYdQ771O7FB-YXsGfacghKzKTUvIxO-WEbLxYnQbRm7GLGJC1ahixTZItXA0J", + "明月紬" => "AN5jk26VtmNGPv63wms-0pOPSpmRoGmFE0w8WsHXreFJ6leEkrAnJkcjW4KUXsZFsjjGdshfxC5g", + "满员列车题材" => "AN5jk26aQH4kAyAnSfG1vqhfPstZBPJ98dwzt-YVdumuCnYzlXcTOmZGHRBoxhQjKnjAwrXBU2No", + "葛征" => "AN5jk26n8n-0brWLWtJhFopY8Rg1koyOd-h8_Ve5prPO1n895kZCwz0u9rdi7NSZm7ImnQGE9KXn", + "佘贝拉bella" => "AN5jk24mPSwhuh5t6O51_LLqu5wYY8JcMJ03xHLJHN2ssOFTMXzcWpogdjBRACGEL_Yqrip5rKaJ", + "桜井あゆ " => "AN5jk26QBC0sRR7Fds4ZTq0t6-eJ33htAU0kCHhHEa2W6_MakPXeFWWKx4Asdw3cb4FkfYkvcI0h", + "肉晴MINI" => "AN5jk25uv3yKBZsCA0ljhayejBkbNvVqw-dYWKtxnp7Rkd3Csd7ZNOskTcDslMRpmeWD5IL23xOQ", + "Cherry绯月樱" => "AN5jk27sY3sYgn5hvJWvtMN819MGq-b_Ae89FJn3R_YYOI8PQORn77Oh4ZGeEWjFpYEqKkvCsYV1", + "文芮jeninfer" => "AN5jk26W6tEP0g2SLi20iDSLK3-mA55H0RA5nP0wgTVtZpZp7Yh3s8hSAKlp3wvoni-aYuB9QWPE", + "Emily尹菲" => "AN5jk24xhjvS1kt44Rq4yJU5bzC3EN4IXNY6Vq6e9K5W1gPwvKP91BRozQ9bYk2pvNFctgxaK1DO", + "乖乖小野喵" => "AN5jk25ffAXUTDvk6NUC6AIyvuqcgosP_JoV5u1SYcICOYTM_62fFT2VMRiNfJGiDRjBDmt8jFSa", + "娜比" => "AN5jk27LbXjALstyxODetUZDJuLUzrf4u85g61eDz2DYpQaW8TgagnACXicHlaMLsXJp-mJWZfbb", + "果儿Victoria" => "AN5jk24QF3qyiwKwmTGot04myeclEWAWUjx6DOj6f9h-5B5h4VGzmqLOATomQe1GNuQIaV0YBBQE", + "中田合美子" => "AN5jk26KrRKddP4s9as87ssLwCw5jp8smn1jHGFpo8GMio6UbuQyczHAs-wKLNWL-MKYrZvfZiA6", + "星萌" => "AN5jk27LDt_AFmPpoyyxYbKdG-8fl3XvLcDExdrzHTwKPyPO9tJ46pj_mS2CTMzZzCDLW7MFToc_", + "沈梦瑶" => "AN5jk25V_5gfrIMqqcIH8GU2gXegGFxGoE5TPGdyX0Q2l5YUU-0KU27MnCg0geTJfkRdO1VJggpB", + "羽田爱" => "AN5jk26UO41bV-qGSaC8ao9Y1cfyTelr2sdtg09XQpm-pTj6YNlIfaRua6Lteo6_aR1jW4gV0l14", + "hello venus 权娜拉" => "AN5jk25tkT7wy8rZleuO1InaG5fuCHiPYtSJJDb0Onmsz0D7PfEfSQAlJJQOChwPrGZF3pUqyCNi", + "Fairy如歌" => "AN5jk24JTkG_VNrUv7RRhSuOnfOmvZv-K5maR3p02rlE8Et1N5FCN7i2YgIGJgLk7yKQWvEiE-Cs", + "小雨baby" => "AN5jk27y3UlVc9VkA5DRY9Zoi1OH30OZDL_RGQ6XYTnmIbHH3oZH2bszyxICl7_SKe8bsUDotktk", + "陈舒羽" => "AN5jk263Hggv_v3p7PzJ3UGmfHdjqq4pEzP6DwMGOV88geDTzZIQroQUwvqL58ChCtUzk_R8lbCJ", + "方子萱" => "AN5jk24SSQfzhN8adqbLTBh2ZSdwIgdDJzoRhMJ2h1Wbyd3MgChLpgTMb5wYy1efRYUs1DeIRzwN", + "林子欣Freya" => "AN5jk25KDihYlpa6MPkesYbf8ym2iLgGHowtXGLPKeKiHknYs-M4ApHUqhBeht8do8OX7KnBBKzM", + "龙女宝宝" => "AN5jk26mmP98Blz8rYaQDKXHki92mmcoW3sZY4rSTlV2-CoDPMr1q6ifUaT9JOyhn9xSVwzJiddO", + "林煊煊" => "AN5jk2798lZVXzlU9lg34EDe5fQ3C3_jqJOydrnsWMbed5SthNXWyU4dSZ3btV0q4MbxBiAXuOoM", + "张雨蒙" => "AN5jk25IRPqmPEXzEHXVUfkBzsBEmxrS9XyLe23k6x_Uyv-LlP3EAdOWZE7FTH1Su9I1G_T55W2Y", + "HeyuZhang" => "AN5jk266ubXN1DFQQtdbt7lbEAAWPABNiZ4QhmgIEBM9bHdhdDEafdTpVq4LBWD_kJBJdAS1BoZj", + "筱慧" => "AN5jk25zDcU3tv2vSR1i5I55Z8DQvfFKA5qt7a531aTmdjB-R7N7Fl0zBq2Y2F-wCWABOBl8FHqD", + "momoland 妍雨" => "AN5jk24mjDNb9wdw9qrncku9f96c9SrXP1wRIgM_kFsS6X59j_5Q-W7Ey4cYoYPHs0wl6BzqS2Ze", + "AOA 雪炫" => "AN5jk24fRRj7lcHZUB6bR601ZV7HE07M1_wEXz1VSqAphrActVuCt6NgPWt5LjbgSyO-ZOG1j7kn", + "x-art" => "AN5jk25HDgOfH6uKGfW0LZ5-kexGXEXa1Xuob9w1Jr7HpHWtD8TMfKrwnwGue7wef-k4_Y6sSVYC", + "swag" => "AN5jk25pSNNA15I9Drpz-lyURia0p6_9K0uW_n_vmjATqAszRX2Ww0Ks28wsjVCTLSFANYVnXAir", + "陈小喵" => "AN5jk25czKWawAHrXQTKyXaT3MC7qpulAA99dKA6sOcqzi6jZFhUScwx4AVkReUfEZFz9j7D31wi", + "kelly凯莉" => "AN5jk25-1eQAeRLYtGv5tA9YIGRCmk6Br1H1LoHrITP-JhedYVd6PPLq6kPezfhZBALGRx9D4O7h", + "cosplay 小视频" => "AN5jk24pcB_LfftmfjteK7BrIdBmLLgpJDIQRC25emVD-GXgsfghJID3rwWl9i8hJVBHKMSpSRzJ", + "IU" => "AN5jk25LOFfHQ6KRBCZk0k1TMIPuX4Ga1EpGol4UIPKSOw9Ss0WcqVD0MbB5ftyjjrnBnkhUQbRG", + "nine muse" => "AN5jk24l-cMG1kWS2knxMJQGqfG_ciY3E5eUmJ8xJGIh--wa1x-cVChiMAWJRuMvp4g_-vHYFbs5", + "橘子焦糖" => "AN5jk24bulGLU6aJy-SmWygzrPklPHFtaygY4v-sQLJmSh7pnCnf8bnUZH3ZIsLvQ7vU5a6Fbg2L", + "brave girls" => "AN5jk27EzveLBwrCJRLwitfBUEIzLpVoftaRiuruzExk0WNqWrz4Q3gCC-IV8dak5W3ofPH_vivR", + "顾乔楠Cora" => "AN5jk24ioqw1SehoDf00L_NC7HDEglTV71LNOgjCruyrMJ38d3bMWcSduaHZ8MkgKpJGjb7-7USd", + "泫雅" => "AN5jk27-xXuKW-JXq5I0IoCZ83lBuJ4ZhKKdHgTgceHVek2xpMf8itxB3zRPC6YX1V_oNpKl7Rma", + "张小琪" => "AN5jk24ucX9gONu3OIMTUYb4UzVrqs3DfbyBHf9E05aQZdqA7pXKVdYsDBcMLFQkeAgXfkEtmfEY", + "璀灿" => "AN5jk26Sepqxnt8rLXgu3FBOD8eHfYDw_DcRKvUDyvUt7PwcP4hin4rJjxYE5slB73oDL4kAUuVI", + "青稞芋泥陶可爱" => "AN5jk25Af3J5I24AqyYtE9eWQkS6n2jr4O2qXQf5lPmobGq-Qrbu76I7nDHeJFH3RVg2XHFPNKz5", + "郑颖姗Bev" => "AN5jk25kitLb5bs0tQXayH3LjJyO5zK6MdbFfPOcn8wlQp6PJh-XdaYZzLiqLnv5ua5TnwukBV2q", + "悠宝" => "AN5jk25RZjtK_ZfGiVc81X0edgwhB_VBkxR2yx2Mg9I2_6c_8KgUzbT4yVLCE7DQu-FOJJGXt6rk", + "吴雪瑶" => "AN5jk27b46XLsvnDMveXKzdK-pg7SWhPVvOsVJfJTPuamJ2q9QLZYIqHIunNOJVqUC_6HfmtL0Gy", + "blackpink" => "AN5jk24Dvj70ZC0e6oLC9oUTT1LzQpXxYYv7R4pgBm809oynjBK6y1-agIXElPzkZvPFTzjNirnH", + "唐心" => "AN5jk25kNEGEOowk0uom2IoISt2fpJptjxkj2wEI-v-cOeCZPRUOaemiWvugpN623MaoRCjxUO1h", + "Kanami酱" => "AN5jk262VtPLCclSAVquap4wiNH6FthXkmZa2XR81sI5W7_LnE3p-hvWOSENBNyJxghl7xKAbQV7", + "软萌萝莉小仙" => "AN5jk24JEdlL8KV3OMnpJbDNOkiiEyxzLX2wAozSMEQI2J0gpbVXR3ty2ha2iAeJ6yVw-j50T0tt", + "玩具少女" => "AN5jk25wN0X5aN8b5__1qp2b8peyFjT6yEKtghAZ14R2y2MwJVIHxbeOwseV9MkbFVOt-9xfcijc", + "豆嘟嘟" => "AN5jk24TmcFvo3-Idcc808zIARtIVVKWUprub3p77uaZFwS9rOoRz_dSEfSR4LbNSkCZjthF1Tfg", + "奶瓶子" => "AN5jk26-qiih2MzQEm01Ai5fQF3hviu2YkBrdBF84aRwafYot90Bo0bQat8qn0D8ycjmlQg0I6dG", + "糯美子" => "AN5jk25q13-PYH9nioqzvgmLLVFVANE83DYlo9FlQmL7Do6bOcG8D6XDTXtOHLNQBtZGTtGdKZyx", + "萌白酱" => "AN5jk26EcMJn-31YHy3X1QPWuP9ohzNvD60FGIqslSqh4E-dC8kAV9K6HocTWRbsn3ZrdGG7PV6v", + "Laura苏雨彤" => "AN5jk26QKqV1U_YDunQpX2yGLGGvcVDHTGeo_l7L6sVxQMYPgPFoo5pLg3Yh0PdyWepgyI3sW0MG", + "林文文yooki" => "AN5jk26NLcF64X0tBc0EWUtdiANQQj1GwoFZnhL-KC53dzMSz4UhoawEJgj8XdoJVQco29wBK_ly", + "林文文" => "AN5jk26h6iiV3zT5PZFCQCcjRP5sl3-Q2MVyC8D2fNoXVzMQXooqE5Ue1Nw_FUQuYwnMhvNJuBMs", + "心妍小公主" => "AN5jk25djKAFoyRtlVN1R2Es-2RNj3XxXgUrSh5pgcYynbQKFwOQYskk89MzOJSLD0Ms-XHwm0Zz", + "Xiuren 凯竹•廿十" => "AN5jk27jr5iCm1_TDKxpHoKKTFArAVZirY0CWUcb7zdxdx3vpvYuGQCBInVqeM6gXQE8nso2Hg5x", + "韩姗姗" => "AN5jk24phhg13pLEeNzqWKbvxoDH_-jncXKsuy4hcjdblaop93pFQG-LBCta1X2mPBgkyFERNo1e", + "妲己_Toxic" => "AN5jk26P1Bvv9RIARPHfwuiLZ4R2_g946F6YwBynJiEUY6_TUNYNdS4u11EriFwRy6i-h0sOEmTZ", + "晓鱼酱" => "AN5jk246qitYJQZP81uU6Gw2zDUr2rsEo9akaS6ro-aPfB3OaMR3U4Gf48YFNwn5A9YwJFmjimIm", + "2021年4月8-11日厦门游" => "AN5jk27Se8aCOZxvjHG5YmNzsncYKP6W1RsZt4TEwsj_3X3cZaFChLR1MaAw1hl5nhA7elL4YrTB", + "林芮希" => "AN5jk24ok_afmMk6NIuQjv0Xj3fRlY10wKgJRKjJEtrUY45FEWH4181QJu0TUvG2hh_2xva8FFQB", + "芷萱mimi" => "AN5jk24r3E2vyFjQ7X5fmI97GtNW8mkOc8nzeUizdc8u13V1QxF_6NuYxmfSX5aVE2N4SXWwHZAA", + "赵万灵" => "AN5jk242aDkP3fdKOpJ2f1uSlVzI3QUIG7RNS58JSdTC9uZoRwRH8V-7S0TU4S21u8Pqhcc3IfrS", + "九月生" => "AN5jk24IoqMyWYlfJoFx2UzV1QfAeXwAeskdRimOTbGmuQcbbXbhIqSJjnVLearws-99k8IpUjb1", + "揉揉肉肉" => "AN5jk27ar-uRdFPfHcXWSQow0vyFuIp3AyJgRWIzQ8M30MQmmMTtfz1FdftnCJGhQHW38WDHRf_0", + "文静" => "AN5jk27ET2HIhhtgbjfMH-Qte4QM4YQZjTiB13b9esIETMoJqyjCOf7hkIO_7Rq_OCMW0WKt417V"]; + } } diff --git a/app/Http/Controllers/WeiboController.php b/app/Http/Controllers/WeiboController.php index e786dd9..e40d63c 100644 --- a/app/Http/Controllers/WeiboController.php +++ b/app/Http/Controllers/WeiboController.php @@ -5,181 +5,180 @@ namespace App\Http\Controllers; use App\Services\WeiboService; use App\Weibo; use Illuminate\Http\Request; -use Illuminate\Support\Facades\Log; - -class WeiboController extends Controller -{ - /** - * Display a listing of the resource. - * - * @return \Illuminate\Http\Response - */ - public function index() - { - // - } - - public function list(Request $request) - { - - $size = $request->get("size", 5); - - // https://m.weibo.cn/api/container/getIndex?containerid=1076035123577126&openApp=0&page='.$i; - // Fan_Cam_4K 1076035733650527 page 902 - // 儒雅随和 1076035123577126 page 139 - // 徐圣佑 1076035893812490 page 283 - // https://m.weibo.cn/api/container/getIndex?containerid=230259&openApp=0 - // 短短 1076032137020951 - // https://m.weibo.cn/api/container/getIndex?containerid=230259&openApp=0&page= - // 物理 2304133907143723 - - // 230259 自己 - // 轮子哥 2304131916825084 - // 徐圣佑 5893812490 - // 徐圣佑- 新号 1076035893812490 - // Afreecatv 精选 1076037383142802 - // AF-录制 1076037627445357 - // 录像专用小马甲 1076033785550287 - // 录像专用小马甲1 1076037453003153 - // 录像专用小马甲2 1076036637436995 - $list = [ - "tu是真的tu" => "1076032267562540", - "自己" => "230259", - "轮子哥" => "2304131916825084", - "徐圣佑- 新号" => "1076035893812490", - "Afreecatv 精选" => "1076037383142802", - "AF-录制" => "1076037627445357", - "录像专用小马甲" => "1076033785550287", - "录像专用小马甲1" => "1076037453003153", - "录像专用小马甲2" => "1076036637436995", - "短短" => "1076032137020951", - "物理" => "2304133907143723", - "亲亲奥利给 af" => "1005056070814923", - "FanCam_" => "1076032740158183", - "ParmyAU" => "1076032482381165", - "热舞托管站" => "1076037422251891", - "af尼美舞蹈" => "1076035639898367", - "傲娇的猫猫猫" => "1076033118852135", - "绅士甄选" => "1076037644465107", - "Win话事人" => "1076032439815352", - "粤上秋璃子" => "1076037747006685", - "腐团儿" => "1076032304291523", - "聂小雨" => "1076032579189065", - "小何同学" => "1076032104580380", - "只有一个9521" => "1076037504338957", - "娜扎工作室" => "2304136001863056", - "刘教師特别授業" => "1076037686776705", - "Nana姐姐的微博" => "1076037764879728", - "小蓝蓝 plus" => "1076037409360499", - "露露" => "1076037731119705" -// "娜扎工作室" => "2304136001863056_-_WEIBO_SECOND_PROFILE_WEIBO", - - - ]; - - - - - $url = array(); - - // for( $i = 341; $i >= 1 ; $i-- ) - // $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=1076035893812490&openApp=0&page='.$i; - // for( $i = 100; $i >= 1 ; $i-- ) - // $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=2304133907143723&openApp=0&page='.$i; - // for ($i = 100; $i >= 1; $i--) { - // $url[] = 'https://m.weibo.cn/feed/group?gid=4423532052076817&&page=' . $i; - // } - foreach ($list as $key => $value) { - for ($i = $size; $i >= 1; $i--) { - $url[] = "https://m.weibo.cn/api/container/getIndex?containerid=$value&page=" . $i; - } - } + +class WeiboController extends Controller { + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() { + // + } + + public function list(Request $request) { + + $size = $request->get("size", 5); + + // https://m.weibo.cn/api/container/getIndex?containerid=1076035123577126&openApp=0&page='.$i; + // Fan_Cam_4K 1076035733650527 page 902 + // 儒雅随和 1076035123577126 page 139 + // 徐圣佑 1076035893812490 page 283 + // https://m.weibo.cn/api/container/getIndex?containerid=230259&openApp=0 + // 短短 1076032137020951 + // https://m.weibo.cn/api/container/getIndex?containerid=230259&openApp=0&page= + // 物理 2304133907143723 + + // 230259 自己 + // 轮子哥 2304131916825084 + // 徐圣佑 5893812490 + // 徐圣佑- 新号 1076035893812490 + // Afreecatv 精选 1076037383142802 + // AF-录制 1076037627445357 + // 录像专用小马甲 1076033785550287 + // 录像专用小马甲1 1076037453003153 + // 录像专用小马甲2 1076036637436995 + $list = [ + // "tu是真的tu" => "1076032267562540", + "自己" => "230259", + "轮子哥" => "2304131916825084", + "徐圣佑- 新号" => "1076035893812490", + "Afreecatv 精选" => "1076037383142802", + "AF-录制" => "1076037627445357", + "录像专用小马甲" => "1076033785550287", + "录像专用小马甲1" => "1076037453003153", + "录像专用小马甲2" => "1076036637436995", + "短短" => "1076032137020951", + "物理" => "2304133907143723", + "亲亲奥利给 af" => "1005056070814923", + "FanCam_" => "1076032740158183", + "ParmyAU" => "1076032482381165", + "热舞托管站" => "1076037422251891", + "af尼美舞蹈" => "1076035639898367", + "傲娇的猫猫猫" => "1076033118852135", + "绅士甄选" => "1076037644465107", + "Win话事人" => "1076032439815352", + "粤上秋璃子" => "1076037747006685", + "腐团儿" => "1076032304291523", + "聂小雨" => "1076032579189065", + "小何同学" => "1076032104580380", + "只有一个9521" => "1076037504338957", + "娜扎工作室" => "2304136001863056", + "刘教師特别授業" => "1076037686776705", + "Nana姐姐的微博" => "1076037764879728", + "小蓝蓝 plus" => "1076037409360499", + "露露" => "1076037731119705", + "小仓" => "1076036880826706", + "EstheticBody" => "1076036577888143", + "kyokyo" => "1076032591431197", + "softygirls" => "1076035040459465", + "是你的程儿" => "1076037607376925", + "Kokuhui" => "1076037504965364", + "川" => "1076037648703289", + "小红帽舞托" => "2304137160189611", + "李一桐工作室" => "1076035973698579", + "李一桐" => "1076035372556014", + "Yukicai-" => "1076031035321575", + "知一呐" => "1076037458616069", + "" => "1076037040041221", + // "娜扎工作室" => "2304136001863056_-_WEIBO_SECOND_PROFILE_WEIBO", + + ]; + + $url = array(); + + // for( $i = 341; $i >= 1 ; $i-- ) + // $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=1076035893812490&openApp=0&page='.$i; + // for( $i = 100; $i >= 1 ; $i-- ) + // $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=2304133907143723&openApp=0&page='.$i; + // for ($i = 100; $i >= 1; $i--) { + // $url[] = 'https://m.weibo.cn/feed/group?gid=4423532052076817&&page=' . $i; + // } + foreach ($list as $key => $value) { + for ($i = $size; $i >= 1; $i--) { + $url[] = "https://m.weibo.cn/api/container/getIndex?containerid=$value&page=" . $i; + } + } // for ($i = $size; $i >= 1; $i--) { -// $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=230259&page=' . $i; -// } -// for ($i = 20; $i >= 1; $i--) { -// $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=2304131916825084&page=' . $i; -// } -// for ($i = 20; $i >= 1; $i--) { -// $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=1076035893812490&page=' . $i; -// } -// for ($i = 20; $i >= 1; $i--) { -// $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=1076037383142802&page=' . $i; -// } -// for ($i = 20; $i >= 1; $i--) { -// $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=1076037627445357&page=' . $i; -// } - return response()->json($url); - } - - /** - * Show the form for creating a new resource. - * - * @return \Illuminate\Http\Response - */ - public function create() - { - // - } - - /** - * Store a newly created resource in storage. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\JsonResponse - */ - public function store(Request $request) - { + // $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=230259&page=' . $i; + // } + // for ($i = 20; $i >= 1; $i--) { + // $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=2304131916825084&page=' . $i; + // } + // for ($i = 20; $i >= 1; $i--) { + // $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=1076035893812490&page=' . $i; + // } + // for ($i = 20; $i >= 1; $i--) { + // $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=1076037383142802&page=' . $i; + // } + // for ($i = 20; $i >= 1; $i--) { + // $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=1076037627445357&page=' . $i; + // } + return response()->json($url); + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() { + // + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\JsonResponse + */ + public function store(Request $request) { // die(); -// Log::info($request->input()); - $weibo = new WeiboService(); - $result = $weibo->scrapeWeiboPicAndVideo($request->input("content")); + // Log::info($request->input()); + $weibo = new WeiboService(); + $result = $weibo->scrapeWeiboPicAndVideo($request->input("content")); // $result = $weibo->scrapeGroupWeiboPicAndVideo($request->input("content")); - return response()->json($result); - } - - /** - * Display the specified resource. - * - * @param \App\Weibo $weibo - * @return \Illuminate\Http\Response - */ - public function show(Weibo $weibo) - { - // - } - - /** - * Show the form for editing the specified resource. - * - * @param \App\Weibo $weibo - * @return \Illuminate\Http\Response - */ - public function edit(Weibo $weibo) - { - // - } - - /** - * Update the specified resource in storage. - * - * @param \Illuminate\Http\Request $request - * @param \App\Weibo $weibo - * @return \Illuminate\Http\Response - */ - public function update(Request $request, Weibo $weibo) - { - // - } - - /** - * Remove the specified resource from storage. - * - * @param \App\Weibo $weibo - * @return \Illuminate\Http\Response - */ - public function destroy(Weibo $weibo) - { - // - } + return response()->json($result); + } + + /** + * Display the specified resource. + * + * @param \App\Weibo $weibo + * @return \Illuminate\Http\Response + */ + public function show(Weibo $weibo) { + // + } + + /** + * Show the form for editing the specified resource. + * + * @param \App\Weibo $weibo + * @return \Illuminate\Http\Response + */ + public function edit(Weibo $weibo) { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param \App\Weibo $weibo + * @return \Illuminate\Http\Response + */ + public function update(Request $request, Weibo $weibo) { + // + } + + /** + * Remove the specified resource from storage. + * + * @param \App\Weibo $weibo + * @return \Illuminate\Http\Response + */ + public function destroy(Weibo $weibo) { + // + } } diff --git a/app/Services/AcfunService.php b/app/Services/AcfunService.php index 9a1343c..247ccd5 100644 --- a/app/Services/AcfunService.php +++ b/app/Services/AcfunService.php @@ -1,299 +1,286 @@ request($this->CollectionUrl, $param); - dump($result); - $parsedResult = json_decode($result, true); - if (count(Arr::get($parsedResult, "favoriteList", [])) > 0) { - foreach ($parsedResult["favoriteList"] as $item) { - AcfunVideo::firstOrCreate( - ["content_id" => $item["contentId"]], - [ - "title" => $item["contentTitle"], - "from_type" => 1, - "from_collection_name" => "默认", - "from_up_name" => $item["userName"], - "from_up_user_id" => $item["userId"] - ] - ); - } - } else { - break; - } - } - } - - public function request($url, $param) - { - $curl = curl_init(); - - curl_setopt_array($curl, array( - CURLOPT_URL => $url, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_ENCODING => '', - CURLOPT_MAXREDIRS => 10, - CURLOPT_TIMEOUT => 0, - CURLOPT_FOLLOWLOCATION => true, - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, - CURLOPT_CUSTOMREQUEST => 'POST', - CURLOPT_POSTFIELDS => $param, - CURLOPT_HTTPHEADER => array( - 'authority: www.acfun.cn', - 'accept: application/json, text/plain, */*', - 'accept-language: zh-CN,zh;q=0.9', - 'cache-control: no-cache', - 'content-type: application/x-www-form-urlencoded', - 'cookie: _did=web_49890374118F8C83; _did=web_49890374118F8C83; acPasstoken=ChVpbmZyYS5hY2Z1bi5wYXNzdG9rZW4ScC3mFmJ0_Ny_jdlp2zX4A9m4Cdsr9h5Pz1Ee1jfyHlfDWB14lyEDrxjlR_wDpBDHlFj2MoPPKJhFw_vhgMWL4oYye4jeI4T-EkCJXSuh19UabKnU00Rj84eEQK-wqRckMqhgZC0Uy5rTTIRkXkrqgDcaEsGnuGb9hF53qaZMO1JuGKUpeyIgPM38QqVI2JkcsDH48S4w8MCRIEl_3M4VqTyPWTyDS2coBTAB; auth_key=572984; ac_username=Nicksxs; acPostHint=e4d65708dfdada24d2843be08d79cff2c1da; ac_userimg=https%3A%2F%2Fimgs.aixifan.com%2Fstyle%2Fimage%2F201907%2FuQ5Vc06d3HSVTjY3VZocT81X40FByVpw.jpg; csrfToken=ImnwOlsler0iTnGD_YS1hxQ8; cur_req_id=3800241004A0CFD7_self_2d45c537a4f93b4689463857c3114dd1; cur_group_id=3800241004A0CFD7_self_2d45c537a4f93b4689463857c3114dd1_0; webp_supported=%7B%22lossy%22%3Atrue%2C%22lossless%22%3Atrue%2C%22alpha%22%3Atrue%2C%22animation%22%3Atrue%7D; Hm_lvt_2af69bc2b378fb58ae04ed2a04257ed1=1677578838,1679105811,1680140982; Hm_lpvt_2af69bc2b378fb58ae04ed2a04257ed1=1680141307', - 'origin: https://www.acfun.cn', - 'pragma: no-cache', - 'referer: https://www.acfun.cn/member/favourite', - 'sec-ch-ua: "Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110"', - 'sec-ch-ua-mobile: ?0', - 'sec-ch-ua-platform: "macOS"', - 'sec-fetch-dest: empty', - 'sec-fetch-mode: cors', - 'sec-fetch-site: same-origin', - 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' - ), - )); - - $response = curl_exec($curl); - - curl_close($curl); - return $response; - } - - public function onlyRequest() - { - - - $curl = curl_init(); - - curl_setopt_array($curl, array( - CURLOPT_URL => "https://www.acfun.cn/rest/pc-direct/favorite/dougaList", - CURLOPT_RETURNTRANSFER => true, - CURLOPT_ENCODING => "", - CURLOPT_MAXREDIRS => 10, - CURLOPT_TIMEOUT => 0, - CURLOPT_FOLLOWLOCATION => true, - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, - CURLOPT_CUSTOMREQUEST => "POST", - CURLOPT_POSTFIELDS => "perpage=100&page=1", - CURLOPT_HTTPHEADER => array( - "authority: www.acfun.cn", - "pragma: no-cache", - "cache-control: no-cache", - "accept: */*", - "x-requested-with: XMLHttpRequest", - "user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36", - "content-type: application/x-www-form-urlencoded; charset=UTF-8", - "origin: https://www.acfun.cn", - "sec-fetch-site: same-origin", - "sec-fetch-mode: cors", - "sec-fetch-dest: empty", - "referer: https://www.acfun.cn/member/", - "accept-language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6,ja;q=0.5", - "cookie: _did=web_32586178239268B; sign_remind=1; ac__avi=1010934062045114530882ab2cd25b90ef370ea22b151084981cf6c2c6febafe3a364146315ef65213; uuid=d7fdb48c886459236faa794ffafbfbb0; analytics=GA1.2.626694313.1592365512; lsv_js_player_v2_main=62b719; csrfToken=TnNz3lG1IfA-93kw4M-Px06m; session_id=63965769975BFD30; webp_supported=%7B%22lossy%22%3Atrue%2C%22lossless%22%3Atrue%2C%22alpha%22%3Atrue%2C%22animation%22%3Atrue%7D; Hm_lvt_2af69bc2b378fb58ae04ed2a04257ed1=1592481541,1592489023,1592797550,1592976124; lsv_js_player_v1_main=f2c6e6; stochastic=NWFlaDB1ZjlmNXE%3D; acPasstoken=ChVpbmZyYS5hY2Z1bi5wYXNzdG9rZW4ScJrFeEdlHcrvoHjYpzy_V7pAPxxMhNmo45RlMccpB84XwmIx9rJocLwXSPnJu4btgtqVGa04P9AIMBNdQknDd4QRTbjBp5aoQgis-Q88BjMvqVTGHAjG04W7zjswa0ZC5k5sdJCeTsLJKEiEsE8EY90aEhwsbiM70HUviQANoYC6Iptv6yIg0X6u8ikzzwuDe1VMKWNNYXWwFR81YKYQNq9P4gsk5oMoBTAB; auth_key=572984; ac_username=Nicksxs; acPostHint=1cc641584039a19bc0941d00e8eff73bd4b0; ac_userimg=https%3A%2F%2Fimgs.aixifan.com%2Fstyle%2Fimage%2F201907%2FuQ5Vc06d3HSVTjY3VZocT81X40FByVpw.jpg; clientlanguage=zh_CN; safety_id=AAG%2B9AbVZS6fTHVxwLtsI9Jl; notice_status=1; online_status=0; userGroupLevel=1; checkMobile=1; checkEmail=1; cur_req_id=1296724223CA632E_self_0fb782b0474cbe335574779cf53ed145; cur_group_id=1296724223CA632E_self_0fb782b0474cbe335574779cf53ed145_0; Hm_lpvt_2af69bc2b378fb58ae04ed2a04257ed1=1592976174", - // "Content-Type: text/plain" - ), - )); - - $response = curl_exec($curl); - - curl_close($curl); - echo $response; - } - - public function downloadVideo() - { - $innerDir = "/Volumes/Crucial X6/Video/acfun"; - $list = AcfunVideo::orderBy('updated_at', 'desc')->get(); - $files = scandir($innerDir); - - // dump($files); - foreach ($list as $item) { - if ($item["is_downloaded"] == 1) { - continue; - } - if (in_array($item['title'] . " (" . $item["from_up_name"] . ").mp4", $files)) { - Log::info("file " . $item["title"] . ".mp4" . " exists continue"); - continue; - } - Log::info($item['title'] . " (" . $item["from_up_name"] . ").mp4" . " does not exists to download"); - // exit; - $downloadResult = shell_exec('cd "' . $innerDir . '" && you-get https://www.acfun.cn/v/ac' . $item["content_id"]); - Log::info($downloadResult); - $item["is_downloaded"] = 1; - $item->save(); - } - } - - public function queryUpUsersVideos($upId, $upName) - { - $upUrl = $this->upBaseUrl . $upId; - $mainQl = QueryList::getInstance(); - $pCursor = ""; - $queried = 0; - $reqId = 1; - do { - $result = $this->requestUpPageApi($upId, $reqId, $pCursor); - // dump($result); - if (!$result) { - return; - } - $resourceIds = $mainQl->setHtml($result["html"])->find(".video-item")->attrs("resource-id"); - $titles = $mainQl->setHtml($result["html"])->find(".video-name")->htmls(); - dump($resourceIds); - foreach ($resourceIds as $key => $resourceId) { - AcfunVideo::firstOrCreate( - ["content_id" => $resourceId], - [ - "title" => $titles[$key], - "from_type" => 2, - "from_collection_name" => "", - "from_up_name" => "$upName", - "from_up_user_id" => $upId - ] - ); - } - $queried += $result["pageSize"]; - Log::info("current queried: " . $queried); - if (array_key_exists("noMore", $result) || $queried > (int)$result["totalCount"]) { - break; - } - if (array_key_exists("pcursor", $result)) { - $pCursor = $result["pcursor"]; - $reqId ++; - } else { - break; - } - } while (true); - } - - public function requestUpPage($upId) - { - $curl = curl_init(); - - curl_setopt_array($curl, array( - CURLOPT_URL => "https://m.acfun.cn/upPage/$upId?", - CURLOPT_RETURNTRANSFER => true, - CURLOPT_ENCODING => '', - CURLOPT_MAXREDIRS => 10, - CURLOPT_TIMEOUT => 0, - CURLOPT_FOLLOWLOCATION => true, - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, - CURLOPT_CUSTOMREQUEST => 'GET', - CURLOPT_HTTPHEADER => array( - 'authority: m.acfun.cn', - 'pragma: no-cache', - 'cache-control: no-cache', - 'upgrade-insecure-requests: 1', - 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', - 'sec-fetch-site: none', - 'sec-fetch-mode: navigate', - 'sec-fetch-user: ?1', - 'sec-fetch-dest: document', - 'accept-language: zh-CN,zh;q=0.9', - 'cookie: _did=web_492135297EB70FE5; acPasstoken=ChVpbmZyYS5hY2Z1bi5wYXNzdG9rZW4ScMqMOf7IIDgLFifcwDByiCz1Wv6zcyhwUzxFnkKxtITs0jGXUUuLWqDsl-7NGWvWwo5AcSoY2-Kjd3CZOXY7PNERtpJIdfyEJ4AFL7nlbdkjI_V_uUanyorcfQ7kaiWNig2_E6FVh7O8nRoGss5vf9saErqF0TDd7uDbNNp-mP7P0DOW_CIg24xq_0sWM6gTjuCWKKX9x7Yg_OpB1KtIk17LYCXdAPwoBTAB; auth_key=572984; ac_username=Nicksxs; acPostHint=b9f4cda120751d7200fa5158fa16dcbcaf88; ac_userimg=https%3A%2F%2Fimgs.aixifan.com%2Fstyle%2Fimage%2F201907%2FuQ5Vc06d3HSVTjY3VZocT81X40FByVpw.jpg; safety_id=AAJRRbRCoai0XjYzLsf70ktB; EGG_SESS=LeuVrD7spUl4PQfNroW9BEVd1JGguP_VHNuClb-BCn-E0TK-gvszCD8JicS8W_cFD8r34_e30N8vQt95J-5Pn7CoX6NDxA_Sm_p3S-E8GaWKY5L1qIfhe_n0viZOlC1RZN9e9wm6bVjMwJc04acrWA==; Hm_lvt_c68e829637dac3d1ad7a134d18b6064f=1641224120; webp_supported=%7B%22lossy%22%3Atrue%2C%22lossless%22%3Atrue%2C%22alpha%22%3Atrue%2C%22animation%22%3Atrue%7D; Hm_lvt_2af69bc2b378fb58ae04ed2a04257ed1=1641223365,1641261026; Hm_lpvt_2af69bc2b378fb58ae04ed2a04257ed1=1641261026; _did=web_492135297EB70FE5' - ), - )); - - $response = curl_exec($curl); - - curl_close($curl); - return $response; - } - - public function requestUpPageApi($upId, $reqId, $pcursor = "") - { - if ($upId == null) { - return ""; - } - $t = time() * 1000; - $url = "https://m.acfun.cn/upPage/$upId?pagelets=video-list&reqID=$reqId&ajaxpipe=1&userId=$upId&type=3&pcursor=$pcursor&t=$t"; +class AcfunService { + + private $CollectionUrl = "https://www.acfun.cn/rest/pc-direct/favorite/dougaList"; + + private $upBaseUrl = "https://m.acfun.cn/upPage/"; + + public function queryCollectionVideos() { + for ($i = 1; $i < 100; $i++) { + sleep(5); + $param = "folderId=62086507&perpage=100&page=" . $i; + $result = $this->request($this->CollectionUrl, $param); + dump($result); + $parsedResult = json_decode($result, true); + if (count(Arr::get($parsedResult, "favoriteList", [])) > 0) { + foreach ($parsedResult["favoriteList"] as $item) { + AcfunVideo::firstOrCreate( + ["content_id" => $item["contentId"]], + [ + "title" => $item["contentTitle"], + "from_type" => 1, + "from_collection_name" => "默认", + "from_up_name" => $item["userName"], + "from_up_user_id" => $item["userId"], + ] + ); + } + } else { + break; + } + } + } + + public function request($url, $param) { + $curl = curl_init(); + + curl_setopt_array($curl, array( + CURLOPT_URL => $url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POSTFIELDS => $param, + CURLOPT_HTTPHEADER => array( + 'authority: www.acfun.cn', + 'accept: application/json, text/plain, */*', + 'accept-language: zh-CN,zh;q=0.9', + 'cache-control: no-cache', + 'content-type: application/x-www-form-urlencoded', + 'cookie: csrfToken=Y66_80DyOUzh3300_JppG-lj; _did=web_27335482609AC197; cur_req_id=602812808A57D014_self_2d45c537a4f93b4689463857c3114dd1; cur_group_id=602812808A57D014_self_2d45c537a4f93b4689463857c3114dd1_0; webp_supported=%7B%22lossy%22%3Atrue%2C%22lossless%22%3Atrue%2C%22alpha%22%3Atrue%2C%22animation%22%3Atrue%7D; Hm_lvt_2af69bc2b378fb58ae04ed2a04257ed1=1690949379; lsv_js_player_v2_main=e4d400; stochastic=dnU5a2sxM3I2YWM%3D; acPasstoken=ChVpbmZyYS5hY2Z1bi5wYXNzdG9rZW4ScJE3kMWPZFp8HUJuLyT60kKBKFKCtLbYyK8VmCkHqWfZ4HLiGoLg9Rv4F5ezMd-7rnq8oZ088XIoXeHI5HnUaxrN_0Pbs7WVWDqs-3DpYE07TcS82E_kPgwgTFAwt9jh7xc91o_Q-_v3tSAEUthCwuwaEtg7AkwMUtojw7sGpJwKYwEO5CIgK5Hn30lT3kxo9l7lM_fTFK8dfqhTI0f3HEIrFvgs8bMoBTAB; auth_key=572984; ac_username=Nicksxs; acPostHint=8fb77d89b7c29b47c62cfbc6d82c23d82f7b; ac_userimg=https%3A%2F%2Fimgs.aixifan.com%2Fstyle%2Fimage%2F201907%2FuQ5Vc06d3HSVTjY3VZocT81X40FByVpw.jpg; Hm_lpvt_2af69bc2b378fb58ae04ed2a04257ed1=1690949398', + 'origin: https://www.acfun.cn', + 'pragma: no-cache', + 'referer: https://www.acfun.cn/member/favourite', + 'sec-ch-ua: "Not/A)Brand";v="99", "Google Chrome";v="115", "Chromium";v="115"', + 'sec-ch-ua-mobile: ?0', + 'sec-ch-ua-platform: "macOS"', + 'sec-fetch-dest: empty', + 'sec-fetch-mode: cors', + 'sec-fetch-site: same-origin', + 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36', + ), + )); + + $response = curl_exec($curl); + + curl_close($curl); + return $response; + } + + public function onlyRequest() { + + $curl = curl_init(); + + curl_setopt_array($curl, array( + CURLOPT_URL => "https://www.acfun.cn/rest/pc-direct/favorite/dougaList", + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => "", + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => "POST", + CURLOPT_POSTFIELDS => "perpage=100&page=1", + CURLOPT_HTTPHEADER => array( + "authority: www.acfun.cn", + "pragma: no-cache", + "cache-control: no-cache", + "accept: */*", + "x-requested-with: XMLHttpRequest", + "user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36", + "content-type: application/x-www-form-urlencoded; charset=UTF-8", + "origin: https://www.acfun.cn", + "sec-fetch-site: same-origin", + "sec-fetch-mode: cors", + "sec-fetch-dest: empty", + "referer: https://www.acfun.cn/member/", + "accept-language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6,ja;q=0.5", + "cookie: _did=web_32586178239268B; sign_remind=1; ac__avi=1010934062045114530882ab2cd25b90ef370ea22b151084981cf6c2c6febafe3a364146315ef65213; uuid=d7fdb48c886459236faa794ffafbfbb0; analytics=GA1.2.626694313.1592365512; lsv_js_player_v2_main=62b719; csrfToken=TnNz3lG1IfA-93kw4M-Px06m; session_id=63965769975BFD30; webp_supported=%7B%22lossy%22%3Atrue%2C%22lossless%22%3Atrue%2C%22alpha%22%3Atrue%2C%22animation%22%3Atrue%7D; Hm_lvt_2af69bc2b378fb58ae04ed2a04257ed1=1592481541,1592489023,1592797550,1592976124; lsv_js_player_v1_main=f2c6e6; stochastic=NWFlaDB1ZjlmNXE%3D; acPasstoken=ChVpbmZyYS5hY2Z1bi5wYXNzdG9rZW4ScJrFeEdlHcrvoHjYpzy_V7pAPxxMhNmo45RlMccpB84XwmIx9rJocLwXSPnJu4btgtqVGa04P9AIMBNdQknDd4QRTbjBp5aoQgis-Q88BjMvqVTGHAjG04W7zjswa0ZC5k5sdJCeTsLJKEiEsE8EY90aEhwsbiM70HUviQANoYC6Iptv6yIg0X6u8ikzzwuDe1VMKWNNYXWwFR81YKYQNq9P4gsk5oMoBTAB; auth_key=572984; ac_username=Nicksxs; acPostHint=1cc641584039a19bc0941d00e8eff73bd4b0; ac_userimg=https%3A%2F%2Fimgs.aixifan.com%2Fstyle%2Fimage%2F201907%2FuQ5Vc06d3HSVTjY3VZocT81X40FByVpw.jpg; clientlanguage=zh_CN; safety_id=AAG%2B9AbVZS6fTHVxwLtsI9Jl; notice_status=1; online_status=0; userGroupLevel=1; checkMobile=1; checkEmail=1; cur_req_id=1296724223CA632E_self_0fb782b0474cbe335574779cf53ed145; cur_group_id=1296724223CA632E_self_0fb782b0474cbe335574779cf53ed145_0; Hm_lpvt_2af69bc2b378fb58ae04ed2a04257ed1=1592976174", + // "Content-Type: text/plain" + ), + )); + + $response = curl_exec($curl); + + curl_close($curl); + echo $response; + } + + public function downloadVideo() { + $innerDir = "/Volumes/T7/Video/acfun"; + $list = AcfunVideo::orderBy('updated_at', 'desc')->get(); + $files = scandir($innerDir); + + // dump($files); + foreach ($list as $item) { + if ($item["is_downloaded"] == 1) { + continue; + } + if (in_array($item['title'] . " (" . $item["from_up_name"] . ").mp4", $files)) { + Log::info("file " . $item["title"] . ".mp4" . " exists continue"); + continue; + } + Log::info($item['title'] . " (" . $item["from_up_name"] . ").mp4" . " does not exists to download"); + // exit; + $downloadResult = shell_exec('cd "' . $innerDir . '" && you-get https://www.acfun.cn/v/ac' . $item["content_id"]); + Log::info($downloadResult); + $item["is_downloaded"] = 1; + $item->save(); + } + } + + public function queryUpUsersVideos($upId, $upName) { + $upUrl = $this->upBaseUrl . $upId; + $mainQl = QueryList::getInstance(); + $pCursor = ""; + $queried = 0; + $reqId = 1; + do { + $result = $this->requestUpPageApi($upId, $reqId, $pCursor); + // dump($result); + if (!$result) { + return; + } + $resourceIds = $mainQl->setHtml($result["html"])->find(".video-item")->attrs("resource-id"); + $titles = $mainQl->setHtml($result["html"])->find(".video-name")->htmls(); + dump($resourceIds); + foreach ($resourceIds as $key => $resourceId) { + AcfunVideo::firstOrCreate( + ["content_id" => $resourceId], + [ + "title" => $titles[$key], + "from_type" => 2, + "from_collection_name" => "", + "from_up_name" => "$upName", + "from_up_user_id" => $upId, + ] + ); + } + $queried += $result["pageSize"]; + Log::info("current queried: " . $queried); + if (array_key_exists("noMore", $result) || $queried > (int) $result["totalCount"]) { + break; + } + if (array_key_exists("pcursor", $result)) { + $pCursor = $result["pcursor"]; + $reqId++; + } else { + break; + } + } while (true); + } + + public function requestUpPage($upId) { + $curl = curl_init(); + + curl_setopt_array($curl, array( + CURLOPT_URL => "https://m.acfun.cn/upPage/$upId?", + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'GET', + CURLOPT_HTTPHEADER => array( + 'authority: m.acfun.cn', + 'pragma: no-cache', + 'cache-control: no-cache', + 'upgrade-insecure-requests: 1', + 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'sec-fetch-site: none', + 'sec-fetch-mode: navigate', + 'sec-fetch-user: ?1', + 'sec-fetch-dest: document', + 'accept-language: zh-CN,zh;q=0.9', + 'cookie: _did=web_492135297EB70FE5; acPasstoken=ChVpbmZyYS5hY2Z1bi5wYXNzdG9rZW4ScMqMOf7IIDgLFifcwDByiCz1Wv6zcyhwUzxFnkKxtITs0jGXUUuLWqDsl-7NGWvWwo5AcSoY2-Kjd3CZOXY7PNERtpJIdfyEJ4AFL7nlbdkjI_V_uUanyorcfQ7kaiWNig2_E6FVh7O8nRoGss5vf9saErqF0TDd7uDbNNp-mP7P0DOW_CIg24xq_0sWM6gTjuCWKKX9x7Yg_OpB1KtIk17LYCXdAPwoBTAB; auth_key=572984; ac_username=Nicksxs; acPostHint=b9f4cda120751d7200fa5158fa16dcbcaf88; ac_userimg=https%3A%2F%2Fimgs.aixifan.com%2Fstyle%2Fimage%2F201907%2FuQ5Vc06d3HSVTjY3VZocT81X40FByVpw.jpg; safety_id=AAJRRbRCoai0XjYzLsf70ktB; EGG_SESS=LeuVrD7spUl4PQfNroW9BEVd1JGguP_VHNuClb-BCn-E0TK-gvszCD8JicS8W_cFD8r34_e30N8vQt95J-5Pn7CoX6NDxA_Sm_p3S-E8GaWKY5L1qIfhe_n0viZOlC1RZN9e9wm6bVjMwJc04acrWA==; Hm_lvt_c68e829637dac3d1ad7a134d18b6064f=1641224120; webp_supported=%7B%22lossy%22%3Atrue%2C%22lossless%22%3Atrue%2C%22alpha%22%3Atrue%2C%22animation%22%3Atrue%7D; Hm_lvt_2af69bc2b378fb58ae04ed2a04257ed1=1641223365,1641261026; Hm_lpvt_2af69bc2b378fb58ae04ed2a04257ed1=1641261026; _did=web_492135297EB70FE5', + ), + )); + + $response = curl_exec($curl); + + curl_close($curl); + return $response; + } + + public function requestUpPageApi($upId, $reqId, $pcursor = "") { + if ($upId == null) { + return ""; + } + $t = time() * 1000; + $url = "https://m.acfun.cn/upPage/$upId?pagelets=video-list&reqID=$reqId&ajaxpipe=1&userId=$upId&type=3&pcursor=$pcursor&t=$t"; // https://m.acfun.cn/upPage/1702633?pagelets=video-list&reqID=1&ajaxpipe=1&userId=1702633&type=3&pcursor=1677145407113&t=1680146711555 - if ($pcursor != null && $pcursor != "") { - $url .= "&pcursor=$pcursor"; - } - $url .= "&t=" . (int)(microtime(true) * 1000); - - - $curl = curl_init(); - - curl_setopt_array($curl, array( - CURLOPT_URL => $url, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_ENCODING => '', - CURLOPT_MAXREDIRS => 10, - CURLOPT_TIMEOUT => 0, - CURLOPT_FOLLOWLOCATION => true, - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, - CURLOPT_CUSTOMREQUEST => 'GET', - CURLOPT_HTTPHEADER => array( - 'authority: m.acfun.cn', - 'pragma: no-cache', - 'cache-control: no-cache', - 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', - 'x-requested-with: XMLHttpRequest', - 'accept: */*', - 'sec-fetch-site: same-origin', - 'sec-fetch-mode: cors', - 'sec-fetch-dest: empty', - 'referer: https://m.acfun.cn/upPage/4537972?', - 'accept-language: zh-CN,zh;q=0.9', - 'cookie: _did=web_280933889D060418; acPasstoken=ChVpbmZyYS5hY2Z1bi5wYXNzdG9rZW4ScIVlVCL6FSd7r7J8EESfIrvCZWZ44ZhcldtaiMZTVnka4I1hQQGJ-ywegVxy5bWPDafabEeWEH1IA3W44p_U3tOfyvt5ivCVDiZd-OlAWMOYtj3Og-s0rdEqcqMX_NTExa2jZ3M2N3z_uZHVHghIXPkaEsDLegiAw1sTxw7mkhbBiGkpPiIgMVkL4EVoF5UUt584m8hro8yjbem-qWBoGte7yFXO89AoBTAB; auth_key=572984; ac_username=Nicksxs; acPostHint=cd58860b125ee662a0d161cff68c37e2180f; ac_userimg=https://imgs.aixifan.com/style/image/201907/uQ5Vc06d3HSVTjY3VZocT81X40FByVpw.jpg; _did=web_280933889D060418; csrfToken=AgVgghhXcxJW5CTDNT7kiOWY; cur_req_id=7852848870815E4E_self_2d45c537a4f93b4689463857c3114dd1; cur_group_id=7852848870815E4E_self_2d45c537a4f93b4689463857c3114dd1_0; webp_supported={"lossy":true,"lossless":true,"alpha":true,"animation":true}; Hm_lvt_2af69bc2b378fb58ae04ed2a04257ed1=1665098925,1666089608,1667002226; Hm_lpvt_2af69bc2b378fb58ae04ed2a04257ed1=1667002226; lsv_js_player_v2_main=e4d400' - ), - )); - - $response = curl_exec($curl); - - curl_close($curl); + if ($pcursor != null && $pcursor != "") { + $url .= "&pcursor=$pcursor"; + } + $url .= "&t=" . (int) (microtime(true) * 1000); + + $curl = curl_init(); + + curl_setopt_array($curl, array( + CURLOPT_URL => $url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'GET', + CURLOPT_HTTPHEADER => array( + 'authority: m.acfun.cn', + 'pragma: no-cache', + 'cache-control: no-cache', + 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'x-requested-with: XMLHttpRequest', + 'accept: */*', + 'sec-fetch-site: same-origin', + 'sec-fetch-mode: cors', + 'sec-fetch-dest: empty', + 'referer: https://m.acfun.cn/upPage/4537972?', + 'accept-language: zh-CN,zh;q=0.9', + 'cookie: _did=web_280933889D060418; acPasstoken=ChVpbmZyYS5hY2Z1bi5wYXNzdG9rZW4ScIVlVCL6FSd7r7J8EESfIrvCZWZ44ZhcldtaiMZTVnka4I1hQQGJ-ywegVxy5bWPDafabEeWEH1IA3W44p_U3tOfyvt5ivCVDiZd-OlAWMOYtj3Og-s0rdEqcqMX_NTExa2jZ3M2N3z_uZHVHghIXPkaEsDLegiAw1sTxw7mkhbBiGkpPiIgMVkL4EVoF5UUt584m8hro8yjbem-qWBoGte7yFXO89AoBTAB; auth_key=572984; ac_username=Nicksxs; acPostHint=cd58860b125ee662a0d161cff68c37e2180f; ac_userimg=https://imgs.aixifan.com/style/image/201907/uQ5Vc06d3HSVTjY3VZocT81X40FByVpw.jpg; _did=web_280933889D060418; csrfToken=AgVgghhXcxJW5CTDNT7kiOWY; cur_req_id=7852848870815E4E_self_2d45c537a4f93b4689463857c3114dd1; cur_group_id=7852848870815E4E_self_2d45c537a4f93b4689463857c3114dd1_0; webp_supported={"lossy":true,"lossless":true,"alpha":true,"animation":true}; Hm_lvt_2af69bc2b378fb58ae04ed2a04257ed1=1665098925,1666089608,1667002226; Hm_lpvt_2af69bc2b378fb58ae04ed2a04257ed1=1667002226; lsv_js_player_v2_main=e4d400', + ), + )); + + $response = curl_exec($curl); + + curl_close($curl); // echo $response; - $replaced = str_replace("/**/", "", $response); - $result = json_decode($replaced, true); - if ($result == null || !array_key_exists("scripts", $result)) { - echo "=========================scripts not exist ===========================\n" . $url; - echo "=========================scripts not exist ===========================\n" . $response; - return false; - } - $scripts = $result["scripts"][0]; - preg_match_all("#no_more#", $scripts, $noMore); - if (count($noMore[0]) > 0) { - // dump($noMore); - $result["noMore"] = true; - } else { - preg_match_all("#\"pcursor\"\:\"(\d+)\"#", $scripts, $pcursors); - $parsed["pcursor"] = $pcursors[1][0]; - } - preg_match_all("#\"totalCount\"\:(\d+)#", $scripts, $totalCounts); - $parsed["totalCount"] = $totalCounts[1][0]; - preg_match_all("#\"videoFeedLength\"\:(\d+)#", $scripts, $pageSizes); - $parsed["pageSize"] = $pageSizes[1][0]; - $parsed["html"] = $result["html"]; - unset($result); - return $parsed; - } + $replaced = str_replace("/**/", "", $response); + $result = json_decode($replaced, true); + if ($result == null || !array_key_exists("scripts", $result)) { + echo "=========================scripts not exist ===========================\n" . $url; + echo "=========================scripts not exist ===========================\n" . $response; + return false; + } + $scripts = $result["scripts"][0]; + preg_match_all("#no_more#", $scripts, $noMore); + if (count($noMore[0]) > 0) { + // dump($noMore); + $result["noMore"] = true; + } else { + preg_match_all("#\"pcursor\"\:\"(\d+)\"#", $scripts, $pcursors); + $parsed["pcursor"] = $pcursors[1][0]; + } + preg_match_all("#\"totalCount\"\:(\d+)#", $scripts, $totalCounts); + $parsed["totalCount"] = $totalCounts[1][0]; + preg_match_all("#\"videoFeedLength\"\:(\d+)#", $scripts, $pageSizes); + $parsed["pageSize"] = $pageSizes[1][0]; + $parsed["html"] = $result["html"]; + unset($result); + return $parsed; + } } diff --git a/app/Services/BilibiliServiceV2.php b/app/Services/BilibiliServiceV2.php index e31c746..ddfc5b4 100644 --- a/app/Services/BilibiliServiceV2.php +++ b/app/Services/BilibiliServiceV2.php @@ -116,7 +116,7 @@ class BilibiliServiceV2 // 391073761 女团直拍 // 267781236 韩国女团饭拍直拍 // 23400436 小雪_juvia - $list = BilibiliUpVideos::where("id", "<", "150") + $list = BilibiliUpVideos::where("id", ">", "120") ->orderBy('id', 'desc') ->get(); // $list = $list->slice(87); @@ -128,7 +128,11 @@ class BilibiliServiceV2 $videos = []; $pageNo = 1; $url = "https://api.bilibili.com/x/space/wbi/arc/search?mid={$mediaId}&ps=30&tid=0&keyword=&pn="; - $pageAll = 2; + $pageAll = 30; +// if ($mediaId == 241804522 || $mediaId == 3461581333596856) { +// $pageAll = 10; +// } + // https://api.bilibili.com/x/space/wbi/arc/search? // mid=363430107& @@ -1208,7 +1212,7 @@ done && echo "ok"'); public function downloadDynamics() { $env = App::environment(); - $list = BilibiliUpVideos::orderBy("created_at", "desc")->where("id", "<", "94")->limit(100)->get(); + $list = BilibiliUpVideos::orderBy("created_at", "desc")->where("id", "<", "150")->limit(150)->get(); foreach ($list as $item) { $mid = $item["mid"]; $offset = null; @@ -1216,6 +1220,7 @@ done && echo "ok"'); do { $jsonResponse = $this->dynamicsRequest($mid, $offset); $response = json_decode($jsonResponse, true); + if (array_key_exists("code", $response) && $response["code"] == '0' && array_key_exists("data", $response) && array_key_exists("items", $response["data"])) { $dynamics = $response["data"]["items"]; foreach ($dynamics as $dynamic) { @@ -1229,7 +1234,7 @@ done && echo "ok"'); $imageItems = $dynamic["modules"]["module_dynamic"]["major"]["draw"]["items"]; foreach ($imageItems as $imageItem) { $imageUrl = $imageItem["src"]; - $this->downloadImage($imageUrl, "/Users/shixuesen/Downloads/y/bili", $item["up_name"]); + $this->downloadImage($imageUrl, "/Volumes/T7/Image/bili", $item["up_name"]); } } } @@ -1254,16 +1259,17 @@ done && echo "ok"'); 'accept' => 'application/json, text/plain, */*', 'accept-language' => 'zh-CN,zh;q=0.9', 'cache-control' => 'no-cache', + 'cookie' => 'buvid3=8963244C-4BC6-9693-0A3B-45D6709DC83691106infoc; b_nut=1663645291; i-wanna-go-back=-1; _uuid=10A28E28A-7DC8-9249-C1015-13D348A1310B891658infoc; buvid_fp_plain=undefined; b_ut=5; nostalgia_conf=-1; buvid4=3C7DCDE5-F2A0-B24B-E954-DAE3C098178292224-022092011-dJ30JF9%2BylJHjvuYaT%2Fztg%3D%3D; hit-dyn-v2=1; is-2022-channel=1; CURRENT_BLACKGAP=0; CURRENT_FNVAL=4048; rpdid=|(ku|l|ulJYY0J\'uYY)lmRJ~R; LIVE_BUVID=AUTO2416707593514161; header_theme_version=CLOSE; CURRENT_PID=49d1a300-cd1b-11ed-a6a4-9505c4aecd98; FEED_LIVE_VERSION=V8; hit-new-style-dyn=1; home_feed_column=5; CURRENT_QUALITY=0; sid=8nu0kwjf; fingerprint=397938acbaac7e86d8d41af11f795022; buvid_fp=397938acbaac7e86d8d41af11f795022; PVID=3; b_lsid=10CF337CE_188A0BCCC6E; innersign=0; browser_resolution=1512-865; bp_video_offset_279025=805245001773613200', 'origin' => 'https://space.bilibili.com', 'pragma' => 'no-cache', - 'referer' => "https://space.bilibili.com/$mid/dynamic", - 'sec-ch-ua' => '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"', + 'referer' => 'https://space.bilibili.com/16720403/dynamic', + 'sec-ch-ua' => '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"', 'sec-ch-ua-mobile' => '?0', 'sec-ch-ua-platform' => '"macOS"', 'sec-fetch-dest' => 'empty', 'sec-fetch-mode' => 'cors', 'sec-fetch-site' => 'same-site', - 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36' + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' ]; if ($offset != null) { $url = "https://api.bilibili.com/x/polymer/web-dynamic/v1/feed/space?offset={$offset}&host_mid={$mid}&timezone_offset=-480&features=itemOpusStyle"; diff --git a/app/Services/FfmpegService.php b/app/Services/FfmpegService.php index 46c8d3d..e0df5a9 100644 --- a/app/Services/FfmpegService.php +++ b/app/Services/FfmpegService.php @@ -1,392 +1,394 @@ mediainfo = new MediaInfo(); - $this->mediainfo->setConfig('use_oldxml_mediainfo_output_format', true); - - $config = array( - 'ffmpeg.binarie' => '/Users/shixuesen/Downloads/ffmpeg', - 'ffprobe.binaries' => '/opt/homebrew/bin/ffprobe', - 'timeout' => 3600, - 'ffmpeg.threads' => 16, - ); - $this->ffprobe = FFProbe::create($config); - - } - - public function handleVideos($dir = "/Users/shixuesen/Documents/tmp/柚木/2017/泡泡条纹袜/") - { - $files = scandir($dir); - foreach ($files as $file) { - if ($file == "." || $file == "..") { - continue; - } - $subDir = implode("/", [$dir, $file]); - $isDir = is_dir($subDir); - if ($isDir) { - $subFiles = scandir($subDir); - foreach ($subFiles as $subFile) { - $subPathFile = implode("/", [$subDir, $subFile]); - if (is_dir($subPathFile) || $subFile == ".DS_Store") { - continue; - } - $mime = mime_content_type($subPathFile); +class FfmpegService { + + private $mediainfo; + + private $ffprobe; + + private $needRemoveAfterEncode = false; + + private $needRemoveExistFiles = false; + + private $preset = ""; + + const DEFAULT_EXTENSION = "mp4"; + + public function __construct() { + $this->mediainfo = new MediaInfo(); + $this->mediainfo->setConfig('use_oldxml_mediainfo_output_format', true); + + $config = array( + 'ffmpeg.binarie' => '/Users/shixuesen/Downloads/ffmpeg', + 'ffprobe.binaries' => '/opt/homebrew/bin/ffprobe', + 'timeout' => 3600, + 'ffmpeg.threads' => 16, + ); + $this->ffprobe = FFProbe::create($config); + + } + + /** + * @return string + */ + public function getPreset(): string { + return $this->preset; + } + + /** + * @param string $preset + */ + public function setPreset(string $preset): void { + $this->preset = $preset; + } + + public function handleVideos($dir = "/Users/shixuesen/Documents/tmp/柚木/2017/泡泡条纹袜/") { + $files = scandir($dir); + foreach ($files as $file) { + if ($file == "." || $file == "..") { + continue; + } + $subDir = implode("/", [$dir, $file]); + $isDir = is_dir($subDir); + if ($isDir) { + $subFiles = scandir($subDir); + foreach ($subFiles as $subFile) { + $subPathFile = implode("/", [$subDir, $subFile]); + if (is_dir($subPathFile) || $subFile == ".DS_Store") { + continue; + } + $mime = mime_content_type($subPathFile); // dump("file type", [$mime, $subPathFile]); -// continue; - if (strstr($mime, "video/")) { - if (is_file($subPathFile)) { - $fileInfo = pathinfo($subPathFile); - dump("fileInfo", $fileInfo); - if (ends_with($fileInfo["filename"], "-1")) { - continue; - } - if (is_file($fileInfo["dirname"] . '/' .$fileInfo["filename"] . '-1'. '.' . $fileInfo["extension"])) { - unlink($subPathFile); - continue; - } - $targetFile = $fileInfo["dirname"] . '/' .$fileInfo["filename"] . '-1'. '.' . $fileInfo["extension"]; - dump("targetFile", [$targetFile]); + // continue; + if (strstr($mime, "video/")) { + if (is_file($subPathFile)) { + $fileInfo = pathinfo($subPathFile); + dump("fileInfo", $fileInfo); + if (ends_with($fileInfo["filename"], "-1")) { + continue; + } + if (is_file($fileInfo["dirname"] . '/' . $fileInfo["filename"] . '-1' . '.' . $fileInfo["extension"])) { + unlink($subPathFile); + continue; + } + $targetFile = $fileInfo["dirname"] . '/' . $fileInfo["filename"] . '-1' . '.' . $fileInfo["extension"]; + dump("targetFile", [$targetFile]); // $result = shell_exec("handBrakeCli -Z 'Very Fast 720p30' -i '". $subPathFile ."' -o '". $targetFile . " && echo 'success'"); - $result = shell_exec("handBrakeCli -Z 'Very Fast 720p30' -i '". $subPathFile ."' -o '". $targetFile . "'"); - dump($result); + $result = shell_exec("handBrakeCli -Z 'Very Fast 720p30' -i '" . $subPathFile . "' -o '" . $targetFile . "'"); + dump($result); - } - } - } - } - } - print_r($files); - } + } + } + } + } + } + print_r($files); + } // public function processDir($baseDir = "/Volumes/WD/Video/HuaVid/") - public function processDir($baseDir = "/Volumes/Backup/HuaVid/大忽悠") - { - $files = scandir($baseDir); - foreach ($files as $file) { - if ($file == "." || $file == ".." || $file == ".DS_Store" || $file == "1762") { - continue; - } - $subDir = implode("/", [$baseDir, $file]); - $isDir = is_dir($subDir); - if ($isDir) { - $this->processDir($subDir); - } else { - $this->processVideo($subDir); - } - } - } - - public function processDirWithQueue($baseDir = "/Volumes/Backup/HuaVid/大忽悠", $queue) - { - $files = scandir($baseDir); - foreach ($files as $file) { - if ($file == "." || $file == ".." || $file == ".DS_Store" || $file == "1762") { - continue; - } - $subDir = implode("/", [$baseDir, $file]); - $isDir = is_dir($subDir); - if ($isDir) { - $this->processDir($subDir); - } else { - $item = Redis::connection()->rpop($queue); - while ($item != null) { - $this->processVideo($item); - echo $item . "\n"; - $item = Redis::connection()->rpop($queue); - } - $this->processVideo($subDir); - } - } - } - - public function processVideo($pathFile) - { - $slowFlag = false; - if (date("H") >= 6 && date("i") > 30 && date("H") < 9) { - Log::info("H > 6 stopFlag is set"); - dump("H > 6 stopFlag is set"); - exit; - } + public function processDir($baseDir = "/Volumes/Backup/HuaVid/大忽悠") { + $files = scandir($baseDir); + foreach ($files as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store" || $file == "1762" || str_contains($file, "flv") || starts_with($file, ".")) { + continue; + } + $subDir = implode("/", [$baseDir, $file]); + $isDir = is_dir($subDir); + if ($isDir) { + $this->processDir($subDir); + } else { + $this->processVideo($subDir); + } + } + } + + public function processDirWithQueue($baseDir = "/Volumes/Backup/HuaVid/大忽悠", $queue) { + $files = scandir($baseDir); + foreach ($files as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store" || $file == "1762" || str_contains($file, "flv")) { + continue; + } + $subDir = implode("/", [$baseDir, $file]); + $isDir = is_dir($subDir); + if ($isDir) { + $this->processDir($subDir); + } else { + $item = Redis::connection()->rpop($queue); + while ($item != null) { + $this->processVideo($item); + echo $item . "\n"; + $item = Redis::connection()->rpop($queue); + } + $this->processVideo($subDir); + } + } + } + + public function processVideo($pathFile) { + $slowFlag = false; + if (date("H") >= 5 && date("i") > 30 && date("H") < 9) { + Log::info("H > 6 stopFlag is set"); + dump("H > 6 stopFlag is set"); + exit; + } // while () { -// Log::info("now is " . date("Y-m-d H:i:s") . " sleep 5 minutes"); -// sleep(5 * 60); -// } - Log::info("current process pathFile " . $pathFile); - try { - $mime = mime_content_type($pathFile); - } catch (Throwable $e) { - Log::error("mime_content_type has exception " . $e->getMessage()); - } - $mediaInfo = new MediaInfo(); - $mediaInfo->setConfig('use_oldxml_mediainfo_output_format', true); - if (strstr($mime, "video/") || strstr($mime, "application/octet-stream")) { - if (is_file($pathFile)) { - if (Redis::get("stopFlag") != null) { - Log::info("stopFlag is set"); - dump("stopFlag is set"); - exit; - } - $fileInfo = pathinfo($pathFile); - if (Redis::get("encode:lock:" . $fileInfo["filename"]) == 1) { - Log::info("file is encoding filename: " . $fileInfo["filename"]); - return; - } - if (!Redis::set("encode:lock:" . $fileInfo["filename"] , 1, "nx", "ex", 36000)) { - Log::info("lock failed filename: " . $fileInfo["filename"]); - return; - } - if (Redis::sismember("unneed", $fileInfo["filename"])) { - Log::info("in uneed: " . $fileInfo["filename"]); - return; - } - if (Redis::sismember("sizeSmall", $fileInfo["filename"]) || !$this->checkFileSize($pathFile)) { - Redis::sadd("sizeSmall", $fileInfo["filename"]); - Log::info("filesize: " . $fileInfo["filename"]); - return; - } - if (Redis::sismember("hasEncode", $fileInfo["filename"]) || $this->checkFileEncodeType($pathFile)) { - Redis::sadd("hasEncode", $fileInfo["filename"]); - Log::info("$pathFile has already encode by h265 return"); - return; - } - if (filemtime($pathFile) > strtotime("2021-07-26 00:00:00")) { - $mtime = date("Y-m-d H:i:s", filemtime($pathFile)); - // dump("$pathFile modify at $mtime is after 2021-07-26 00:00:00 skip"); -// return; - } else { - $mtime = date("Y-m-d H:i:s", filemtime($pathFile)); - // dump("$pathFile modify at $mtime is before 2021-07-19 00:00:00"); - } - if (ends_with($fileInfo["filename"], "-x265")) { - return; - } - $targetFile = $fileInfo["dirname"] . DIRECTORY_SEPARATOR .$fileInfo["filename"] . '-x265'. '.' . self::DEFAULT_EXTENSION; - if (is_file($targetFile) && $this->isNeedRemoveExistFiles()) { - Log::info("$targetFile is exists"); - unlink($pathFile); - rename($targetFile, $pathFile); - return; - } - dump("targetFile", [$targetFile]); - Log::info("process target file : $targetFile"); - if ($this->getDimension($pathFile)->getWidth() > 3840) { + // Log::info("now is " . date("Y-m-d H:i:s") . " sleep 5 minutes"); + // sleep(5 * 60); + // } + Log::info("current process pathFile " . $pathFile); + try { + $mime = mime_content_type($pathFile); + } catch (Throwable $e) { + Log::error("mime_content_type has exception " . $e->getMessage()); + } + $mediaInfo = new MediaInfo(); + $mediaInfo->setConfig('use_oldxml_mediainfo_output_format', true); + if (strstr($mime, "video/") || strstr($mime, "application/octet-stream")) { + if (is_file($pathFile)) { + if (Redis::get("stopFlag") != null) { + Log::info("stopFlag is set"); + dump("stopFlag is set"); + exit; + } + $fileInfo = pathinfo($pathFile); + if (Redis::get("encode:lock:" . $fileInfo["filename"]) == 1) { + Log::info("file is encoding filename: " . $fileInfo["filename"]); + return; + } + if (!Redis::set("encode:lock:" . $fileInfo["filename"], 1, "nx", "ex", 36000)) { + Log::info("lock failed filename: " . $fileInfo["filename"]); + return; + } + if (Redis::sismember("unneed", $fileInfo["filename"])) { + Log::info("in uneed: " . $fileInfo["filename"]); + return; + } + if (Redis::sismember("sizeSmall", $fileInfo["filename"]) || !$this->checkFileSize($pathFile)) { + Redis::sadd("sizeSmall", $fileInfo["filename"]); + Log::info("filesize: " . $fileInfo["filename"]); + return; + } + if (Redis::sismember("hasEncode", $fileInfo["filename"]) || $this->checkFileEncodeType($pathFile)) { + Redis::sadd("hasEncode", $fileInfo["filename"]); + Log::info("$pathFile has already encode by h265 return"); + return; + } + if (filemtime($pathFile) > strtotime("2021-07-26 00:00:00")) { + $mtime = date("Y-m-d H:i:s", filemtime($pathFile)); + // dump("$pathFile modify at $mtime is after 2021-07-26 00:00:00 skip"); + // return; + } else { + $mtime = date("Y-m-d H:i:s", filemtime($pathFile)); + // dump("$pathFile modify at $mtime is before 2021-07-19 00:00:00"); + } + if (ends_with($fileInfo["filename"], "-x265")) { + return; + } + $targetFile = $fileInfo["dirname"] . DIRECTORY_SEPARATOR . $fileInfo["filename"] . '-x265' . '.' . self::DEFAULT_EXTENSION; + if (is_file($targetFile) && $this->isNeedRemoveExistFiles()) { + Log::info("$targetFile is exists"); + unlink($pathFile); + rename($targetFile, $pathFile); + return; + } + dump("targetFile", [$targetFile]); + Log::info("process target file : $targetFile"); + $preset = ""; + if ($this->getPreset() != null && $this->getPreset() != "") { + $preset = " -preset " . $this->getPreset(); + } else { + $preset = " -preset ultrafast"; + } + if ($this->getDimension($pathFile)->getWidth() > 3840) { // $result = shell_exec("/Users/shixuesen/Downloads/ffmpeg -threads 16 -i ". escapeshellarg($pathFile) ." -preset ultrafast -crf 25 -c:v libx265 -x265-params pools=8 -vtag hvc1 " . escapeshellarg($targetFile) . " && echo 'ok'"); - $result = shell_exec("/Users/shixuesen/Downloads/ffmpeg -i ". escapeshellarg($pathFile) ." -c:v libx265 -x265-params pools=8 -vtag hvc1 -vf \"scale=4096:-1\" " . escapeshellarg($targetFile) . " && echo 'ok'"); - } else { - if ($slowFlag) { - $result = shell_exec("/Users/shixuesen/Downloads/ffmpeg -threads 2 -i ". escapeshellarg($pathFile) ." -c:v libx265 -x265-params pools=14 -vtag hvc1 " . escapeshellarg($targetFile) . " && echo 'ok'"); - } else { - $result = shell_exec("/Users/shixuesen/Downloads/ffmpeg -threads 2 -i ". escapeshellarg($pathFile) ." -c:v libx265 -x265-params pools=14 -vtag hvc1 " . escapeshellarg($targetFile) . " && echo 'ok'"); - } - } - // echo $result; - // return; - if (trim($result) == "ok" && $this->isNeedRemoveAfterEncode()) { - echo "compress work done remove the file \n"; - Log::info("compress work done remove the file"); - $oldFileSize = filesize($pathFile); - $newFileSize = filesize($targetFile); - if ($newFileSize >= $oldFileSize) { - Redis::sadd("unneed", $fileInfo["filename"]); - echo "old file size is smaller than new one, old is " . file_size($oldFileSize) . " and new is " . file_size($newFileSize) . ", now remove new one"; - Log::info("old file size is smaller than new one, old is " . file_size($oldFileSize) . " and new is " . file_size($newFileSize) . ", now remove new one"); - unlink($targetFile); - } else { - Redis::sadd("unneed", $fileInfo["filename"]); - echo "new file size is smaller than old one, new is " . file_size($newFileSize) . " and old is " . file_size($oldFileSize) . ", now remove old one"; - Log::info("new file size is smaller than old one, new is " . file_size($newFileSize) . " and old is " . file_size($oldFileSize) . ", now remove old one"); - unlink($pathFile); - rename($targetFile, $pathFile); - } - } - Redis::del("encode:lock:" . $fileInfo["filename"]); - } - } - } - - public function processUnCompleteDir($baseDir = "/Volumes/WD/tmp/探花系列【AI高清2K修复】大合集") + $result = shell_exec("/Users/shixuesen/Downloads/software/ffmpeg -i " . escapeshellarg($pathFile) . " {$preset} -c:v libx265 -x265-params pools=8 -vtag hvc1 -vf \"scale=4096:-1\" " . escapeshellarg($targetFile) . " && echo 'ok'"); + } else { + if ($slowFlag) { + $result = shell_exec("/Users/shixuesen/Downloads/software/ffmpeg -i " . escapeshellarg($pathFile) . " {$preset} -c:v libx265 -x265-params pools=8 -vtag hvc1 " . escapeshellarg($targetFile) . " && echo 'ok'"); + } else { + $result = shell_exec("/Users/shixuesen/Downloads/software/ffmpeg -i " . escapeshellarg($pathFile) . " {$preset} -c:v libx265 -x265-params pools=8 -vtag hvc1 " . escapeshellarg($targetFile) . " && echo 'ok'"); + } + } + // echo $result; + // return; + if (trim($result) == "ok" && $this->isNeedRemoveAfterEncode()) { + echo "compress work done remove the file \n"; + Log::info("compress work done remove the file"); + $oldFileSize = filesize($pathFile); + $newFileSize = filesize($targetFile); + if ($newFileSize >= $oldFileSize) { + Redis::sadd("unneed", $fileInfo["filename"]); + echo "old file size is smaller than new one, old is " . file_size($oldFileSize) . " and new is " . file_size($newFileSize) . ", now remove new one"; + Log::info("old file size is smaller than new one, old is " . file_size($oldFileSize) . " and new is " . file_size($newFileSize) . ", now remove new one"); + unlink($targetFile); + } else { + Redis::sadd("unneed", $fileInfo["filename"]); + echo "new file size is smaller than old one, new is " . file_size($newFileSize) . " and old is " . file_size($oldFileSize) . ", now remove old one"; + Log::info("new file size is smaller than old one, new is " . file_size($newFileSize) . " and old is " . file_size($oldFileSize) . ", now remove old one"); + unlink($pathFile); + rename($targetFile, $pathFile); + } + } + Redis::del("encode:lock:" . $fileInfo["filename"]); + } + } + } + + public function processUnCompleteDir($baseDir = "/Volumes/WD/tmp/探花系列【AI高清2K修复】大合集") // public function processDir($baseDir = "/Volumes/Backup/iPhone nPlayer/") - { - $files = scandir($baseDir); - foreach ($files as $file) { - if ($file == "." || $file == "..") { - continue; - } - $subDir = implode("/", [$baseDir, $file]); - $isDir = is_dir($subDir); - if ($isDir) { - $this->processUnCompleteDir($subDir); - } else { - $this->processUnCompleteVideo($subDir); - } - } - } - - public function processUnCompleteVideo($pathFile) - { - //... - $mediaInfo = new MediaInfo(); - $mediaInfo->setConfig('use_oldxml_mediainfo_output_format', true); - - $mime = mime_content_type($pathFile); + { + $files = scandir($baseDir); + foreach ($files as $file) { + if ($file == "." || $file == "..") { + continue; + } + $subDir = implode("/", [$baseDir, $file]); + $isDir = is_dir($subDir); + if ($isDir) { + $this->processUnCompleteDir($subDir); + } else { + $this->processUnCompleteVideo($subDir); + } + } + } + + public function processUnCompleteVideo($pathFile) { + //... + $mediaInfo = new MediaInfo(); + $mediaInfo->setConfig('use_oldxml_mediainfo_output_format', true); + + $mime = mime_content_type($pathFile); // dump("file type", [$mime, $subPathFile]); -// continue; - if (strstr($mime, "video/")) { - if (is_file($pathFile)) { - $fileInfo = pathinfo($pathFile); + // continue; + if (strstr($mime, "video/")) { + if (is_file($pathFile)) { + $fileInfo = pathinfo($pathFile); // dump("fileInfo", $fileInfo); - if (ends_with($fileInfo["filename"], "-1")) { - return; - } - if (is_file($fileInfo["dirname"] . '/' .$fileInfo["filename"] . '-1'. '.' . $fileInfo["extension"])) { - $mediaInfoContainer1 = $mediaInfo->getInfo($fileInfo["dirname"] . '/' .$fileInfo["filename"] . '-1'. '.' . $fileInfo["extension"]); - $millSecond1 = $mediaInfoContainer1->getGeneral()->get("duration")->getMilliseconds(); - echo gettype($millSecond1) . "\n"; + if (ends_with($fileInfo["filename"], "-1")) { + return; + } + if (is_file($fileInfo["dirname"] . '/' . $fileInfo["filename"] . '-1' . '.' . $fileInfo["extension"])) { + $mediaInfoContainer1 = $mediaInfo->getInfo($fileInfo["dirname"] . '/' . $fileInfo["filename"] . '-1' . '.' . $fileInfo["extension"]); + $millSecond1 = $mediaInfoContainer1->getGeneral()->get("duration")->getMilliseconds(); + echo gettype($millSecond1) . "\n"; // ["duration"] . "\n"; - $mediaInfoContainer = $mediaInfo->getInfo($pathFile); - $millSecond = $mediaInfoContainer->getGeneral()->get("duration")->getMilliseconds(); - echo gettype($millSecond) . "\n"; - if (abs(intval($millSecond) - intval($millSecond1)) > 100) { - echo $pathFile . "\n"; - echo abs(intval($millSecond) - intval($millSecond1)) . "\n"; - } + $mediaInfoContainer = $mediaInfo->getInfo($pathFile); + $millSecond = $mediaInfoContainer->getGeneral()->get("duration")->getMilliseconds(); + echo gettype($millSecond) . "\n"; + if (abs(intval($millSecond) - intval($millSecond1)) > 100) { + echo $pathFile . "\n"; + echo abs(intval($millSecond) - intval($millSecond1)) . "\n"; + } // unlink($pathFile); - return; - } + return; + } // $targetFile = $fileInfo["dirname"] . '/' .$fileInfo["filename"] . '-1'. '.' . $fileInfo["extension"]; -// dump("targetFile", [$targetFile]); -//// $result = shell_exec("handBrakeCli -Z 'Very Fast 720p30' -i '". $subPathFile ."' -o '". $targetFile . " && echo 'success'"); -// $result = shell_exec("handBrakeCli -Z 'Very Fast 720p30' -i '". $pathFile ."' -o '". $targetFile . "'"); -// dump($result); - - } - } - } - - public function checkFileDimension($file) : bool - { - $mediaContainer = $this->mediainfo->getInfo($file); - foreach ($mediaContainer->getVideos() as $video) { - $height = $video->get('height')->getAbsoluteValue(); - $width = $video->get('width')->getAbsoluteValue(); - if ($height > $width && $width <= 720) { - echo "$file 分辨率小于 720p 跳过\n"; - return false; - } - if ($height <= $width && $height <= 720) { - echo "$file 分辨率小于 720p 跳过\n"; - return false; - } - - } - return true; - } - - public function checkFileSize($file, $size = 1): bool - { - - if (is_file($file) && filesize($file) > 1 * 1024 * 1024) { - return true; - } - $fileSize = FileUtils::humanFilesize(filesize($file)); - echo "$file size < 1Mb filesize is $fileSize skip \n"; - return true; - } - - public function checkFileEncodeType($file): bool - { - - try { - $codecName = $this->ffprobe - ->streams($file) // extracts streams informations - ->videos() // filters video streams - ->first() // returns the first video stream - ->get('codec_name'); - } catch (Throwable $e) { - echo "error $file \n"; - Log::error("ffprobe has error just return false for test, exception: ". $e->getMessage()); - return false; - } + // dump("targetFile", [$targetFile]); + //// $result = shell_exec("handBrakeCli -Z 'Very Fast 720p30' -i '". $subPathFile ."' -o '". $targetFile . " && echo 'success'"); + // $result = shell_exec("handBrakeCli -Z 'Very Fast 720p30' -i '". $pathFile ."' -o '". $targetFile . "'"); + // dump($result); + + } + } + } + + public function checkFileDimension($file): bool { + $mediaContainer = $this->mediainfo->getInfo($file); + foreach ($mediaContainer->getVideos() as $video) { + $height = $video->get('height')->getAbsoluteValue(); + $width = $video->get('width')->getAbsoluteValue(); + if ($height > $width && $width <= 720) { + echo "$file 分辨率小于 720p 跳过\n"; + return false; + } + if ($height <= $width && $height <= 720) { + echo "$file 分辨率小于 720p 跳过\n"; + return false; + } + + } + return true; + } + + public function checkFileSize($file, $size = 1): bool { + + if (is_file($file) && filesize($file) > 1 * 1024) { + return true; + } + $fileSize = FileUtils::humanFilesize(filesize($file)); + echo "$file size < 1Mb filesize is $fileSize skip \n"; + return true; + } + + public function checkFileEncodeType($file): bool { + + try { + $codecName = $this->ffprobe + ->streams($file) // extracts streams informations + ->videos() // filters video streams + ->first() // returns the first video stream + ->get('codec_name'); + } catch (Throwable $e) { + echo "error $file \n"; + Log::error("ffprobe has error just return false for test, exception: " . $e->getMessage()); + return false; + } // return false; - return trim($codecName) == "hevc"; - } - - public function getDimension($file): Dimension - { - $dimensions = new Dimension(1920, 1080); - - try { - $dimensions = $this->ffprobe - ->streams($file) - ->videos() - ->first() - ->getDimensions(); - } catch (Throwable $e) { - Log::error("ffprobe getDimension has error just return default dimension, exception: ". $e->getMessage(), ["file" => $file]); - return $dimensions; - } - return $dimensions; - } - - /** - * @param bool $needRemoveAfterEncode - */ - public function setNeedRemoveAfterEncode(bool $needRemoveAfterEncode): void - { - $this->needRemoveAfterEncode = $needRemoveAfterEncode; - } - - /** - * @param bool $needRemoveExistFiles - */ - public function setNeedRemoveExistFiles(bool $needRemoveExistFiles): void - { - $this->needRemoveExistFiles = $needRemoveExistFiles; - } - - /** - * @return bool - */ - public function isNeedRemoveAfterEncode(): bool - { - return $this->needRemoveAfterEncode; - } - - /** - * @return bool - */ - public function isNeedRemoveExistFiles(): bool - { - return $this->needRemoveExistFiles; - } - + return trim($codecName) == "hevc"; + } + + public function getDimension($file): Dimension { + $dimensions = new Dimension(1920, 1080); + + try { + $dimensions = $this->ffprobe + ->streams($file) + ->videos() + ->first() + ->getDimensions(); + } catch (Throwable $e) { + Log::error("ffprobe getDimension has error just return default dimension, exception: " . $e->getMessage(), ["file" => $file]); + return $dimensions; + } + return $dimensions; + } + + /** + * @param bool $needRemoveAfterEncode + */ + public function setNeedRemoveAfterEncode(bool $needRemoveAfterEncode): void { + $this->needRemoveAfterEncode = $needRemoveAfterEncode; + } + + /** + * @param bool $needRemoveExistFiles + */ + public function setNeedRemoveExistFiles(bool $needRemoveExistFiles): void { + $this->needRemoveExistFiles = $needRemoveExistFiles; + } + + /** + * @return bool + */ + public function isNeedRemoveAfterEncode(): bool { + return $this->needRemoveAfterEncode; + } + + /** + * @return bool + */ + public function isNeedRemoveExistFiles(): bool { + return $this->needRemoveExistFiles; + } } - diff --git a/app/Services/FileService.php b/app/Services/FileService.php index d03155d..db2a61c 100644 --- a/app/Services/FileService.php +++ b/app/Services/FileService.php @@ -1,317 +1,315 @@ queuedFfmpegService = new QueuedFfmpegService(); - } + public function __construct() { + $this->queuedFfmpegService = new QueuedFfmpegService(); + } - public function segmentFiles($baseDir) - { - if (!is_dir($baseDir)) { - return; - } + public function segmentFiles($baseDir) { + if (!is_dir($baseDir)) { + return; + } // $files = new Finder(); -// $files->files()->in($baseDir); - $files = $this->scan_dir($baseDir); - $firstTime = true; - $counter = 0; - $dirCounter = 0; - $dirName = ""; - foreach ($files as $file) { - if ($firstTime) { - $dirName = $baseDir . "/" . date("Y-m-d", filectime($baseDir . "/" . $file)) . "-$dirCounter"; - if (!is_dir($dirName)) { - mkdir($dirName); - } - $dirCounter++; - $firstTime = false; - } - rename($baseDir . "/" . $file, $dirName . "/" . $file); - $counter++; - if ($counter % 1000 == 0) { - $firstTime = true; - } + // $files->files()->in($baseDir); + $files = $this->scan_dir($baseDir); + $firstTime = true; + $counter = 0; + $dirCounter = 0; + $dirName = ""; + foreach ($files as $file) { + if ($firstTime) { + $dirName = $baseDir . "/" . date("Y-m-d", filectime($baseDir . "/" . $file)) . "-$dirCounter"; + if (!is_dir($dirName)) { + mkdir($dirName); + } + $dirCounter++; + $firstTime = false; + } + rename($baseDir . "/" . $file, $dirName . "/" . $file); + $counter++; + if ($counter % 1000 == 0) { + $firstTime = true; + } // exit; - } - - } - - private function scan_dir($dir) { - $ignored = array(".", "..", ".svn", ".htaccess",".DS_Store"); - - $files = array(); - foreach (scandir($dir) as $file) { - if (in_array($file, $ignored)) continue; - $files[$file] = filemtime($dir . '/' . $file); - } - - asort($files); - $files = array_keys($files); - - return ($files) ? $files : false; - } - - public function queryFileTime($file) - { - - $mtime = date("Y-m-d H:i:s", filemtime($file)); - $atime = date("Y-m-d H:i:s", fileatime($file)); - $ctime = date("Y-m-d H:i:s", filectime($file)); - echo "file mtime is $mtime, atime is $atime, ctime is $ctime"; - } - - public function compareLocalFilesAndGooglePhotoFiles() { -// $dir = "/Users/shixuesen/Downloads/y/910283-小清晨儿_"; -// $list = scandir($dir); - $baseDir = "/Users/shixuesen/Documents/sync/image"; - $dirs = ["腐团儿"]; - $files = []; - foreach ($dirs as $dir) { - $currentFiles = scandir($baseDir . DIRECTORY_SEPARATOR . $dir); - foreach ($currentFiles as $file) { - if ($file == "." || $file == ".." || $file == ".DS_Store") { - continue; - } - $files[] = $baseDir . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $file; - } + } + + } + + private function scan_dir($dir) { + $ignored = array(".", "..", ".svn", ".htaccess", ".DS_Store"); + + $files = array(); + foreach (scandir($dir) as $file) { + if (in_array($file, $ignored)) { + continue; + } + + $files[$file] = filemtime($dir . '/' . $file); + } + + asort($files); + $files = array_keys($files); + + return ($files) ? $files : false; + } + + public function queryFileTime($file) { + + $mtime = date("Y-m-d H:i:s", filemtime($file)); + $atime = date("Y-m-d H:i:s", fileatime($file)); + $ctime = date("Y-m-d H:i:s", filectime($file)); + echo "file mtime is $mtime, atime is $atime, ctime is $ctime"; + } + + public function compareLocalFilesAndGooglePhotoFiles() { +// $dir = "/Volumes/T7/S级女优 童年女神姐姐 天海翼 天海つばさ合集出道至今个别中文字幕无码破解目前最全【396V1.55TB】"; + // $list = scandir($dir); + +// $baseDir = "/Volumes/desktop-5rv69tq/very"; + // $dirs = ["tg"]; + $baseDir = "/Users/shixuesen/Documents/otherSync/very"; + $dirs = ["mv1001"]; + $files = []; + foreach ($dirs as $dir) { + $currentFiles = scandir($baseDir . DIRECTORY_SEPARATOR . $dir); + foreach ($currentFiles as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store") { + continue; + } + $files[] = $baseDir . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $file; + } // $files = array_merge($files, $currentFiles); - } + } // $list = array_merge($list, scandir("/Users/shixuesen/Documents/sync/image/weibo04")); -// $list = []; -// $list = array_merge($list, scandir("/Volumes/desktop-81dpan3/pcSync/china_cam/china_cam_001")); - $photoList = []; + // $list = []; + // $list = array_merge($list, scandir("/Volumes/desktop-81dpan3/pcSync/china_cam/china_cam_001")); + $photoList = []; - // $this->deleteFileListWithDir($photoList, "/Volumes/desktop-81dpan3/pcSync/china_cam/china_cam_001/"); - $i = 0; + // $this->deleteFileListWithDir($photoList, "/Volumes/desktop-81dpan3/pcSync/china_cam/china_cam_001/"); + $i = 0; // $s1 = "ストッキング脚コンパイル_蓮実クレア-MIAD-711-C.mp4"; -// $s2 = "ストッキング脚コンパイル_蓮実クレア-MIAD-711-C.mp4"; -// $s3 = "ストッキング脚コンパイル_蓮実クレア-MIAD-711-C.mp4"; -// $s4 = "ストッキング脚コンパイル_蓮実クレア-MIAD-711-C.mp4"; -// $members = Redis::connection()->smembers("ストッキング脚コンパイル"); -// dump($members);exit; -// dump($members);exit; - - foreach ($files as $item) { - $basename = pathinfo($item, PATHINFO_BASENAME); + // $s2 = "ストッキング脚コンパイル_蓮実クレア-MIAD-711-C.mp4"; + // $s3 = "ストッキング脚コンパイル_蓮実クレア-MIAD-711-C.mp4"; + // $s4 = "ストッキング脚コンパイル_蓮実クレア-MIAD-711-C.mp4"; + // $members = Redis::connection()->smembers("ストッキング脚コンパイル"); + // dump($members);exit; + // dump($members);exit; + + foreach ($files as $item) { + $basename = pathinfo($item, PATHINFO_BASENAME); // dump($basename);continue; -// - if (Redis::connection()->sismember("腐团儿", $basename) == 0) { + // dump(Redis::connection()->smembers("腐团儿"));exit; + // + if (Redis::connection()->sismember("qqmv", $basename) == 0) { // echo $item . " size is " . filesize($item) / 1024 . "kb\n"; - $i++; - if (!str_contains($basename, "baiduyun.uploading.cfg")) { - dump($item); -// rename($item, $baseDir . DIRECTORY_SEPARATOR . "acfun_need" . DIRECTORY_SEPARATOR . $basename); - } + + if (!str_contains($basename, "baiduyun.uploading.cfg")) { + + if (!starts_with($basename, ".")) { + dump($item); + $i++; + } +// rename($item, $baseDir . DIRECTORY_SEPARATOR . "tg_need" . DIRECTORY_SEPARATOR . $basename); + } // - } -// else { -// unlink($item); -// } - } - echo "all file num is " . $i; + } else { + unlink($item); + } + } + echo "all file num is " . $i; // dump(array_diff($list, $photoList)); - } - - public function deleteFilesForExtensions($dir, array $extensions) - { - if (!is_dir($dir)) { - return; - } - $files = scandir($dir); - foreach ($files as $file) { - if (skipDefaultPathAndFile($file)) { - continue; - } - $currentItem = implode(DIRECTORY_SEPARATOR, [$dir, $file]); - if (is_dir($currentItem)) { - $this->deleteFilesForExtensions($currentItem, $extensions); - } - if (is_file($currentItem)) { - $pathInfo = pathinfo($currentItem); - if (in_array($pathInfo["extension"], $extensions)) { - dump("now delete file $currentItem"); - unlink($currentItem); - } - } - - } - } - - public function renameFileExtensionToAnother($dir, $fromExtension, $toExtension) - { - if (!is_dir($dir)) { - return; - } - $files = scandir($dir); - foreach ($files as $file) { - if (skipDefaultPathAndFile($file)) { - continue; - } - $currentItem = implode(DIRECTORY_SEPARATOR, [$dir, $file]); - if (is_dir($currentItem)) { - $this->renameFileExtensionToAnother($currentItem, $fromExtension, $toExtension); - } - if (is_file($currentItem)) { - $pathInfo = pathinfo($currentItem); - if ($pathInfo["extension"] == $fromExtension) { - $newFile = str_replace($fromExtension, $toExtension, $currentItem); - dump("now rename file $currentItem to $newFile"); - rename($currentItem, $newFile); - $this->queuedFfmpegService->addToQueue($newFile); - } - } - - } - } - - public function renameFileAndAddToQueue($file, $fromExtension, $toExtension) - { - if (is_file($file)) { - $pathInfo = pathinfo($file); - if ($pathInfo["extension"] == $fromExtension) { - $newFile = str_replace($fromExtension, $toExtension, $file); - dump("now rename file $file to $newFile"); - rename($file, $newFile); - $this->queuedFfmpegService->addToQueue($newFile); - } - } - } - - public function copySelectedFilesToMappedDirectory(array $sourceToDestMap) - { - foreach ($sourceToDestMap as $sourceDir => $dest) { + } + + public function deleteFilesForExtensions($dir, array $extensions) { + if (!is_dir($dir)) { + return; + } + $files = scandir($dir); + foreach ($files as $file) { + if (skipDefaultPathAndFile($file)) { + continue; + } + $currentItem = implode(DIRECTORY_SEPARATOR, [$dir, $file]); + if (is_dir($currentItem)) { + $this->deleteFilesForExtensions($currentItem, $extensions); + } + if (is_file($currentItem)) { + $pathInfo = pathinfo($currentItem); + if (in_array($pathInfo["extension"], $extensions)) { + dump("now delete file $currentItem"); + unlink($currentItem); + } + } + + } + } + + public function renameFileExtensionToAnother($dir, $fromExtension, $toExtension) { + if (!is_dir($dir)) { + return; + } + $files = scandir($dir); + foreach ($files as $file) { + if (skipDefaultPathAndFile($file)) { + continue; + } + $currentItem = implode(DIRECTORY_SEPARATOR, [$dir, $file]); + if (is_dir($currentItem)) { + $this->renameFileExtensionToAnother($currentItem, $fromExtension, $toExtension); + } + if (is_file($currentItem)) { + $pathInfo = pathinfo($currentItem); + if ($pathInfo["extension"] == $fromExtension) { + $newFile = str_replace($fromExtension, $toExtension, $currentItem); + dump("now rename file $currentItem to $newFile"); + rename($currentItem, $newFile); + $this->queuedFfmpegService->addToQueue($newFile); + } + } + + } + } + + public function renameFileAndAddToQueue($file, $fromExtension, $toExtension) { + if (is_file($file)) { + $pathInfo = pathinfo($file); + if ($pathInfo["extension"] == $fromExtension) { + $newFile = str_replace($fromExtension, $toExtension, $file); + dump("now rename file $file to $newFile"); + rename($file, $newFile); + $this->queuedFfmpegService->addToQueue($newFile); + } + } + } + + public function copySelectedFilesToMappedDirectory(array $sourceToDestMap) { + foreach ($sourceToDestMap as $sourceDir => $dest) { // $lastTime = $this->processDirAndFindLastFileMTime($destDir); - $destDir = $dest[0]; - $lastTime = $dest[1]; - echo "sourceDir:{$sourceDir}, destDir: {$destDir}, lastTime: {$lastTime} \n"; - $lastTime = strtotime("2022-10-10 23:00:00"); - $this->deleteFilesInDir($destDir); - $list = $this->queryNewerFilesInDirectory($sourceDir, $lastTime); - $this->copyFileToDest($destDir, $list); + $destDir = $dest[0]; + $lastTime = $dest[1]; + echo "sourceDir:{$sourceDir}, destDir: {$destDir}, lastTime: {$lastTime} \n"; + $lastTime = strtotime("2022-10-10 23:00:00"); + $this->deleteFilesInDir($destDir); + $list = $this->queryNewerFilesInDirectory($sourceDir, $lastTime); + $this->copyFileToDest($destDir, $list); // dump($list); - } - } - - public function mvFile($file, $destDirectory): bool - { - return rename($file, $destDirectory . DIRECTORY_SEPARATOR . basename($file)); - } - - public function queryNewerFilesInDirectory($dir, $lastTime) - { - $list = []; - if (!is_dir($dir)) { - return $list; - } - echo "start scandir $dir\n"; - $files = scandir($dir); - // echo "end scandir $dir\n"; - foreach ($files as $file) { - if ($file == "." || $file == ".." || $file == ".DS_Store") { - continue; - } - $currentItem = implode(DIRECTORY_SEPARATOR, [$dir, $file]); - if (is_dir($currentItem)) { - $list = array_merge($list, $this->queryNewerFilesInDirectory($currentItem, $lastTime)); - } else if (is_file($currentItem)) { - if (filemtime($currentItem) > $lastTime) { - Log::info("now add file $currentItem"); - // exit; - $list[] = $currentItem; - } - } - } - return $list; - } - - - /** - * 找出文件夹里的最新的的文件 - * @param $destDir - * @return false|string - */ - public function processDirAndFindLastFileMTime($destDir) - { - $date = new DateTime("last year"); - $date = $date->format("Y-m-d H:i:s"); - if (!is_dir($destDir)) { - - return $date; - } - $files = scandir($destDir); - foreach ($files as $file) { - if ($file == "." || $file == ".." || $file == ".DS_Store") { - continue; - } - $currentItem = implode(DIRECTORY_SEPARATOR, [$destDir, $file]); - if (is_dir($currentItem)) { - $currentTime = $this->processDirAndFindLastFileMTime($currentItem); - } else { - $currentTime = date("Y-m-d H:i:s", filemtime($currentItem)); - echo $currentItem . " " . $currentTime . "\n"; - } - if (strtotime($currentTime) > strtotime($date)) { - $date = $currentTime; - } - - } - return $date; - } - - public function deleteFilesInDir($dir) - { - if (!is_dir($dir)) { - return; - } - $files = scandir($dir); - foreach ($files as $file) { - if ($file == "." || $file == ".." || $file == ".DS_Store") { - continue; - } - $currentItem = implode(DIRECTORY_SEPARATOR, [$dir, $file]); - if (is_file($currentItem)) { - unlink($currentItem); - } - } - } - - public function deleteFileListWithDir($list, $prefix) { - foreach ($list as $file) { - $file = $prefix . $file; - if (is_file($file)) { - unlink($file); - } - } - } - - public function copyFileToDest($destDir, $fileList) - { - $num = count($fileList); - foreach ($fileList as $file) { + } + } + + public function mvFile($file, $destDirectory): bool { + return rename($file, $destDirectory . DIRECTORY_SEPARATOR . basename($file)); + } + + public function queryNewerFilesInDirectory($dir, $lastTime) { + $list = []; + if (!is_dir($dir)) { + return $list; + } + echo "start scandir $dir\n"; + $files = scandir($dir); + // echo "end scandir $dir\n"; + foreach ($files as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store") { + continue; + } + $currentItem = implode(DIRECTORY_SEPARATOR, [$dir, $file]); + if (is_dir($currentItem)) { + $list = array_merge($list, $this->queryNewerFilesInDirectory($currentItem, $lastTime)); + } else if (is_file($currentItem)) { + if (filemtime($currentItem) > $lastTime) { + Log::info("now add file $currentItem"); + // exit; + $list[] = $currentItem; + } + } + } + return $list; + } + + /** + * 找出文件夹里的最新的的文件 + * @param $destDir + * @return false|string + */ + public function processDirAndFindLastFileMTime($destDir) { + $date = new DateTime("last year"); + $date = $date->format("Y-m-d H:i:s"); + if (!is_dir($destDir)) { + + return $date; + } + $files = scandir($destDir); + foreach ($files as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store") { + continue; + } + $currentItem = implode(DIRECTORY_SEPARATOR, [$destDir, $file]); + if (is_dir($currentItem)) { + $currentTime = $this->processDirAndFindLastFileMTime($currentItem); + } else { + $currentTime = date("Y-m-d H:i:s", filemtime($currentItem)); + echo $currentItem . " " . $currentTime . "\n"; + } + if (strtotime($currentTime) > strtotime($date)) { + $date = $currentTime; + } + + } + return $date; + } + + public function deleteFilesInDir($dir) { + if (!is_dir($dir)) { + return; + } + $files = scandir($dir); + foreach ($files as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store") { + continue; + } + $currentItem = implode(DIRECTORY_SEPARATOR, [$dir, $file]); + if (is_file($currentItem)) { + unlink($currentItem); + } + } + } + + public function deleteFileListWithDir($list, $prefix) { + foreach ($list as $file) { + $file = $prefix . $file; + if (is_file($file)) { + unlink($file); + } + } + } + + public function copyFileToDest($destDir, $fileList) { + $num = count($fileList); + foreach ($fileList as $file) { // $filePathInfo = pathinfo($file); -// dump($filePathInfo); -// echo pathinfo($file, PATHINFO_BASENAME); -// exit; - $targetFile = $destDir . DIRECTORY_SEPARATOR . pathinfo($file, PATHINFO_BASENAME); - $num--; - if (is_file($targetFile)) { - echo "target file $targetFile exists \n"; - continue; - } - copy($file, $targetFile); - echo "{$num} files left\n"; + // dump($filePathInfo); + // echo pathinfo($file, PATHINFO_BASENAME); + // exit; + $targetFile = $destDir . DIRECTORY_SEPARATOR . pathinfo($file, PATHINFO_BASENAME); + $num--; + if (is_file($targetFile)) { + echo "target file $targetFile exists \n"; + continue; + } + copy($file, $targetFile); + echo "{$num} files left\n"; // exit; -// $filePathInfo[PATHINFO_DIRNAME]; - } - } + // $filePathInfo[PATHINFO_DIRNAME]; + } + } } diff --git a/app/Services/InstagramService.php b/app/Services/InstagramService.php index 0699b2c..b01e4d8 100644 --- a/app/Services/InstagramService.php +++ b/app/Services/InstagramService.php @@ -1,6 +1,5 @@ ig = new Instagram($this->debug, $this->truncatedDebug); - - // try { - // $this->ig->login($this->username, $this->password); - // } catch - // (Exception $e) { - // echo 'Login has something went wrong: ' . $e->getMessage() . "\n"; - // exit(0); - // } - } - - private $userList = [ - "bedich520" => 17707667205, - "airisuzuki_official_uf" => 5585980310, - "nancylobh" => 17865689564, - "eom_sangmi" => 1243405225, - "welsh_koby" => 12048064898, - "limerencelm" => 13305603901, - "__leeheeeun__" => 366102850, - "jeonjisu92" => 478396079, - "aiiiiidj" => 4839785330, - "senap_official" => 8611432627, - "super_fetish" => 12801506409, - "jelly_jilli" => 3581231676, - "ji_an35" => 9498787524, - "lusiakiss" => 448335248, - "ngoctrinh89" => 1526791424, - "yiping_0226" => 632775673, - "wsmslbn" => 6794713533, - "mc807lsy" => 3315177035, - "beauty.leg" => 3320867558, - "queena820628" => 12991274468, - "bitnara1105" => 5849529154, - "mobe_carrie0223" => 566598605, - "mikamikatn" => 45602633214, - "inkyung97" => 5763414441, - "e_seoa" => 6859472347, - "r_ap82_" => 11599648301, - "hanna91914" => 6114468708, - "hana.bunny_bunny" => 3273363525, - "rakukoo" => 24837017, - "suyue233" => 6196235525, - "sakura_maomao" => 8173365074, - "irishuo_" => 598800246, - "maousamaa" => 3662020754, - "dongdong810" => 647869935, - "m.hakase" => 1509208867, - "dododoris__" => 539095769, - "banyfit" => 574865424, - "cherry_quahst" => 22834825, - "tngnlo" => 184952266, - "7alice77" => 7502308859, - "e.s2.e" => 1112115704, - "aohsuehfu" => 241869017, - "beargenie" => 454557268, - "changchinlan" => 178911602, - "dadachan" => 1361004, - "imjennycheng" => 286180341, - "loveruby_official" => 2198824121, - "maggiewu1008" => 372772460, - "nyanchan22" => 527514115, - "nz0502" => 1101667954, - "sharalinmusic" => 468754721, - "yura_936" => 1780070827, - "skuukzky" => 1507979106, - "angelcandices" => 43114731, - "yoona__lim" => 2213235565, - "masami_nagasawa" => 1126358805, - "weiman_the_real_one" => 367492101, - "sabrina888888_" => 19900699, - "yifei_cc" => 6648247795, - "siawase726" => 343071306, - "claudiashkim" => 1553792415, - "amberchenslife" => 2104721, - "jennawang525" => 296074766, - "aoi_sola" => 2080763, - "li_yen_chin" => 1585810775, - "vousmevoyez" => 1774404143, - "parlovetati" => 381724660, - "lurehsu" => 291109063, - "shinopp._.ai" => 1992367739, - "1992.ai_" => 8108074320, - "yui_xin_" => 1934526383, - "isangelc" => 4308276, - "amandacerny" => 10245870, - "mandytao" => 202316740, - "taeyeon_ss" => 329452045, - "seojuhyun_s" => 1499879597, - "shuhan.mei" => 202813045, - "cho_hyunyoung" => 1097213789, - "boram__jj" => 1577496884, - "cxxsomi" => 644060463, - "zyzyxin222" => 48904712836, - "chen_01_24" => 806888132, - "naughty_rabbit_" => 533122832, - "sejinming" => 5877651933, - "na0912mi" => 1200529361, - "ling.lingerie" => 49122819171, - "samiaowu" => 13288296956, - "janed_404" => 25532050868, - ]; - - private $userListNew = [ - "adrienleyronas" => 24410221, - "beastar_inc" => 8388701136, - "hungry_seolhyun" => 17814228706, - "withlovefromamanda" => 355774487, - "setmenstalk" => 2219875737, - "miamiac" => 181451258, - "xiaomadajiasijia" => 1398803340, - "vietnam.inlove" => 2322275473, - "_jiyulluv_" => 599361711, - "jacblackjacworks" => 49270530152, - "kellyedo1" => 9214447973, - "yuzu.zuzuzu" => 4295513868, - "akemimi_q" => 502224807, - "hejyalice" => 4412178166, - "estherrr.mu" => 4171107865, - "choastagram.23" => 3295023121, - "maherokeh" => 1093490388, - "sportypretty" => 3014281754, - "xiaoye_0914" => 5552800488, - "mei.shuhan" => 202813045, - "z811205" => 244381137, - "exid__hani" => 1614049605, - "aaronli_ca" => 5928238988, - "baebae_de" => 1282690987, - "flyier" => 31126237740, - "aboutchenfafa" => 306436191, - "risachsa" => 251387485, - "followers.941" => 10982959592, - "sheorganic.official" => 11312471629, - "sheenee11" => 48127320309, - "haezh" => 289940701, - "onlyswan" => 577146, - "rorayangjangjeom" => 11767899788, - "ween.jp" => 23318560030, - "fanzixian" => 3934462576, - "burrooooooo" => 487191386, - "bella_huang1993" => 12902619269, - "xxssiinx" => 307594962, - "x1nouv" => 3006684053, - "lupek.kyo" => 3060430989, - "_mina321916" => 5694824987, - "aiiiiidj" => 4839785330, - "bobosensei0123" => 12362700883, - "babyleesooooocute" => 4206112644, - "pannypun" => 3262116, - "dali23333" => 699145880, - "amila.yu" => 1115452351, - "hyo_book" => 1956956388, - "minakoxx" => 2102050539, - "zhucebuliaohanhan" => 1136405411, - "queenrikachuu" => 3988508181, - "uuuppzcf_19990" => 6899470290, - "momo_0v0" => 2174592659, - "ageofdecline" => 1133230930, - "jocelyn__song" => 502365504, - "beautylegh" => 1275264695, - "akirakeiki" => 593636280, - "xox0meis" => 6371636114, - "yoona_lim196" => 2054846300, - "vicnichien" => 332454442, - "_yunzheng" => 7455405118, - "aoa_seolhyun9513" => 2057802793, - "969wmy" => 639509654, - "yanxi531" => 222570186, - "catwang6868" => 1130108064, - "nooer_er" => 8888006176, - "formidat_rebe_" => 2094324381, - "oruibao" => 987953487, - "official_stellar" => 2128218602, - "c.g.m_pr" => 1487927736, - "emmawatson_90_" => 320900662, - "619_cyz" => 2506812226, - "arammmm0305" => 9498787524, - "flashwife" => 27659958643, - "lekorbrothers" => 548709615, - "warwin_outlet" => 7658097775, - "hotasian_journal" => 3443480533, - "yingcaier" => 224470216, - "teenyfeng" => 1482105218, - "lana_doris" => 3581341608, - "yidazhigui" => 1915747988, - "lll0621lll" => 44351036373, - "_asianmodelgirls_" => 3544460988, - "better_me_caolu" => 2106303407, - "yt0ng_" => 329707186, - "vvchennnn" => 1548759342, - "yanyanzi4" => 8499820810, - "keiko.kitagawa" => 372087793, - "momoland.yeonwoo" => 4093171071, - "m522723" => 5764409116, - "lizwenya" => 250939171, - "emmort4l" => 17865689564, - "shutupsb" => 1396013349, - "aoa.hyejeong" => 1182300669, - "akira_429" => 366324022, - "leeyufen" => 254351705, - "mii75208" => 1671899963, - "asianmostwanted" => 1715027156, - "nierxiaoyao" => 434290527, - "aoa.news" => 1697552056, - "yu1gakki" => 1344304375, - "ev_love520" => 37747875975, - "girlsdaykimyura" => 1364108952, - "miss.xuanan" => 32101494027, - "limjueun0107" => 2058367292, - "akihoyoshizawa" => 622958560, - "maggiewu1008" => 372772460, - "ivykuang21" => 191755326, - "nanshiiyahh" => 11577330755, - "suyue233" => 6196235525, - "lxx.baby" => 50433688641, - "seolhyun.aoa" => 1511848858, - "202innewyork" => 2967989437, - "superfetish" => 1154961788, - "sakura_maomao" => 8173365074, - "yoga_clinic" => 1692680878, - "refife.official" => 2205668457, - "_.meganfox" => 2104541316, - "mimibaeeeee" => 8059568, - "nemuhimelody" => 8565192439, - "shishiya520" => 41093172588, - "chinesegirls" => 1941056260, - "ranxiaoyang919" => 4462768701, - "akiho_net" => 1135492086, - "cutegirl.asia" => 3663988138, - "__momoko813" => 8496686944, - "kawasaki__aya" => 3282745463, - "promotion_cbeauty" => 50417901835, - "kkln_" => 487618040, - "amyxinhdeplamnha" => 3043608423, - "thaihotties" => 1795638171, - "hotgirlthailand" => 4078836054, - "ahnee18" => 1451840251, - "sukiyou_" => 30034211232, - "linda.zz99tw" => 3305193023, - "majiahuia312" => 1386396955, - "jessicastep" => 29317383, - "artgravia_global" => 1521033984, - "leggybabebb" => 17785025682, - "maybe_iamawesome" => 180923833, - "luodanwang" => 1305584611, - "yfff2727" => 188322217, - "agentsofshield" => 352078895, - "zozeongzeon" => 49034788798, - "rudanae" => 178174577, - "chinamodelblog" => 9613667181, - "blacksiwamay" => 31213186923, - "avivi000" => 375281688, - "tangyan1206" => 3090889112, - "ace_of_angels08" => 2206867365, - "x.miko__" => 41704764985, - "sgasami" => 5561717680, - "tiny.foto" => 25154119453, - "kaguramiko__" => 8345035809, - "yudong423" => 7356689114, - "reon_soul" => 3963778032, - "yiyang.silvia" => 8476845724, - "ms.maron_2022" => 51403172829, - "lookadesign" => 4181127120, - "xiamei.jiang" => 1964512382, - "170_kimch" => 8317930313, - "_wwhale_fall" => 19682237216, - "amanadabeauties" => 34881427757, - "sususucream" => 2219995801, - "lanlanbabyhi" => 1803050823, - "jessievardie" => 4112637356, - "ko_aku_ma" => 11663277457, - "yone69harajuku" => 14202860, - "d_mi_j" => 20292600017, - "maousamaa" => 3662020754, - "xiamei0828" => 2264949910, - "_catfishhh" => 675886495, - "lan_koyo" => 1721696093, - "warmswinds" => 6167907084, - "chonoblack03" => 2301889639, - "jelly_jiajia" => 339974003, - "leg_fetish_man" => 7633193601, - "top.asian.babes" => 6094994772, - "pn_static" => 1055495109, - "bo_ram_0322" => 492949707, - "loveuu_0919" => 5425097866, - "hia.s2" => 46248526303, - "g_my0" => 623474543, - "libingbing" => 2020489209, - "yangmi_" => 225241552, - "yiyi_444m" => 1559450690, - "maikayinghua" => 7056032571, - "sa_a_529" => 46993114870, - "bonanza.__________" => 697663180, - "reina_chin" => 20695195, - "setsuna100_" => 9765069331, - "shinupusaa" => 52098515282, - "nanaring_" => 208407863, - "renrenbaebae" => 1557255715, - "fhrm_1219" => 32703146081, - "latte_1124" => 3304325339, - "jeanaho" => 18750468, - "nattobbm" => 343623438, - "whitehairpin" => 1337989022, - "robertaklein" => 1696752016, - "koohara__" => 291832515, - "gorgeous_studio_" => 3309361470, - "baimiintt" => 3510911766, - "aoa_luvwies" => 1971425857, - "yue_9.3" => 4134368426, - "saya__second" => 46726960922, - "ruda__s2" => 884491926, - "cindyyenofficial" => 424423160, - "mookies_zapp" => 642556386, - "wannanana27" => 1265834758, - "banana_nani999" => 4255048898, - "yeungchinwah" => 432462230, - "sabrina____s" => 508574681, - "bear.clothess" => 16937729268, - "cutegirlaec" => 3665226024, - "haze989889" => 521037073, - "djjuicykorea" => 2017368087, - "moneychen_" => 1728545843, - "nishino_show" => 1285649, - "yoonhye.chung" => 1392917333, - "sep19__" => 1152537078, - "xii_mannn" => 263751843, - "160_34d" => 998542334, - "luna_hillll" => 2194388358, - "ruriko_ishikawa" => 989260641, - "aomimiki" => 7469770439, - "verna_pei" => 1131073, - "bebe_sl" => 1151751954, - "schelleyyuki_" => 30411241623, - "lisawanglijen" => 502605269, - "soyoungyim" => 1146654768, - "seoyoung_84" => 1686187272, - "evelynyinn" => 358822339, - "lililiiiiiiiiiilllililil" => 536329736, - "eom_sangmi" => 1243405225, - "m.hakase" => 1509208867, - "reiiko_sy" => 643750920, - "fangyu_lin" => 378968318, - "elv.elv.elf" => 9415911483, - "tracywxm" => 1425997067, - "wangleehom" => 3451650438, - "peggy.yuyu" => 328998131, - "yiyanlovegod" => 1310369388, - "crystalpancake" => 4658295, - "nhatien0801" => 1213333085, - "melissah.ee" => 305390340, - "lucycecile" => 13394112, - "ms_joeechong" => 499994294, - "hv_alice" => 1500763258, - "yitai_w" => 336600445, - "cutegirlasean" => 3942265075, - "banyfit" => 574865424, - "zhi_yiyi520" => 5695518232, - "minchunlo" => 2470323210, - "172page_" => 4239936758, - "nanaco_33" => 54073179, - "aileduoaliga" => 546201529, - "yztuan_" => 966969489, - "gaoyuanyuan_gyy" => 794155792, - "karry113" => 245076789, - "lllilybaby" => 198356505, - "beibei2211" => 5074612, - "159qq___" => 6057675702, - "jelly_jilli" => 3581231676, - "venuskang.1" => 1395850499, - "imdoris_1230" => 626999763, - "helloleeholeehoho" => 1469105294, - "novaliya888" => 6436301899, - "chiehyu1027" => 449256781, - "377.bb" => 3307247145, - "mandytao" => 202316740, - "yifaer_chen" => 516972696, - "ai_to_rin" => 42137247216, - "kagari.7330" => 1369138730, - "xxplmch99_" => 416018139, - "choa880_aoa" => 2283460141, - "ariellereitsma" => 14114832, - "cr5p__official" => 5849338586, - "michellet22_" => 41266931, - "savanna_blade" => 234666069, - "vanessa.only4567" => 50905592134, - "yoonmirae" => 732010139, - "lkk_imagine" => 6166245751, - "993a9" => 18749480, - "aiwa.only" => 35306340023, - "djxin_tw" => 564987626, - "joyfulck" => 54468468, - "cassieeebae_" => 1400725713, - "linleah529" => 348075794, - "twinshk" => 226875150, - "verna.1206" => 202733181, - "leohex_official" => 7746467656, - "lusiakiss" => 448335248, - "songjooa0225" => 4592263087, - "witchhat_ringo" => 50956936058, - "miss_merlyn" => 1351265910, - "fteikaros" => 45953750279, - "asianmodelblog" => 6609199774, - "kkwonsso_94" => 357805234, - "ting.talk" => 257009757, - "areasayaka" => 637192875, - "1ee.zw9" => 1696816620, - "chiyu3u" => 1483508898, - "amierwwwwww" => 6185863880, - "buckycloud" => 6746410822, - "jacblackjac" => 10855003607, - "stilleecho" => 255372656, - "alicebambam" => 8568258, - "jennawang525" => 296074766, - "p_e_r_r_y_x" => 26986768791, - "tosarei19" => 48335696746, - "jisook718" => 1560977276, - "isangelc" => 4308276, - "kaede_erouraaka" => 46563658191, - "kanomwhannatcha789" => 4247061798, - "yi.seo.a" => 1557234932, - "laine_laineng" => 187651374, - "1milliongirls_" => 4282338844, - "dg8dg" => 5966995904, - "pangwinks" => 33190676, - "jesse_0921" => 189604380, - "qsexyloveme" => 12991274468, - "annabellellll" => 36011584, - "nikaynakih" => 6780905, - "ts_takasho" => 3109461469, - "sso1124" => 714788301, - "seolhyun_choa" => 2544374274, - "i_hee_c" => 3218062159, - "edithyindaily" => 1666271946, - "jane.duu.88" => 230967212, - "mikokissy" => 253851678, - "amberchenslife" => 2104721, - "yiping_0226" => 632775673, - "aoi_sola" => 2080763, - "li_yen_chin" => 1585810775, - "lynnalin" => 9048043, - "jill_g.e" => 3129947648, - "_azhua" => 1659615193, - "saaya_official_" => 2311919780, - "beauty.leg" => 3320867558, - "171.12.10" => 52605491439, - "kimjeii" => 1648065138, - "sandeul_11" => 1966366408, - "mc807lsy" => 3315177035, - "blacksilk_girls" => 7905141442, - "miko516" => 786823534, - "jeehyeounn" => 3266249104, - "pinkbabe0309" => 12090972, - "phy2938" => 1220279993, - "loluuuuuu_cos" => 4234300721, - "_rongqin99" => 5492352718, - "instababes_asia" => 1572135335, - "limerencem_" => 13305603901, - "sunkisssedbeauty" => 1477474933, - "therivergirl" => 3450388, - "kailiofficial" => 530022543, - "appleweiting" => 357101752, - "babyno_money" => 7374605364, - "_bb_ann_" => 26120107, - "innocent_katty" => 28089309069, - "bebewchang" => 240744142, - "noh.eul_89" => 1152845939, - "miinyan73" => 224643854, - "zsycollection" => 47907341798, - "alice_mather" => 384583705, - "yumisecrets" => 245292194, - "_____sia__" => 3930839708, - "vivianchowwaiman" => 1633307983, - "dancekimiko" => 17448030, - "lyvonne0526" => 523509020, - "gravuremagazinejp" => 2029936802, - "cho_hyunyoung" => 1097213789, - "jeonjisu92" => 478396079, - "snowmanloveu" => 1097259991, - "claudiashkim" => 1553792415, - "sexywht" => 3678604153, - "meiri_gravure" => 46162882571, - "shishi_love521" => 31278522055, - "yueer_moonlover_" => 190089556, - "tn1rw9" => 10865607809, - "godbella" => 1048431023, - "peachplease_tw" => 8477064025, - "houpatty" => 2756069868, - "maruemon_96" => 1512084225, - "x.wistien.x" => 1393372610, - "actressclara" => 540305545, - "dalsooobin" => 1531118206, - "qingshanyuandai" => 13765106295, - "r_ap82_" => 11599648301, - "chen_01_24" => 806888132, - "myksan1717" => 1070063001, - "_yunjeekim_" => 1667520443, - "felix_woojin1224" => 1823916713, - "senap_official" => 8611432627, - "___jung.g" => 1366344647, - "lihenglai" => 4525313872, - "piamodel" => 1941243764, - "c3eru" => 4060717710, - "sira_gravia" => 38574171161, - "anran.1033" => 51701350062, - "mengxinyue2018" => 5316866087, - "rollipop__p" => 1353824141, - "nimoan0729" => 9260679970, - "asakawa_nana" => 4933721527, - "jiwoola" => 29335269474, - "bootyfull_jamie" => 411454438, - "dongdong810" => 647869935, - "dayuanlin" => 451833335, - "ahyoung_hwang" => 1410260507, - "chiushinshin1103" => 47713518600, - "s2yuhanjun" => 8528962808, - "1993kg" => 585645951, - "a.lissiee" => 11528696616, - "choi_hs93" => 1722987053, - "yun_0928_" => 6504504560, - "amy00526" => 48553202369, - "niya840325" => 5517755941, - "tot_omato" => 36650759971, - "h.viviha" => 5371154909, - "cave0927" => 468187419, - "meiri_01familia" => 11474012713, - "lxxbaby.official" => 50433688641, - "sexy_asian_lady" => 3402597260, - "crystal_swung" => 34033186, - "sugimotoyumi_official" => 2092502045, - "flowersora0813" => 1403325955, - "doly0818" => 12542141036, - "creemmy_16" => 4146979506, - "shinapit46" => 12904833236, - "eki_holic" => 5596110873, - "lunmei" => 13376560, - "fit_hyunjin" => 2192572841, - "weiman_the_real_one" => 367492101, - "erioishitokyo" => 412582193, - "jen2jen2_" => 8921988213, - "kimberlly_chen" => 441117903, - "weiyin.com.tw" => 5968181, - "seol_ah_s" => 1344967412, - "fanfan" => 3212682, - "naomihype" => 1495119895, - "q_gill" => 1567349, - "wang52001112" => 8285185524, - "jiee_wen" => 29364142936, - "ling.lingerie" => 49122819171, - "zzzzm83" => 8010039182, - "shika.xiaolu_lu" => 8739724418, - "min_ching_chang" => 499591666, - "irishuo_" => 598800246, - "nolovehowll" => 52802349, - "melodysoyani" => 1027760475, - "beatricefang" => 29101719, - "tngnlo" => 184952266, - "titi_wxt" => 360924402, - "bedich520" => 17707667205, - "mobe_carrie0223" => 566598605, - "samiaowu" => 13288296956, - "yn_s_1230" => 2053646255, - "ahnlina" => 1129208300, - "yazhubabalu" => 4014137413, - "lovely_ahyeong" => 427920662, - "goeun.1226" => 2117797883, - "rissoft_" => 1445881042, - "7alice77" => 7502308859, - "mika_ccy" => 26787564, - "j_i_y__" => 3190385497, - "nikita.hsu" => 889797, - "kimune5531" => 4176410878, - "sakura10h" => 2239088044, - "la__young" => 1133101059, - "syc_joycechu_" => 348953197, - "zhangsiyunnice" => 311826247, - "mimi112023" => 1442394500, - "fall0715" => 760538193, - "yuyanpeng" => 2158725, - "qiaoxinhuang" => 298943049, - "156.melody" => 10006613875, - "chaeyoon.93" => 1334536697, - "nnabiyeon" => 11129125092, - "rinn_xc" => 2056630159, - "artgravia" => 5980110266, - "moranatias" => 40046089, - "s_ylll" => 690384254, - "kerina_hsueh" => 948148, - "changchinlan" => 178911602, - "yuyan.148" => 14081991939, - "chanmi_96a" => 2044142664, - "superstar_jhs" => 642764983, - "sumire_shinohana" => 6147506212, - "sunha_cos" => 22014899966, - "melodykliu" => 245061361, - "tanganqi88" => 51192268147, - "chiling.lin" => 2282601782, - "teacherkeidi" => 412409374, - "qlj_qlj" => 50897922219, - "mabel_goo" => 235787282, - "a12486" => 3016965959, - "beth_lookgade6666" => 271293671, - "xdoudou2" => 9071014399, - "karinas_aespax" => 6825904394, - "nomoli_photo" => 1465036354, - "fishleong616" => 1559345030, - "_kimjaekyung_" => 839270202, - "dorachai" => 435583573, - "dahye0612" => 1189099446, - "bonnieyuxx" => 296380760, - "daily_irene" => 3427229519, - "groupgirlvn" => 32209938025, - "emperor.photo" => 6931526607, - "tinapouty" => 255550677, - "vanessa.tw" => 450134130, - "park_kkone" => 2977341117, - "hinako_sano" => 1693998248, - "__leeheeeun__" => 366102850, - "so_____y_" => 1065286586, - "xuer_1230" => 502374468, - "suitangtang" => 419267209, - "vivi02257" => 7559843970, - "chuyo622" => 359329053, - "ryosay_p.g" => 3933635611, - "zyzyxin222" => 48904712836, - "shibuya_yuri" => 950707600, - "_wendydydydy" => 1070811604, - "kvwowv" => 1938048867, - "sabrina5477_" => 19900699, - "chrissienana" => 681990, - "physit" => 556427, - "lok666" => 2212872, - "mifancha" => 1404983759, - "soo_flower" => 1692288454, - "shababy___" => 1468537490, - "jimin0807_" => 2014512749, - "judy.3._" => 24308143343, - "miwakokakei" => 345892761, - "amandaseet" => 5210490, - "love_jun1031" => 25232085780, - "chuuu_0908" => 2292786719, - "selinanahaha" => 47947504, - "heidibibe" => 1086059, - "tropicofc" => 1697390959, - "chen_ai_ling51" => 88976, - "katie_chennn" => 219783207, - "gyeongree" => 484009840, - "saorikiyomi" => 3941469424, - "sharon701111" => 372878170, - "willpan23" => 249954422, - "candybaby0402" => 2062027168, - "jess.02.23" => 1113303344, - "la_vie_enrose__" => 325627366, - "victoria02_02" => 600694929, - "ayreen" => 8800691, - "nz0502" => 1101667954, - "sylvia.1204" => 2247622627, - "shi_orii" => 19483824, - "dododoris___" => 7054157082, - "only4567" => 353311243, - "nomita193" => 40570367195, - "qtfreet" => 549186335, - "wt_0102" => 3058770061, - "queenchoa_" => 1919552169, - "hazyryu" => 6794713533, - "nairuru.i" => 2688001520, - "wakatsuki_cmore" => 6979382782, - "still_need" => 487580958, - "ff0427" => 327728950, - "amy00522" => 21818594449, - "cutesww0125" => 27788081, - "xinya_an" => 314309875, - "joannalin724" => 311868662, - "clarkgregg" => 192999062, - "pinksophia0818" => 189840658, - "hisuihisui" => 3250745476, - "sharalinmusic" => 468754721, - "hyo_1013" => 1199621090, - "zhizhibooty" => 11785987554, - "honjo_suzu" => 7144705801, - "mimichan.259" => 1519796225, - "yuleumn" => 537833784, - "dora0x0" => 327634528, - "e_s2_e" => 1112115704, - "rh_ab" => 1117033221, - "yuxinuna" => 7287122, - "k_jenny_k" => 1204481975, - "syamoeri" => 15479745607, - "sanga_yonini" => 572140084, - "sunnylin_520" => 6465963, - "kaytse" => 255920381, - "lurehsu" => 291109063, - "feifei_11111" => 33388543295, - "lil_henstridge" => 221757628, - "misschailing" => 177158910, - "colin.anthony2" => 1685534598, - "sakura.gun" => 1508769542, - "saki__saito" => 1097425418, - "hermosavidaluna" => 642134943, - "bivi_0420" => 471784690, - "_ram_e" => 542591824, - "leehee.express" => 5608680453, - "chienweihah" => 1735736, - "misszzie_" => 1150129265, - "hesui923" => 3685309, - "muse_j" => 1217233625, - "shihpii" => 4593410962, - "christinetinevonvon" => 48415853219, - "hyejoozz" => 1907700472, - "chihiro_chang" => 2249244906, - "maria_grnd" => 11037462, - "dj_siena" => 479243807, - "yudayeon1004" => 1437768957, - "e_seoa" => 6859472347, - "chenbolin" => 16116170, - "beargenie" => 454557268, - "na0912mi" => 1200529361, - "ann.manas" => 4348994, - "yangchenchen.sugar" => 42186993922, - "danielaboterofficial" => 1908919341, - "exidofficial" => 2160054170, - "lovelyjoohee" => 438094240, - "anxi061" => 8070188727, - "ww0205ww" => 1524235496, - "mikowong" => 1600500, - "candice0723" => 1535328320, - "amami_tsubasa000" => 15362256455, - "imjennycheng" => 286180341, - "marie_iitoyo" => 660654932, - "mayyr_" => 9406894, - "yifeis" => 7427384, - "dabechen" => 13130800, - "kiyocosplay" => 1510080263, - "zlsigg" => 49844877406, - "shinopp._.ai" => 1992367739, - "qiu_qqq" => 967496552, - "sqwhat" => 453366618, - "blackielovelife" => 206180117, - "crissielee_" => 144511281, - "stboo" => 776626, - "eunjung.hahm" => 383482884, - "tamara1228" => 10318475, - "aragakiyui_fanspage" => 719563314, - "lilyiu_" => 1195739871, - "him_ella0618" => 3981440758, - "borusushi" => 4206328034, - "falachenfala" => 1170369155, - "bingbing_fan" => 637148837, - "choisaaaa" => 1248351663, - "mypinkmy" => 2954063236, - "pinksoulpuss" => 7340787077, - "alyssachia" => 1384688312, - "atsuko_maeda_official" => 3106934995, - "hebe_tien_0330" => 8159219726, - "official_hitomitanaka" => 343520302, - "poydtreechada" => 16149283, - "rakukoo" => 24837017, - "rio_uchida" => 1119919131, - "shasa_fly" => 1283904669, - "janed_404" => 25532050868, - "dadachan" => 1361004, - "stronger917" => 969620004, - "babe.weng" => 641204465, - "mookpichana" => 3553575875, - "hannah_quinlivan" => 654027902, - "yaokuo" => 422913171, - "hana_sooong" => 606565915, - "sakurai.hinako_official" => 5656141795, - "vox.ngoc.traan" => 3030197091, - "loveruby_official" => 2198824121, - "niecewaidhofer" => 208138222, - "shibukaho" => 3472878594, - "vicky_7155" => 1389128825, - "jessievard" => 2242281072, - "cherry_quahst" => 22834825, - "joanne_722" => 51054288, - "woohye0n" => 1578796854, - "leeesovelys2" => 52105860685, - "jiminbaby_18" => 1690284223, - "yuk00shima" => 1395828484, - "kimi850531" => 1118195392, - "jolin_cai" => 53277501, - "candyseul" => 5738287265, - "shimizuairi" => 4167595154, - "monpink_mon" => 1589997876, - "1989ivyshao" => 370962121, - "ilove7388" => 774854, - "haneulina" => 1261320668, - "rina_kawaei.official" => 4449731542, - "vivamoon" => 370080040, - "xiianger" => 195577939, - "asahina_aya" => 835943084, - "takomayuyi" => 2940077942, - "loveyu_ju" => 48836882462, - "fumika_baba" => 1683518161, - "michiyo_ho" => 20232660, - "boram__jj" => 1577496884, - "jjlin" => 6322604, - "zzyuridayo" => 5782093649, - "miyoshi.aa" => 1545478726, - "dreamstatemuse" => 1410036650, - "elephantdee" => 1359749783, - "kiligkira" => 8105332086, - "elaiza_ikd" => 1498552173, - "seinonana" => 1474952074, - "airisuzuki_official_uf" => 5585980310, - "k_hanna_" => 1346871035, - "sprite0719ss" => 1682380316, - "mirei_kiritani_" => 2283097631, - "habin_s2._" => 517375840, - "angelachong_99" => 436245394, - "shaya.lor" => 252350475, - "chloebennet" => 18186502, - "95_mizuki" => 472670344, - "aohsuehfu" => 241869017, - "suzu.hirose.official" => 5619836719, - "parlovetati" => 381724660, - "angelinadanilova" => 26119622, - "yura_936" => 1780070827, - "duyenn.hipp" => 2305584684, - "tsubasa_0627official" => 2379644219, - "yumibb8888" => 302285124, - "senyamiku" => 4012343855, - "kannahashimoto.mg" => 6878201673, - "chengxiao_0715" => 4167720175, - "epoint2016" => 5923076936, - "iammingki" => 372775239, - "masami_nagasawa" => 1126358805, - "yamamotomaika_official" => 4033564327, - "irisxiao_" => 1428761749, - "exy_s2" => 2032465180, - "ashleyresch" => 1518028512, - "ulzzanggirlth" => 3000477155, - "jaychou" => 5951385086, - "eeelyeee" => 397471523, - "dami_amond" => 5487826028, - "wmookies" => 1203803713, - "snow1111726" => 47523163551, - "haneame_cos" => 3994090562, - "fearythanyarat" => 20392165, - "angelababyct" => 9156600, - "jiyeon2__" => 1738782834, - "wjsn_cosmic" => 2307331080, - "natalieportman" => 6414707404, - "kasumi_arimura.official" => 3610274988, - "eeunseo._.v" => 1764466250, - "haruna_kawaguchi_official" => 5020663420, - "nozomisasaki_official" => 3536539706, - "jeee622" => 1708079295, - "riho_yoshioka" => 2040847679, - "naughty_rabbit_" => 533122832, - "marcellasne_" => 2354318526, - "taaarannn" => 1336020390, - "sooyoungchoi" => 1078607901, - "sooyaaa__" => 8011506095, - "eimi0318" => 42149371331, - "cathrynli" => 211590939, - "asukakiraran" => 384875489, - "xxapple_e" => 8590776830, - "pandorakaaki" => 5152138052, - "natalee.007" => 7125325489, - "hana.bunny_bunny" => 3273363525, - "nagaimariaa" => 16324360355, - "ngoctrinh89" => 1526791424, - "jessica.syj" => 1678311178, - "yulyulk" => 416573427, - "taeyeon_ss" => 329452045, - "vousmevoyez" => 1774404143, - "robertdowneyjr" => 1518284433, - "cxxsomi" => 644060463, - "hyunah_aa" => 491862741, - "moe_five" => 364669222, - "jun.amaki" => 2244743788, - "moon.fit_" => 7188187232, - "inkyung97" => 5763414441, - "s2seolhyuns2" => 2009373206, - "katdenningsss" => 18785563, - "taylorswift" => 11830955, - "boakwon" => 23637003, - "hyominnn" => 378123881, - "tiffanyyoungofficial" => 1497851591, - "nanaouyang" => 1431522319, - "dlwlrma" => 1692800026, - "yuuuuukko_" => 287707051, - "goyounjung" => 3129378920, - "sejinming" => 5877651933, - "hyeri_0609" => 1559113799, - "hyoyeon_x_x" => 363567749, - "janie.lin" => 40529471, - "skuukzky" => 1507979106, - "heylaurensummer" => 3946017843, - "seojuhyun_s" => 1499879597, - "therock" => 232192182, - "nyanchan22" => 527514115, - "beyonce" => 247944034, - "yoona__lim" => 2213235565, - "gatitayan777" => 6300774164, - "cobiesmulders" => 44510012, - "ohttomom" => 1390020866, - "morisakitomomi" => 1179476381, - "daisykeech" => 6980531480, - "meganfox" => 1376331573, - "leomessi" => 427553890, - "ms_puiyi" => 864686480, - "han_kyung__" => 1701694942, - "nyanchan22" => 527514115, - "deejaysoda" => 41287672, - "jin_a_nana" => 1206440978, - "2525nicole2" => 1771420083, - "candiceswanepoel" => 43114731, - "ari_maj" => 1931289525, - "prattprattpratt" => 24065795, - "kendalljenner" => 6380930, - "mirandakerr" => 179801071, - "romeestrijd" => 144912935, - "emmawatson" => 1418652011, - "rosiehw" => 25096719, - "amandacerny" => 10245870, - "gal_gadot" => 20788692, - "jenna_chew" => 190358318, - "ahnanihh" => 532606451, - "helga_model" => 303375147, - "markruffalo" => 1191807828, - "leonardodicaprio" => 1506607755, - "real__yami" => 1334305466, - "_2km2km_" => 8419330744, - "2km2km" => 1261174072, - "2km_2km_dj2" => 50785456344, - "17_chill" => 38054610130, - "gawonaa" => 6552618014, - "bitnara_daily" => 56599499536, - "bonnie.90106_" => 55798122328, - "zennyrt" => 9676745878, - - ]; - - private $userAliasMap = [ - "2km2km" => "2km_2km_dj2", - "siawase726" => "snow1111726" - ]; - - - function traceExistFiles($dir) - { - $existFiles = []; - if (is_dir($dir)) { - $files = array_diff(scandir($dir), ['.', '..']); - foreach ($files as $file) { - if (isMedia($file)) { - $existFiles[] = $file; - } - } - return $existFiles; - } - return []; - } - - function isMedia($file) - { - if (in_array(pathinfo($file)['extension'], ['jpg', 'mp4'])) { - return true; - } - return false; - } - - function logFailUrl($filePrefix, $fileUrl) - { - $failLogFile = "fail.log"; - $myfile = file_put_contents($failLogFile, $filePrefix . "\t" . $fileUrl . PHP_EOL, FILE_APPEND | LOCK_EX); - } - - function oldFileDirList() - { - return ["/Users/shixuesen/OneDrive/Pictures/instagram/Likes_old/"]; - } - - function downloadFile($filenameUrl, $flag = 0, $filePrefix = "", $fileNamePrefix = "") - { - //echo $filenameUrl;exit; - $filePathInfo = pathinfo($filenameUrl); - $filename = $filePathInfo['filename']; - // echo $filename; - // echo "\n"; - $pos = strpos($filename, "?"); - // echo "pos: ".$pos; - // echo "\n"; - if ($pos > 0) { - $filename = substr($filename, 0, $pos); - } - if (file_exists($filePrefix . $filename) && $fileNamePrefix != null) { - rename($filePrefix . $filename, $filePrefix . $fileNamePrefix . $filename); - echo "\n file exists and has rename to " . $filePrefix . $fileNamePrefix . $filename; - return 0; - } - $filename = $fileNamePrefix . $filename; - // if ($filename == "33020038_640464766303508_27725890796388352_n.jpg"){ - // $flag = 1; - // } - if (file_exists($filePrefix . $filename) || file_exists($filePrefix . $filename . ".back")) { - echo "\n file exists " . $filePrefix . $filename; - return 0; - } - // 去老的目录检查下是否已存在 - $oldFileDirList = $this->oldFileDirList(); - foreach ($oldFileDirList as $oldFileDir) { - if (file_exists($oldFileDir . $filename)) { - echo "\n file exists " . $oldFileDir . $filename; - return 0; - } - } - // try { - // $cn_match = "https://scontent-lax3-1.cdninstagram.com"; - // $options = array( - // 'ssl' => array( - // 'verify_peer' => true, - // 'cafile' => "/Users/shixuesen/Downloads/cacert.pem", - // 'ciphers' => 'HIGH:TLSv1.2:TLSv1.1:TLSv1.0:!SSLv3:!SSLv2', - // 'CN_match' => $cn_match, - // 'disable_compression' => true, - // ) - // ); - // $context = stream_context_create($options); - // $ch = curl_init(); - // - // curl_setopt_array($ch, array( - // CURLOPT_URL => $filenameUrl, - // CURLOPT_RETURNTRANSFER => true, - // CURLOPT_ENCODING => '', - // CURLOPT_MAXREDIRS => 10, - // CURLOPT_TIMEOUT => 0, - // CURLOPT_FOLLOWLOCATION => true, - // CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, - // CURLOPT_CUSTOMREQUEST => 'GET', - // CURLOPT_HTTPHEADER => array( - // 'authority: scontent-hkt1-2.cdninstagram.com', - // 'accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', - // 'accept-language: zh-CN,zh;q=0.9', - // 'cache-control: no-cache', - // 'origin: https://www.instagram.com', - // 'pragma: no-cache', - // 'referer: https://www.instagram.com/', - // 'sec-ch-ua: "Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99"', - // 'sec-ch-ua-mobile: ?0', - // 'sec-ch-ua-platform: "macOS"', - // 'sec-fetch-dest: image', - // 'sec-fetch-mode: cors', - // 'sec-fetch-site: cross-site', - // 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36' - // ), - // )); - // $image = curl_exec($ch); - // curl_close($ch); - // // $image = file_get_contents($filenameUrl, false, null); - // } catch (\Throwable $e) { - // var_dump($e->getMessage()); - // $this->logFailUrl($filePrefix, $filenameUrl); - // return -1; - // } - - echo "new filename: " . $filePrefix . $filename . "\n"; - $retryTime = 0; - $downloadResult = ""; - do { - $downloadResult = shell_exec("export http_proxy=http://127.0.0.1:1087; export https_proxy=http://127.0.0.1:1087; cd $filePrefix && wget -t 3 '$filenameUrl' -O '$filename' && echo 'ok'"); - $retryTime++; - } while (Str::contains($downloadResult, "Unable to establish SSL connection") && $retryTime < 5); - - // $downloadResult = file_put_contents($filePrefix . $filename, $image); - Log::info("result: $downloadResult"); - $resultLineArray = explode("\n", $downloadResult); - if (count($resultLineArray) <= 1) { - $this->logFailUrl($filePrefix, $filenameUrl); - return -1; - } - $lastLine = explode("\n", $downloadResult)[count(explode("\n", $downloadResult)) - 2]; - Log::info("lastLine is $lastLine"); - if (trim($lastLine) == 'ok') { - return 1; - } else { - $this->logFailUrl($filePrefix, $filenameUrl); - return -1; - } - } - - public function parseExactFileName($fileUrl) - { - $filePathInfo = pathinfo($fileUrl); - $filename = $filePathInfo['filename']; - $pos = strpos($filename, "?"); - if ($pos > 0) { - $filename = substr($filename, 0, $pos); - } - return $filename; - } - - public function checkFileExists($fileName, $isDb = true, $filePrefix = '') - { - if ($isDb) { - return Ins::where('image_name', $fileName)->where('is_uploaded', 1)->count() > 0; - } else { - return file_exists($filePrefix . $fileName) || file_exists($filePrefix . $fileName . ".back"); - } - } - - public function scrapeLikedUsers() - { - - - $baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/Likes_new/"; - try { - $maxId = null; - do { - $response = $this->ig->media->getLikedFeed(); - foreach ($response->getItems() as $item) { - //echo json_encode($response->getItems());exit; - $userName = $item->getUser()->getUsername() . "_"; - switch ($item->getMediaType()) { - case Item::PHOTO: - $imageUrl = $item->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $baseImageDir, $userName); - if ($res == 0) { - return; - } - break; - case Item::VIDEO: - $videoUrl = $item->getVideoVersions()[0]->getUrl(); - $res = $this->downloadFile($videoUrl, 0, $baseImageDir, $userName); - if ($res == 0) { - return; - } - break; - case Item::CAROUSEL: - // echo json_encode($item); - // exit; - foreach ($item->getCarouselMedia() as $imageItem) { - $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $baseImageDir, $userName); - if ($res == 0) { - return; - } - } - break; - } - } - - // Now we must update the maxId variable to the "next page". - // This will be a null value again when we've reached the last page! - // And we will stop looping through pages as soon as maxId becomes null. - $maxId = $response->getNextMaxId(); - echo "\n new maxId: " . $maxId . "\n"; - - // Sleep for 5 seconds before requesting the next page. This is just an - // example of an okay sleep time. It is very important that your scripts - // always pause between requests that may run very rapidly, otherwise - // Instagram will throttle you temporarily for abusing their API! - echo "\n Sleeping for 5s...\n"; - sleep(5 * random_int(1, 10)); - } while ($maxId != null); - } catch (Exception $e) { - echo 'scrapeLikedUsers something went wrong: ' . $e->getTraceAsString() . "\n"; - } - } - - public function scrapeFeeds() - { - $count = 0; - - $baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/Likes_new/"; - try { - $maxId = "KJgBARQAIAFwAFAAMAAgABgAEAAIAAgACADZa_v9-Pm7d5_W_5Xvd_7_mPv8_z_33fr2p_D8dPx99u_Xctse5msKHZn0u-RNHtpn37-8kZneycSmz3qj99bAii8bvsnA7qPcjbYj_v92n-f___-_v_v9P___7-_f875v_f___5___95ZRzUFT9m_uKqgR79U8eO0uMQcXTQYqQIW1p7lw_hgRhApBBkEIjIA"; - do { - $response = $this->ig->timeline->getTimelineFeed($maxId); - foreach ($response->getFeedItems() as $item) { - if ($item->getMediaOrAd() == null || $item->getMediaOrAd()->getProductType() == "ad") { - continue; - } - // else{ - // echo json_encode($item->getMediaOrAd()) . "\n"; - // echo "product type: " . $item->getMediaOrAd()->getProductType(). "\n"; - // echo $item->getMediaOrAd()->getUser()->getUsername() . "\n"; - // echo "ad id "; - // echo $item->getMediaOrAd()->getAdId() ; - // echo "\n"; - // echo "is add4ad ". $item->isAd4ad() . "\n"; - // echo "is add link type" . $item->isAdLinkType() . "\n"; - // echo "is media or ad" . $item->isMediaOrAd() . "\n"; - // } - // if () - $userName = $item->getMediaOrAd()->getUser()->getUsername() . "_"; - - switch ($item->getMediaOrAd()->getMediaType()) { - case Item::PHOTO: - $imageUrl = $item->getMediaOrAd()->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $baseImageDir, $userName); - // if ($res == 0) { - // return; - // } - break; - case Item::VIDEO: - $videoUrl = $item->getMediaOrAd()->getVideoVersions()[0]->getUrl(); - $res = $this->downloadFile($videoUrl, 0, $baseImageDir, $userName); - // if ($res == 0) { - // return; - // } - break; - case Item::CAROUSEL: - foreach ($item->getMediaOrAd()->getCarouselMedia() as $imageItem) { - $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $baseImageDir, $userName); - // if ($res == 0) { - // return; - // } - } - break; - } - $count++; - if ($count > 100) { - return; - } - sleep(5 * random_int(1, 10)); - } - // Now we must update the maxId variable to the "next page". - // This will be a null value again when we've reached the last page! - // And we will stop looping through pages as soon as maxId becomes null. - $maxId = $response->getNextMaxId(); - echo "\n new maxId: " . $maxId . "\n"; - - // Sleep for 5 seconds before requesting the next page. This is just an - // example of an okay sleep time. It is very important that your scripts - // always pause between requests that may run very rapidly, otherwise - // Instagram will throttle you temporarily for abusing their API! - echo "\n Sleeping for 5s...\n"; - sleep(5 * random_int(1, 100)); - } while ($maxId != null); - } catch (Exception $e) { - echo 'scrapeFeeds something went wrong: ' . $e->getTraceAsString() . "\n"; - } - } - - public function scrapeFeedsV2() - { - $count = 0; - - $baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/Likes_new/"; - try { - // $maxId = "KLYBARoAIAGQAGgASAAwACAAGAAQAAgACAAIAAgACABjuCa_l9v-dr3zx9F7Xp3d-L1r6Vo3DXT_6R-tfP2empv10y5ZsWklYjcXJGpsa50zvaA350LlHBg6cDmivafrIrGQn7gexjClt1_a0r7vgPD6h-s5vczr03H-cNX93_-_f-1Hv1q7_u31__j_-fP7Syn89b577Gk3bPR9K73-l1cMOsnNQL7SxQf8bSAUtXxMoRCYHMIwAEAWpJua5YZhRhgpBBkEIjIA"; - $maxId = null; - do { - $response = $this->queryTimeLineSingle($maxId); - // Log::info("response: " . $response->asJson()); - foreach ($response->getFeedItems() as $item) { - if ($item->getMediaOrAd() == null || $item->getMediaOrAd()->getProductType() == "ad") { - continue; - } - // else{ - // echo json_encode($item->getMediaOrAd()) . "\n"; - // echo "product type: " . $item->getMediaOrAd()->getProductType(). "\n"; - // echo $item->getMediaOrAd()->getUser()->getUsername() . "\n"; - // echo "ad id "; - // echo $item->getMediaOrAd()->getAdId() ; - // echo "\n"; - // echo "is add4ad ". $item->isAd4ad() . "\n"; - // echo "is add link type" . $item->isAdLinkType() . "\n"; - // echo "is media or ad" . $item->isMediaOrAd() . "\n"; - // } - // if () - if ($item->getMediaOrAd()->getAdId() != null || $item->getMediaOrAd()->getUser() == null || $item->getMediaOrAd()->getUser()->getUsername() == null) { - Log::info("current item " . $item->asJson()); - continue; - } - $userName = $item->getMediaOrAd()->getUser()->getUsername() . "_"; - - - switch ($item->getMediaOrAd()->getMediaType()) { - case Item::PHOTO: - $imageUrl = $item->getMediaOrAd()->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $baseImageDir, $userName); - // if ($res == 0) { - // return; - // } - break; - case Item::VIDEO: - $videoUrl = $item->getMediaOrAd()->getVideoVersions()[0]->getUrl(); - $res = $this->downloadFile($videoUrl, 0, $baseImageDir, $userName); - // if ($res == 0) { - // return; - // } - break; - case Item::CAROUSEL: - foreach ($item->getMediaOrAd()->getCarouselMedia() as $imageItem) { - $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $baseImageDir, $userName); - // if ($res == 0) { - // return; - // } - } - break; - } - $count++; - if ($count > 50) { - return; - } - sleep(5 * random_int(1, 10)); - } - // Now we must update the maxId variable to the "next page". - // This will be a null value again when we've reached the last page! - // And we will stop looping through pages as soon as maxId becomes null. - $maxId = $response->getNextMaxId(); - // exit; - echo "\n new maxId: " . $maxId . "\n"; - Log::info("current maxId: " . $maxId); - - // Sleep for 5 seconds before requesting the next page. This is just an - // example of an okay sleep time. It is very important that your scripts - // always pause between requests that may run very rapidly, otherwise - // Instagram will throttle you temporarily for abusing their API! - echo "\n Sleeping for 5s...\n"; - sleep(5 * random_int(1, 100)); - } while ($maxId != null); - } catch (Exception $e) { - echo $e->getMessage();exit; - echo 'scrapeFeeds something went wrong: ' . $e->getTraceAsString() . "\n"; - } - } - - public function scrapeUsers($start = 0) - { - - // $list = $ig->collection->getFeed("17906577283646940"); - // dump($list->getItems()[0]->getMedia()->getCarouselMedia());exit; - - $baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/"; - - try { - - $userList = file("/Users/shixuesen/OneDrive/Pictures/instagram/user.txt"); - $userList = array_slice($userList, $start, 55); - // $userList = ['1992.ai_']; - // print_r($userList);exit; - // print_r($userList); - foreach ($userList as $userName) { - $trueName = trim($userName); - // echo $trueName;exit; - $thisUserImageDir = $baseImageDir . $trueName . "/"; - // $existFiles = $this->traceExistFiles($thisUserImageDir); - try { - $userId = $this->ig->people->getUserIdForName(trim($userName)); - } catch (Exception $e) { - // if ($e instanceof UserNotFou) - Log::error("ins get user id for name error: " . $e->getMessage() . " username is " . $userName); - $userId = null; - if (array_key_exists(trim($userName), $this->userList)) { - $userId = Arr::get($userList, trim($userName)); - } - if ($userId == null) { - continue; - } - // continue; - } - echo "\n username: " . $trueName . " " . $userId . "\n"; - // continue; - - // if ($trueName == 'sabrina888888_') { - // echo "\n______________________\n"; - // $maxId = '1451179182821586881_19900699'; - // } else { - - try { - $response = $this->ig->story->getUserReelMediaFeed($userId); - } catch (Exception $e) { - Log::error("current user has error, $userName, " . $e->getMessage()); - } - foreach ($response->getItems() as $item) { - if (Item::VIDEO == $item->getMediaType()) { - $videoUrl = $item->getVideoVersions()[0]->getUrl(); - $res = $this->downloadFile($videoUrl, 0, $thisUserImageDir); - } - } - // echo $item[0]->getVideoVersions()[0]->getUrl(); - sleep(5 * random_int(1, 10)); - $maxId = null; - // } - do { - // Request the page corresponding to maxId. - echo "\n current maxId: " . $maxId; - try { - $response = $this->ig->timeline->getUserFeed($userId, $maxId); - } catch (Exception $e) { - Log::error("current user has error, $userName, " . $e->getMessage()); - continue 2; - } - - // In this example we're simply printing the IDs of this page's items. - foreach ($response->getItems() as $item) { - switch ($item->getMediaType()) { - case Item::PHOTO: - $imageUrl = $item->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $thisUserImageDir); - $filename = $this->parseExactFileName($imageUrl); - // Ins::firstOrCreate(['image_name' => $filename], [ - // 'username' => $userName, - // 'image_url' => $imageUrl - // ]); - if ($res == 0) { - goto a; - } - break; - case Item::VIDEO: - $videoUrl = $item->getVideoVersions()[0]->getUrl(); - $res = $this->downloadFile($videoUrl, 0, $thisUserImageDir); - $filename = $this->parseExactFileName($videoUrl); - // Ins::firstOrCreate(['image_name' => $filename], [ - // 'username' => $userName, - // 'image_url' => $videoUrl - // ]); - if ($res == 0) { - goto a; - } - break; - case Item::CAROUSEL: - foreach ($item->getCarouselMedia() as $imageItem) { - $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $thisUserImageDir); - $filename = $this->parseExactFileName($imageUrl); - // Ins::firstOrCreate(['image_name' => $filename], [ - // 'username' => $userName, - // 'image_url' => $imageUrl - // ]); - if ($res == 0) { - goto a; - } - } - break; - } - - // printf("[%s] https://instagram.com/p/%s/\n", $item->getId(), $item->getCode()); - sleep(5 * random_int(1, 10)); - } - - // Now we must update the maxId variable to the "next page". - // This will be a null value again when we've reached the last page! - // And we will stop looping through pages as soon as maxId becomes null. - $maxId = $response->getNextMaxId(); - echo "\n new maxId: " . $maxId . "\n"; - - // Sleep for 5 seconds before requesting the next page. This is just an - // example of an okay sleep time. It is very important that your scripts - // always pause between requests that may run very rapidly, otherwise - // Instagram will throttle you temporarily for abusing their API! - echo "\n Sleeping for 5s...\n"; - sleep(10); - } while ($maxId !== null); // Must use "!==" for comparison instead of "!=". - a: - } - // Get the UserPK ID for "natgeo" (National Geographic). - /** - * $userId = $ig->people->getUserIdForName('nyanchan22'); - * - * // Starting at "null" means starting at the first page. - * $maxId = null; - * do { - * // Request the page corresponding to maxId. - * $response = $ig->timeline->getUserFeed($userId, $maxId); - * - * // In this example we're simply printing the IDs of this page's items. - * foreach ($response->getItems() as $item) { - * printf("[%s] https://instagram.com/p/%s/\n", $item->getId(), $item->getCode()); - * } - * - * // Now we must update the maxId variable to the "next page". - * // This will be a null value again when we've reached the last page! - * // And we will stop looping through pages as soon as maxId becomes null. - * $maxId = $response->getNextMaxId(); - * - * // Sleep for 5 seconds before requesting the next page. This is just an - * // example of an okay sleep time. It is very important that your scripts - * // always pause between requests that may run very rapidly, otherwise - * // Instagram will throttle you temporarily for abusing their API! - * echo "Sleeping for 5s...\n"; - * sleep(5); - * } while ($maxId !== null); // Must use "!==" for comparison instead of "!=". - */ - } catch (Exception $e) { - echo 'scrapeUsers something went wrong: ' . $e->getTraceAsString() . "\n"; - } - } - - public function scrapeUsersV2($start = 0, $singleUser) - { - - // $list = $ig->collection->getFeed("17906577283646940"); - // dump($list->getItems()[0]->getMedia()->getCarouselMedia());exit; - - $baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/"; - - try { - if ($singleUser == null) { - $len = Redis::connection()->llen(self::INS_USER_KEY); - $toQueryUsers = []; - if ($len < 10) { - $toQueryUsers = Redis::connection()->lrange(self::INS_USER_KEY, 0, -1); - $userList = file("/Users/shixuesen/OneDrive/Pictures/instagram/user.txt"); - shuffle($userList); - $toQueryUsers = array_merge($toQueryUsers, array_slice($userList, 0, 10 - $len)); - Redis::connection()->del(self::INS_USER_KEY); - Redis::connection()->lpush(self::INS_USER_KEY, array_slice($userList, 10 - $len)); - } else { - $toQueryUsers = Redis::connection()->lrange(self::INS_USER_KEY, 0, 9); - Redis::connection()->ltrim(self::INS_USER_KEY, 10, -1); - } - $alwaysNeedToQueryUsers = []; -// $alwaysNeedToQueryUsers = ["bonnie.90106_","jiee_wen", "hazyryu", "mikamikatn", "boram__jj", "cho_hyunyoung", "cxxsomi", "inkyung97", "na0912mi", "naughty_rabbit_", "sejinming", "zyzyxin222"]; - // "bonnie.90106_", "amy00522", "bitnara1105", "zhizhibooty", "_azhua", "exy_s2", "colin.anthony2", "7alice77", "leeesovelys2", "anran.1033", "doly0818", "siawase726", "yifei_cc", "17_chill", "shinapit46", "crissielee_", - $toQueryUsers = array_unique(array_merge($alwaysNeedToQueryUsers, $toQueryUsers)); - } else { - if (is_array($singleUser)) { - $toQueryUsers = $singleUser; - } else { - $toQueryUsers[] = $singleUser; - } - } - - // dump($toQueryUsers);exit; - - // $userList = array_slice($userList, $start, 20); - // $userList = ['1992.ai_']; - // print_r($userList);exit; - // print_r($userList); - //$userList = ["ngoctrinh89"]; - // $userList = ["_2km2km_", "2km2km", "janed_404"]; - // $userList = ["mobe_carrie0223", "na0912mi", "naughty_rabbit_", "sejinming", "zyzyxin222"]; - $userList = $toQueryUsers; - // 打乱下 - shuffle($userList); - // cherry_quahst 2928997722502282551_22834825 - // $userList = ["shinapit46"]; - - - // 跳过逻辑 - $skipUsers = ["youbastardddd", "hanna91914", "amandacerny"]; - foreach ($userList as $userName) { - if (in_array($userName, $skipUsers)) { - continue; - } - $trueName = trim($userName); - // echo $trueName;exit; - - $thisUserImageDir = $baseImageDir . $trueName . DIRECTORY_SEPARATOR; - if (!is_dir($thisUserImageDir)) { - mkdir($thisUserImageDir); - } - // echo "open $thisUserImageDir \n"; - // shell_exec("open -g '$thisUserImageDir'"); - // sleep(1*60); - - if (array_key_exists($trueName, $this->userAliasMap)) { - $trueName = trim($this->userAliasMap[$trueName]); - } - - // $existFiles = $this->traceExistFiles($thisUserImageDir); - // try { - // $userId = $this->ig->people->getUserIdForName(trim($userName)); - // } catch (Exception $e) { - // // if ($e instanceof UserNotFou) - // Log::error("ins get user id for name error: " . $e->getMessage() . " username is " . $userName); - // $userId = null; - // if (array_key_exists(trim($userName), $this->userList)) { - // $userId = Arr::get($this->userList, trim($userName)); - // } - // if ($userId == null) { - // continue; - // } - // // continue; - // } - $userId = Arr::get($this->userListNew, trim($trueName)); - if ($userId == null) { - $userId = Arr::get($this->userList, trim($trueName)); - if ($userId == null) { - echo "{$trueName} id is null"; - continue; - // exit; - } - } - echo "\n username: " . $trueName . " " . $userId . "\n"; - // continue; - - // if ($trueName == 'sabrina888888_') { - // echo "\n______________________\n"; - // $maxId = '1451179182821586881_19900699'; - // } else { - - $maxId = null; - // } - $count = 0; - $existCount = 0; - do { - // Request the page corresponding to maxId. - echo "\n current maxId: " . $maxId; - try { - $response = $this->userFeed($userId, $maxId); - } catch (Exception $e) { - Log::error("current user has error, $userName, " . $e->getMessage()); - if (str_contains($e->getMessage(), "400 Bad Request")) { - exit; - } - continue 2; - } - // In this example we're simply printing the IDs of this page's items. - foreach ($response->getItems() as $item) { - switch ($item->getMediaType()) { - case Item::PHOTO: - $imageUrl = $item->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $thisUserImageDir); - $filename = $this->parseExactFileName($imageUrl); - // Ins::firstOrCreate(['image_name' => $filename], [ - // 'username' => $userName, - // 'image_url' => $imageUrl - // ]); - if ($res == 0) { - $existCount++; - // goto a; - } - break; - case Item::VIDEO: - $videoUrl = $item->getVideoVersions()[0]->getUrl(); - $res = $this->downloadFile($videoUrl, 0, $thisUserImageDir); - $filename = $this->parseExactFileName($videoUrl); - // Ins::firstOrCreate(['image_name' => $filename], [ - // 'username' => $userName, - // 'image_url' => $videoUrl - // ]); - if ($res == 0) { - $existCount++; - // goto a; - } - break; - case Item::CAROUSEL: - foreach ($item->getCarouselMedia() as $imageItem) { - $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $thisUserImageDir); - $filename = $this->parseExactFileName($imageUrl); - // Ins::firstOrCreate(['image_name' => $filename], [ - // 'username' => $userName, - // 'image_url' => $imageUrl - // ]); - if ($res == 0) { - $existCount++; - // goto a; - } - } - break; - } - - // printf("[%s] https://instagram.com/p/%s/\n", $item->getId(), $item->getCode()); - sleep(1 * random_int(1, 10)); - $count++; - } - - // Now we must update the maxId variable to the "next page". - // This will be a null value again when we've reached the last page! - // And we will stop looping through pages as soon as maxId becomes null. - if ($singleUser != null || (is_array($singleUser) && count($singleUser) > 0)) { - if ($count - $existCount > 200 ) { - // || $count > (50 + random_int(0, 20)) - Log::info("new count bigger than 100", ['user' => $trueName]); - goto a; - } - } else { - if ($count > (20 + random_int(0, 20)) || $count - $existCount > 10) { - goto a; - } - } - $maxId = $response->getNextMaxId(); - echo "\n new maxId: " . $maxId . "\n"; - - // Sleep for 5 seconds before requesting the next page. This is just an - // example of an okay sleep time. It is very important that your scripts - // always pause between requests that may run very rapidly, otherwise - // Instagram will throttle you temporarily for abusing their API! - echo "\n Sleeping for 5s...\n"; - sleep(10); - } while ($maxId !== null); // Must use "!==" for comparison instead of "!=". - a: - } - // Get the UserPK ID for "natgeo" (National Geographic). - /** - * $userId = $ig->people->getUserIdForName('nyanchan22'); - * - * // Starting at "null" means starting at the first page. - * $maxId = null; - * do { - * // Request the page corresponding to maxId. - * $response = $ig->timeline->getUserFeed($userId, $maxId); - * - * // In this example we're simply printing the IDs of this page's items. - * foreach ($response->getItems() as $item) { - * printf("[%s] https://instagram.com/p/%s/\n", $item->getId(), $item->getCode()); - * } - * - * // Now we must update the maxId variable to the "next page". - * // This will be a null value again when we've reached the last page! - * // And we will stop looping through pages as soon as maxId becomes null. - * $maxId = $response->getNextMaxId(); - * - * // Sleep for 5 seconds before requesting the next page. This is just an - * // example of an okay sleep time. It is very important that your scripts - * // always pause between requests that may run very rapidly, otherwise - * // Instagram will throttle you temporarily for abusing their API! - * echo "Sleeping for 5s...\n"; - * sleep(5); - * } while ($maxId !== null); // Must use "!==" for comparison instead of "!=". - */ - } catch (Exception $e) { - echo 'scrapeUsers something went wrong: ' . $e->getTraceAsString() . "\n"; - } - } - - public function scrapeUsersInFile($file) - { - - $baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/"; - - try { - - $userList = file($file); - foreach ($userList as $userName) { - $trueName = trim($userName); - $thisUserImageDir = $baseImageDir . $trueName . DIRECTORY_SEPARATOR; - if (!is_dir($thisUserImageDir)) { - mkdir($thisUserImageDir); - } - try { - $userId = $this->ig->people->getUserIdForName(trim($userName)); - } catch (Exception $e) { - // if ($e instanceof UserNotFou) - Log::error("ins get user id for name error: " . $e->getMessage() . " username is " . $userName); - $userId = null; - if (array_key_exists(trim($userName), $this->userList)) { - $userId = Arr::get($userList, trim($userName)); - } - if ($userId == null) { - continue; - } - } - echo "\n username: " . $trueName . " " . $userId . "\n"; - - try { - $response = $this->ig->story->getUserReelMediaFeed($userId); - } catch (Exception $e) { - Log::error("current user has error, $userName, " . $e->getMessage()); - } - foreach ($response->getItems() as $item) { - if (Item::VIDEO == $item->getMediaType()) { - $videoUrl = $item->getVideoVersions()[0]->getUrl(); - $res = $this->downloadFile($videoUrl, 0, $thisUserImageDir); - } - } - $userItemNum = 0; - sleep(5 * random_int(1, 10)); - $maxId = null; - do { - // Request the page corresponding to maxId. - echo "\n current maxId: " . $maxId; - try { - $response = $this->ig->timeline->getUserFeed($userId, $maxId); - } catch (Exception $e) { - Log::error("current user has error, $userName, " . $e->getMessage()); - continue 2; - } - - // In this example we're simply printing the IDs of this page's items. - foreach ($response->getItems() as $item) { - switch ($item->getMediaType()) { - case Item::PHOTO: - $imageUrl = $item->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $thisUserImageDir); - break; - case Item::VIDEO: - $videoUrl = $item->getVideoVersions()[0]->getUrl(); - $res = $this->downloadFile($videoUrl, 0, $thisUserImageDir); - break; - case Item::CAROUSEL: - foreach ($item->getCarouselMedia() as $imageItem) { - $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $thisUserImageDir); - } - break; - } - - sleep(5 * random_int(1, 10)); - $userItemNum++; - if ($userItemNum > 5500) { - break; - } - } - - // Now we must update the maxId variable to the "next page". - // This will be a null value again when we've reached the last page! - // And we will stop looping through pages as soon as maxId becomes null. - $maxId = $response->getNextMaxId(); - echo "\n new maxId: " . $maxId . "\n"; - - // Sleep for 5 seconds before requesting the next page. This is just an - // example of an okay sleep time. It is very important that your scripts - // always pause between requests that may run very rapidly, otherwise - // Instagram will throttle you temporarily for abusing their API! - echo "\n Sleeping for 5s...\n"; - sleep(10); - } while ($maxId !== null); // Must use "!==" for comparison instead of "!=". - a: - } - // Get the UserPK ID for "natgeo" (National Geographic). - /** - * $userId = $ig->people->getUserIdForName('nyanchan22'); - * - * // Starting at "null" means starting at the first page. - * $maxId = null; - * do { - * // Request the page corresponding to maxId. - * $response = $ig->timeline->getUserFeed($userId, $maxId); - * - * // In this example we're simply printing the IDs of this page's items. - * foreach ($response->getItems() as $item) { - * printf("[%s] https://instagram.com/p/%s/\n", $item->getId(), $item->getCode()); - * } - * - * // Now we must update the maxId variable to the "next page". - * // This will be a null value again when we've reached the last page! - * // And we will stop looping through pages as soon as maxId becomes null. - * $maxId = $response->getNextMaxId(); - * - * // Sleep for 5 seconds before requesting the next page. This is just an - * // example of an okay sleep time. It is very important that your scripts - * // always pause between requests that may run very rapidly, otherwise - * // Instagram will throttle you temporarily for abusing their API! - * echo "Sleeping for 5s...\n"; - * sleep(5); - * } while ($maxId !== null); // Must use "!==" for comparison instead of "!=". - */ - } catch (Exception $e) { - echo 'scrapeUsers something went wrong: ' . $e->getTraceAsString() . "\n"; - } - } - - public function scrapeCollection() - { - - // dump($list->getItems()[0]->getMedia()->getCarouselMedia()); - - $collectImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/collect/"; - - $maxId = null; - // } - do { - // Request the page corresponding to maxId. - echo "\n current maxId: " . $maxId; - $response = $this->ig->collection->getFeed("17906577283646940", $maxId); - // In this example we're simply printing the IDs of this page's items. - foreach ($response->getItems() as $item) { - $userFullName = str_replace("/", "", $item->getMedia()->getUser()->getFullName()); - switch ($item->getMedia()->getMediaType()) { - case Item::PHOTO: - $imageUrl = $item->getMedia()->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $collectImageDir, $userFullName . "-"); - $filename = $this->parseExactFileName($imageUrl); - // Ins::firstOrCreate(['image_name' => $filename], [ - // 'username' => $userName, - // 'image_url' => $imageUrl - // ]); - if ($res == 0) { - return; - } - break; - case Item::VIDEO: - $videoUrl = $item->getMedia()->getVideoVersions()[0]->getUrl(); - $res = $this->downloadFile($videoUrl, 0, $collectImageDir, $userFullName . "-"); - $filename = $this->parseExactFileName($videoUrl); - // Ins::firstOrCreate(['image_name' => $filename], [ - // 'username' => $userName, - // 'image_url' => $videoUrl - // ]); - if ($res == 0) { - return; - } - break; - case Item::CAROUSEL: - foreach ($item->getMedia()->getCarouselMedia() as $imageItem) { - $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); - $res = $this->downloadFile($imageUrl, 0, $collectImageDir, $userFullName . "-"); - $filename = $this->parseExactFileName($imageUrl); - // Ins::firstOrCreate(['image_name' => $filename], [ - // 'username' => $userName, - // 'image_url' => $imageUrl - // ]); - if ($res == 0) { - return; - } - } - break; - } - - // printf("[%s] https://instagram.com/p/%s/\n", $item->getId(), $item->getCode()); - sleep(5 * random_int(1, 10)); - } - echo "\n Sleeping for 5s...\n"; - sleep(10); - } while ($maxId !== null); - } - - public function scanLocalFiles($baseDir = '/Users/shixuesen/OneDrive/Pictures/instagram/') - { - $dirs = scandir($baseDir, 1); - foreach ($dirs as $subDir) { - if ($subDir == '.' || $subDir == '..') { - continue; - } - $subPath = $baseDir . $subDir; - if (is_dir($subPath)) { - $files = scandir($subPath); - foreach ($files as $file) { - if ($file == '.' || $file == '..') { - continue; - } - echo "now file: " . $file . "\n"; - Ins::firstOrCreate(['image_name' => $file], [ - 'username' => $subDir, - 'is_uploaded' => 1, - 'image_url' => '' - ]); - } - } - } - } - - public function testNewApi() - { - } - - public function getUserNameById($id = 13305603901) - { - $ig = new Instagram($this->debug, $this->truncatedDebug); - - try { - $ig->login($this->username, $this->password); - } catch (Exception $e) { - echo 'Something went wrong: ' . $e->getMessage() . "\n"; - exit(0); - } - - dump($ig->people->getInfoById($id)); - exit; - $response = $ig->user->getUserFeed('6794713533', null); - // $response = $ig->story->getUserReelMediaFeed('12801506409'); - dump($response); - exit; - - $rankToken = \InstagramAPI\Signatures::generateUUID(); - $res = $ig->people->getSelfFollowing($rankToken); - Log::info($res->asJson()); - dump($res); - exit; - $users = $res->getUsers(); - foreach ($users as $user) { - Log::info(json_encode($user->getUserId())); - if ($user->getPk() == '12801506409' || $user->getUserId() == '12801506409') { - dump($user); - } - } - } - - public function queryFollowUsers() - { - $params = []; - $params["id"] = 13305603901; - $params["include_reel"] = true; - $params["first"] = 12; - $params["fetch_mutual"] = false; - $var = json_encode($params); - - $curl = curl_init(); - - curl_setopt_array($curl, array( - CURLOPT_URL => "https://www.instagram.com/graphql/query/?query_hash=d04b0a864b4b54837c0d870b0e77e076&variables=$var", - CURLOPT_RETURNTRANSFER => true, - CURLOPT_ENCODING => "", - CURLOPT_MAXREDIRS => 10, - CURLOPT_TIMEOUT => 0, - CURLOPT_FOLLOWLOCATION => true, - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, - CURLOPT_CUSTOMREQUEST => "GET", - CURLOPT_HTTPHEADER => array( - "authority: www.instagram.com", - "pragma: no-cache", - "cache-control: no-cache", - "accept: */*", - "x-ig-www-claim: hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvNm6", - "x-requested-with: XMLHttpRequest", - "user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36", - "x-csrftoken: 7WVPjhWHhNqm2h1wcnslDgdkJJ9Ahqc6", - "x-ig-app-id: 936619743392459", - "sec-fetch-site: same-origin", - "sec-fetch-mode: cors", - "referer: https://www.instagram.com/nicksxs/following/", - "accept-encoding: gzip, deflate, br", - "accept-language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6,ja;q=0.5", - "cookie: mid=XPJbKwAEAAEjcIilinpyKblsZqyx; fbm_124024574287414=base_domain=.instagram.com; ig_cb=1; ig_did=398CBD62-5C55-40BF-B917-0972BEE47035; csrftoken=7WVPjhWHhNqm2h1wcnslDgdkJJ9Ahqc6; ds_user_id=361404591; sessionid=361404591%3AJSLulZCziyeBSQ%3A5; shbid=13796; shbts=1581407718.4487948; rur=PRN; urlgen=\"{\"2607:fcd0:100:4600::5:d6c0\": 8100}:1j1Qy8:f8y9XAMkFUmNt5rl-hcF2hx9-74\"" - ), - )); - - $response = curl_exec($curl); - - curl_close($curl); - echo $response; - } - - public function commonRequest($url = "https://www.instagram.com/graphql/query/", $params = []) - { - $header = [ - "authority" => "www.instagram.com", - "pragma" => "no-cache", - "cache-control" => "no-cache", - "accept" => "*/*", - "x-ig-www-claim" => "hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvNm6", - "x-requested-with" => "XMLHttpRequest", - "user-agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36", - "x-csrftoken" => "7WVPjhWHhNqm2h1wcnslDgdkJJ9Ahqc6", - "x-ig-app-id" => "936619743392459", - "sec-fetch-site" => "same-origin", - "sec-fetch-mode" => "cors", - "referer" => "https://www.instagram.com/nicksxs/following/", - "accept-encoding" => "gzip, deflate, br", - "accept-language" => "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6,ja;q=0.5", - // "cookie" => " mid=XPJbKwAEAAEjcIilinpyKblsZqyx; fbm_124024574287414=base_domain=.instagram.com; ig_cb=1; ig_did=398CBD62-5C55-40BF-B917-0972BEE47035; csrftoken=7WVPjhWHhNqm2h1wcnslDgdkJJ9Ahqc6; ds_user_id=361404591; sessionid=361404591%3AJSLulZCziyeBSQ%3A5; shbid=13796; shbts=1581407718.4487948; rur=PRN; urlgen=\"{\"2607:fcd0:100:4600::5:d6c0\": 8100}:1j1Qy8:f8y9XAMkFUmNt5rl-hcF2hx9-74\"" - ]; - - - $cookieJar = CookieJar::fromArray([ - 'sessionid' => '361404591%3Ab13E3MH2Eis7QW%3A13', - 'ds_user_id' => '361404591', - 'ig_did' => '4B0E363A-C65C-4311-8117-CD49993B46F3', - 'mid' => 'Xi2DdwAEAAFfFk6izuuXW0tMPSEx', - 'rur' => 'PRN', - 'shbid' => '13796', - 'shbts' => '1581259038.7557411', - 'urlgen' => '"{\"152.32.187.149\": 135377}:1j1sXK:mckgvU-Hvlbl4BuOgZrh21n1bjQ"' - ], '.instagram.com'); - $params = []; - $params["id"] = 361404591; - $params["include_reel"] = true; - $params["first"] = 12; - $params["fetch_mutual"] = false; - $var = json_encode($params); - // echo $var; - $query = [ - "variables" => $var, - "query_hash" => "d04b0a864b4b54837c0d870b0e77e076" - ]; - // $url = $url . "?query_hash=d04b0a864b4b54837c0d870b0e77e076&variables=$var"; - dump($url); - $request = new Client(); - $res = $request->request( - "GET", - $url, - [ - "headers" => $header, - "query" => $query, - "cookies" => $cookieJar, - 'proxy' => [ - 'http' => 'http://127.0.0.1:1087', // Use this proxy with "http" - 'https' => 'http://127.0.0.1:1087', // Use this proxy with "https", - ], - 'timeout' => 2000, - 'http_errors' => true - ] - ); - $follow = json_decode($res->getBody()->getContents(), true)["data"]["user"]["edge_follow"]; - $pageInfo = $follow["page_info"]; - while ($pageInfo["has_next_page"]) { - $users = $follow["edges"]; - foreach ($users as $user) { - echo $user["node"]["username"]; - echo " \t"; - echo $user["node"]["id"]; - echo "\n"; - } - $params["after"] = $pageInfo["end_cursor"]; - $var = json_encode($params); - // echo $var; - $query = [ - "variables" => $var, - "query_hash" => "d04b0a864b4b54837c0d870b0e77e076" - ]; - $res = $request->request( - "GET", - $url, - [ - "headers" => $header, - "query" => $query, - "cookies" => $cookieJar, - 'proxy' => [ - 'http' => 'http://127.0.0.1:1087', // Use this proxy with "http" - 'https' => 'http://127.0.0.1:1087', // Use this proxy with "https", - ], - 'timeout' => 2000, - 'http_errors' => true - ] - ); - $follow = json_decode($res->getBody()->getContents(), true)["data"]["user"]["edge_follow"]; - $pageInfo = $follow["page_info"]; - } - - exit; - while (count($res->getBody()->getContents()) > 0) { - $data = json_decode($res->getBody()->getContents()); - dump($data); - exit; - } - // dump($res->getBody()->getContents()); - } - - - public function singleQuery($maxId = null) - { - - - $curl = curl_init(); - - $postFields = "device_id=99BFED75-73D9-415E-90D3-7A5F7B1EC00A&is_async_ads_rti=0&is_async_ads_double_request=0&rti_delivery_backend=0&is_async_ads_in_headload_enabled=0"; - if ($maxId != null) { - $postFields .= "&max_id={$maxId}"; - } - - curl_setopt_array($curl, array( - CURLOPT_URL => 'https://i.instagram.com/api/v1/feed/timeline/', - CURLOPT_RETURNTRANSFER => true, - CURLOPT_ENCODING => '', - CURLOPT_MAXREDIRS => 10, - CURLOPT_TIMEOUT => 0, - CURLOPT_FOLLOWLOCATION => true, - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, - CURLOPT_CUSTOMREQUEST => 'POST', - CURLOPT_POSTFIELDS => 'device_id=99BFED75-73D9-415E-90D3-7A5F7B1EC00A&is_async_ads_rti=0&is_async_ads_double_request=0&rti_delivery_backend=0&is_async_ads_in_headload_enabled=0', - CURLOPT_HTTPHEADER => array( - 'authority: i.instagram.com', - 'accept: */*', - 'accept-language: zh-CN,zh;q=0.9', - 'cache-control: no-cache', - 'content-type: application/x-www-form-urlencoded', - 'cookie: ig_did=99BFED75-73D9-415E-90D3-7A5F7B1EC00A; mid=X8CXRQAEAAHx-Hj80MJnsfNCB0yg; datr=NQfTX4X4dXyNB64vmn-0iRCP; fbm_124024574287414=base_domain=.instagram.com; dpr=2; shbid="10286\\054361404591\\0541692883356:01f777d3b0318164b2056c2bfe376b92ee0f3bd65651a75dbb9efe2f00b9a09b8cf87de5"; shbts="1661347356\\054361404591\\0541692883356:01f725828117d2dd4571a5a9cc6824c7b0d6da88565a31a1e1fa30e4eed7454aba4ca7a9"; ig_nrcb=1; fbsr_124024574287414=NbdGv2d7ug1fHkWPQX9KvTvNgDIHKD3yPGm1WrJGb4Q.eyJ1c2VyX2lkIjoiMTAwMDA3ODU5ODI1MDQ3IiwiY29kZSI6IkFRQjdrdkdYNUJydjdoZjJCR05IUkxmSjhQRHp6eFEweV9jb2RpNlI0LVA2SkVtY09kYmNrSFp0RjNJRTN3Qy1oLUIxUEtmdWdrREs0MktsVThONC1WTU5OaXVkNmw2bjhnTHVSV2pqNGVCVnhsakFKRGxoVGN3SUxHbnl6TWJmV0dRc2otVExQOWVpYnRtaURWcUdsU1F1WFVLYy1xb2U5V1huZThHRzNtcE5NZ0JhajZJdlZBU0NXMlZCOHlzbEFnX0pTbDJYaW9tNDJELTVrQUtyZ2FqWWNoM3dIakJiYnE1UFloLVZLV1hhMzMzV0RuSjNwa3FJSE5xWVoySlhPUnB6SzdGUjU0cEY4anRpemtEczRCdzB4WFo3TW5TcHJseXBXRFc3aXhPZk9sQTFNalRtcmVfUE5LUVIzRnhSRUctVFV5cGdWTWlJTExJRXNKVEU5RDlwM00xczRBNGdvemVWTnZlUm5HRmgzUSIsIm9hdXRoX3Rva2VuIjoiRUFBQnd6TGl4bmpZQkFISWF2MDVQT2pYZVJ2Y2drb2dKWG1tUDhlVmdTSEtmcFpDNzZUZVFYNWRWNGFBRGtoWkNWVndJbkRjbGlsSTY5dWdFamdaQnBSMERRTktaQTFMNG5sYXVMWEVaQlpBYkNBc3NhQ1VTZndlZVBFZnloeDJEVGRPTndoUkc0QklVVVJMdktkWkF6U09ZOG1aQ1lIR09BMG9sZ3E3Z21tWWQ5MWw3blBWRUJxYlYiLCJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTY2MTM0NzY1NH0; csrftoken=RZ4aR37h1k5a4thauO540jYPC1PHMxpT; ds_user_id=361404591; sessionid=361404591%3AdI1lmFVKUX5Eyr%3A2%3AAYcSUb4ZjzfjCR7fqCv4MkVctQKvRORGqJDsSnSbLA; rur="NAO\\054361404591\\0541692884140:01f70fc499d6201617e6527e35d1766f8875763f8660a227e69d1c4be3f73e904792e26e"; csrftoken=RZ4aR37h1k5a4thauO540jYPC1PHMxpT; ds_user_id=361404591; rur="EAG\\054361404591\\0541693637104:01f71dc22d7bf4c3c3367f9143da42875838ba34a32e2c05e89572507b0b4c7df62747bf"; sessionid=361404591%3AdI1lmFVKUX5Eyr%3A2%3AAYd8jd8ZwMOSkDqkM406F8NTFZLiIYF7Wc94MzihCw; shbid="10286\\054361404591\\0541693479894:01f73478e70722195fc8655bf88cc407737b830952f250b7406f58c2b6229827d52b1f72"; shbts="1661943894\\054361404591\\0541693479894:01f71f5d0af6912af5933020471b91959ecaf1a06e0ce7156af9778097698cce0cdc8459"', - 'origin: https://www.instagram.com', - 'pragma: no-cache', - 'referer: https://www.instagram.com/', - 'sec-ch-ua: "Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104"', - 'sec-ch-ua-mobile: ?0', - 'sec-ch-ua-platform: "macOS"', - 'sec-fetch-dest: empty', - 'sec-fetch-mode: cors', - 'sec-fetch-site: same-site', - 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36', - 'x-asbd-id: 198387', - 'x-csrftoken: RZ4aR37h1k5a4thauO540jYPC1PHMxpT', - 'x-ig-app-id: 936619743392459', - 'x-ig-www-claim: hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvKG5', - 'x-instagram-ajax: 1006083216' - ), - )); - - $response = curl_exec($curl); - - curl_close($curl); - return $response; - } - - public function queryTimeLineSingle($maxId) - { - $client = new Client(); - $headers = [ - 'authority' => 'www.instagram.com', - 'accept' => '*/*', - 'accept-language' => 'zh-CN,zh;q=0.9', - 'cache-control' => 'no-cache', - 'content-type' => 'application/x-www-form-urlencoded', - 'cookie' => 'ig_did=1E87B96C-B061-484F-89A8-C76BF8E11C52; ig_nrcb=1; mid=Y0QEJQAEAAGK3xW8v5Uwszo_cBzM; datr=qAREY1W0Mocw3OoikuJcsL1c; ds_user_id=361404591; dpr=2; csrftoken=CFl1Ud94y0bme7hQP8Uvp8Xl4sKcFViX; shbid="16067\\054361404591\\0541716949395:01f70eef8d26bcb8f7f993fc31a064d0ee750f7e2b3649a97f4749d0bcd9f95d657910dc"; shbts="1685413395\\054361404591\\0541716949395:01f7e9d7690bc741b7e96b090605dad786de17d15651400beab2a35ea38e28ded2f59495"; sessionid=361404591%3AfFydERGFX9GaEm%3A10%3AAYc8JRCrHUvc9fh9IM2HBM5cX6oontDKzd6Ea01oMA; fbm_124024574287414=base_domain=.instagram.com; fbsr_124024574287414=L9kVkvYFJVPwU5BRVImtTBmcvaV1dkQ0ydKNAcOEhZ8.eyJ1c2VyX2lkIjoiMTAwMDA3ODU5ODI1MDQ3IiwiY29kZSI6IkFRQXp0UzBiQTVnYnNBSl9pNW1Dd01idS1rbEZuRENvTHZqRnpkNFplR01qb1FZekRDS3BQY3huZGpYSU04NzltM3hwQnZkbFhQbEh5cFlLMU5USEJ4RnV6ejZEZFN2MFREejhWdHd1dF85MHAtWEdEVENfZDhpdEpKM3JPY1ptLS1KSHNROXJIemtuZkFyNE5SdFpRY19RNUJSd2lGZmRndUd2MUFXU3ZOSFV1RW40TUE0d1hKYm5ZMV80WjFzNktGdEZ3UXVDR3MwUGdIOFQ2QnltQ0lzeGh6NHA2UWgtdlp0VGFoR0Q1VlBMZ1hqZG9fVDM4bE9xREs4SzYzX1dlZ3JySno0S2dCMkRXdlJuUGc1OTRqcXU5WGlUNUFMbURhbUMxdjFlYlVFQnA2S20ta2drYmdPMXMxR2JIQmEzbEw3OS0zelNreUVmekF3X2NsVUdsYTFSIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCQUhJcWNmdFBBRkhNcDZuVlU4ZDVSaWs1WkFCYWtUN3NTUE1VWkN2WkE2cHNxWkFZQ21sWXF6YUQ1Tk5GQTNUa0JSQjcxTmxTWHhRZTVVSEEzdm9CbGlsODJ3ZFVxMjZnZm91TUxTVWFucDNCejlpaDlFRFhGT1RnaEN0SnVEbGE3clpCbnNIWElqMGlCbnNMMUhOSzZ3Z0FaQ25jOVY3TVpDWkFJaVpCQU9BbHRLNDRkZzVuYkVUQVpEIiwiYWxnb3JpdGhtIjoiSE1BQy1TSEEyNTYiLCJpc3N1ZWRfYXQiOjE2ODU0MTM4ODZ9; rur="NAO\\054361404591\\0541716949889:01f7a134fbbef26c1e76c0c6ed205588018f90a91254d1626ab18e1df4c3a418faa2853b"', - 'origin' => 'https://www.instagram.com', - 'pragma' => 'no-cache', - 'referer' => 'https://www.instagram.com/', - 'sec-ch-prefers-color-scheme' => 'light', - 'sec-ch-ua' => '"Chromium";v="112", "Google Chrome";v="112", "Not:A-Brand";v="99"', - 'sec-ch-ua-full-version-list' => '"Chromium";v="112.0.5615.137", "Google Chrome";v="112.0.5615.137", "Not:A-Brand";v="99.0.0.0"', - 'sec-ch-ua-mobile' => '?0', - 'sec-ch-ua-platform' => '"macOS"', - 'sec-ch-ua-platform-version' => '"12.6.0"', - 'sec-fetch-dest' => 'empty', - 'sec-fetch-mode' => 'cors', - 'sec-fetch-site' => 'same-origin', - 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36', - 'viewport-width' => '1512', - 'x-asbd-id' => '129477', - 'x-csrftoken' => 'CFl1Ud94y0bme7hQP8Uvp8Xl4sKcFViX', - 'x-ig-app-id' => '936619743392459', - 'x-ig-www-claim' => 'hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvCTz', - 'x-instagram-ajax' => '1007579192', - 'x-requested-with' => 'XMLHttpRequest' - ]; - $options = [ - 'form_params' => [ - 'device_id' => '1E87B96C-B061-484F-89A8-C76BF8E11C52', - 'is_async_ads_rti' => '0', - 'is_async_ads_double_request' => '0', - 'rti_delivery_backend' => '0', - 'is_async_ads_in_headload_enabled' => '0' - ] - ]; - if ($maxId != null) { - $options["form_params"]["max_id"] = $maxId; - } - $request = new Request('POST', 'https://i.instagram.com/api/v1/feed/timeline/', $headers); - $res = $client->sendAsync($request, $options)->wait(); - $resStr = $res->getBody(); - // echo $resStr; - $jsonArray = @json_decode($resStr, true, 512, JSON_BIGINT_AS_STRING); - $response = new Response\TimelineFeedResponse(); - $response->assignObjectData($jsonArray); - return $response; - } - - public function nextTimeLine() - { - $client = new Client(); - $headers = [ - 'authority' => 'i.instagram.com', - 'accept' => '*/*', - 'accept-language' => 'zh-CN,zh;q=0.9', - 'cache-control' => 'no-cache', - 'content-type' => 'application/x-www-form-urlencoded', - 'cookie' => 'ig_did=1E87B96C-B061-484F-89A8-C76BF8E11C52; ig_nrcb=1; mid=Y0QEJQAEAAGK3xW8v5Uwszo_cBzM; csrftoken=dLe4oZbHolS34IhgbfD6NRaoJ4iilQVM; sessionid=361404591%3A5sOqwyqflJD2pc%3A21%3AAYfM2Z-qqhcSIn4rPP8fQyQwu9PZ03KGjL3wnqW60Q; ds_user_id=361404591; shbid="10286\\054361404591\\0541696938018:01f7596ca6fe3cd1740fef8fecf08fd17c2910140fae26ccb6e274ff56b223f6316d8ee2"; shbts="1665402018\\054361404591\\0541696938018:01f7855bda173a37fd66003ff0e80976169aeaca910868996e5b6fe361db529bc7b913e9"; dpr=2; datr=qAREY1W0Mocw3OoikuJcsL1c; rur="NAO\\054361404591\\0541696938731:01f783e7af0d153ff3c72cecb09542e1984f6259569a1f51923d4e57004fdcef667f7ee8"', - 'origin' => 'https://www.instagram.com', - 'pragma' => 'no-cache', - 'referer' => 'https://www.instagram.com/', - 'sec-ch-ua' => '"Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99"', - 'sec-ch-ua-mobile' => '?0', - 'sec-ch-ua-platform' => '"macOS"', - 'sec-fetch-dest' => 'empty', - 'sec-fetch-mode' => 'cors', - 'sec-fetch-site' => 'same-site', - 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36', - 'x-asbd-id' => '198387', - 'x-csrftoken' => 'dLe4oZbHolS34IhgbfD6NRaoJ4iilQVM', - 'x-ig-app-id' => '936619743392459', - 'x-ig-www-claim' => 'hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvHHD', - 'x-instagram-ajax' => '1006356620' - ]; - $options = [ - 'form_params' => [ - 'device_id' => '1E87B96C-B061-484F-89A8-C76BF8E11C52', - 'is_async_ads_rti' => '0', - 'is_async_ads_double_request' => '0', - 'rti_delivery_backend' => '0', - 'is_async_ads_in_headload_enabled' => '0', - 'max_id' => 'KHIBEAAgASgAGAAQABAACAAIAAgAe__f____3___9__95__f5____v____3__0_8_3____7_93-_thjntDvZU_uUd_a_fvv_-9_zf_____7_v_-_-f____373_--_dv_f_3_________v_7vyosoHiB0AQAWzumRm_hgRgQpBBkEIjIA', - // 'feed_view_info' => '[{"media_id":"2944578362761275568_50897922219","media_pct":1,"time_info":{"10":475,"25":475,"50":475,"75":475},"version":24}]' - ] - ]; - $request = new Request('POST', 'https://i.instagram.com/api/v1/feed/timeline/', $headers); - $res = $client->sendAsync($request, $options)->wait(); - echo $res->getBody(); - } - - public function userFeed($userId, $maxId): Response\UserFeedResponse - { - - $client = new Client(); - $headers = [ - 'authority' => 'www.instagram.com', - 'accept' => '*/*', - 'accept-language' => 'zh-CN,zh;q=0.9', - 'cache-control' => 'no-cache', - 'cookie' => 'ig_did=1E87B96C-B061-484F-89A8-C76BF8E11C52; ig_nrcb=1; mid=Y0QEJQAEAAGK3xW8v5Uwszo_cBzM; datr=qAREY1W0Mocw3OoikuJcsL1c; ds_user_id=361404591; dpr=2; csrftoken=CFl1Ud94y0bme7hQP8Uvp8Xl4sKcFViX; shbid="16067\\054361404591\\0541716949395:01f70eef8d26bcb8f7f993fc31a064d0ee750f7e2b3649a97f4749d0bcd9f95d657910dc"; shbts="1685413395\\054361404591\\0541716949395:01f7e9d7690bc741b7e96b090605dad786de17d15651400beab2a35ea38e28ded2f59495"; sessionid=361404591%3AfFydERGFX9GaEm%3A10%3AAYc8JRCrHUvc9fh9IM2HBM5cX6oontDKzd6Ea01oMA; fbm_124024574287414=base_domain=.instagram.com; fbsr_124024574287414=5BhPy3xcwHNWy1YFi8Wok9t4T5MmacABKqStGCMBouI.eyJ1c2VyX2lkIjoiMTAwMDA3ODU5ODI1MDQ3IiwiY29kZSI6IkFRQ2drOGExb05lZXNUb1JBQzBteG4xV3JoQUVyYXQyR0RJczdnRlUwYXlVdVlGTkFBNlZiMTBWNC1aUDJKaDdTSkVLS1pwTDN2bHkxZG9UVTVpSXhQcHB0bU15QXhiMWN6MjVjdm9jTDBZSTlKdENoRDhWU3o0aERGaVRqS3FRQUdaNWJ6NG9laVFzU0ZkRDFMdm5iTndoajR1OS1jLW5GLXZXaDVKb0dIbUY1VENqNTM4aDJNYzRaQ2VQNjlLb0xJTExrMm5RYVBLNVIxUDljWDZrUzEySlJvTmtPQlpJNDM0S2RQN2ozVnhpelRRRU5uVUhlM09BYm16WUdIM3ZNUTlxR3ZNSm51UHdXbDBIZVF6U1ltUmt5OS1iRU1ueFZyb3hMR0pIOW1hOXYzb21VNURvMXhCMWJ4c094enJOZjRqQXpBSHBOazJuOGJpRkpmalVidlVMIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCQU05R2NQTlBXb2pQNkE5Umh0UTF5RVNDSWVSVVBUQ01mRkw2cXBockhqQUFrdzdVdzB6ME11RjQ0WVpBNTc1Nmo4cXJzbnFtemZVVGk4UVpDdjlaQXlTQ0taQWFyalpBSnVaQUpLMFpBanVFa3Z2VndMbVdWa05WWExHMnRtQTNVZjFlWkJYeUxmQTVOUjI5THYzVTdIYW1pWkNDUnh4R1JxNVVsYm03cVlyZWhSWkNSQTYyanhKVDBaRCIsImFsZ29yaXRobSI6IkhNQUMtU0hBMjU2IiwiaXNzdWVkX2F0IjoxNjg1NDEzNDAxfQ; rur="NAO\\054361404591\\0541716949402:01f7509be66ac75e565c9d7c696b9b0dbd0250d0cc7339c745db84662c633f6d9aa2b055"', - 'pragma' => 'no-cache', - 'referer' => 'https://www.instagram.com/cho_hyunyoung/', - 'sec-ch-prefers-color-scheme' => 'light', - 'sec-ch-ua' => '"Chromium";v="112", "Google Chrome";v="112", "Not:A-Brand";v="99"', - 'sec-ch-ua-full-version-list' => '"Chromium";v="112.0.5615.137", "Google Chrome";v="112.0.5615.137", "Not:A-Brand";v="99.0.0.0"', - 'sec-ch-ua-mobile' => '?0', - 'sec-ch-ua-platform' => '"macOS"', - 'sec-ch-ua-platform-version' => '"12.6.0"', - 'sec-fetch-dest' => 'empty', - 'sec-fetch-mode' => 'cors', - 'sec-fetch-site' => 'same-origin', - 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36', - 'viewport-width' => '1512', - 'x-asbd-id' => '129477', - 'x-csrftoken' => 'CFl1Ud94y0bme7hQP8Uvp8Xl4sKcFViX', - 'x-ig-app-id' => '936619743392459', - 'x-ig-www-claim' => 'hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvCTz', - 'x-requested-with' => 'XMLHttpRequest' - ]; - $url = "https://i.instagram.com/api/v1/feed/user/{$userId}/?count=12"; - if ($maxId != null) { - $url .= "&max_id={$maxId}"; - } - $request = new Request('GET', $url, $headers); - $res = $client->sendAsync($request)->wait(); - // echo $res->getBody(); - $resStr = $res->getBody(); - // echo $resStr; - Log::info($resStr); - $jsonArray = @json_decode($resStr, true, 512, JSON_BIGINT_AS_STRING); - $response = new Response\UserFeedResponse(); - $response->assignObjectData($jsonArray, false); - return $response; - } - - public function queryUser() - { - - $client = new Client(); - $headers = [ - 'authority' => 'i.instagram.com', - 'accept' => '*/*', - 'accept-language' => 'zh-CN,zh;q=0.9', - 'cache-control' => 'no-cache', - 'cookie' => 'ig_did=1E87B96C-B061-484F-89A8-C76BF8E11C52; ig_nrcb=1; mid=Y0QEJQAEAAGK3xW8v5Uwszo_cBzM; csrftoken=dLe4oZbHolS34IhgbfD6NRaoJ4iilQVM; ds_user_id=361404591; shbid="10286\\054361404591\\0541696938018:01f7596ca6fe3cd1740fef8fecf08fd17c2910140fae26ccb6e274ff56b223f6316d8ee2"; shbts="1665402018\\054361404591\\0541696938018:01f7855bda173a37fd66003ff0e80976169aeaca910868996e5b6fe361db529bc7b913e9"; dpr=2; datr=qAREY1W0Mocw3OoikuJcsL1c; sessionid=361404591%3A8yKJcm5Zo7zUCg%3A18%3AAYeLTpVvZHm7sVyM9Rz9xK2sRdYriewjsvaEl1-jKw; rur="NAO\\054361404591\\0541697160718:01f7ed7adb1303230d77283542adfa82e17aea2799057985e9fb0d5bf9bc71dc1f53d834"', - 'origin' => 'https://www.instagram.com', - 'pragma' => 'no-cache', - 'referer' => 'https://www.instagram.com/', - 'sec-ch-ua' => '"Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99"', - 'sec-ch-ua-mobile' => '?0', - 'sec-ch-ua-platform' => '"macOS"', - 'sec-fetch-dest' => 'empty', - 'sec-fetch-mode' => 'cors', - 'sec-fetch-site' => 'same-site', - 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36', - 'x-asbd-id' => '198387', - 'x-csrftoken' => 'dLe4oZbHolS34IhgbfD6NRaoJ4iilQVM', - 'x-ig-app-id' => '936619743392459', - 'x-ig-www-claim' => 'hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvDAG', - 'x-instagram-ajax' => '1006374487' - ]; - $request = new Request('GET', 'https://i.instagram.com/api/v1/users/web_profile_info/?username=zyzyxin222', $headers); - $res = $client->sendAsync($request)->wait(); - echo $res->getBody(); - } - - public function queryFollowing($maxId) - { - $client = new Client(); - $headers = [ - 'authority' => 'i.instagram.com', - 'accept' => '*/*', - 'accept-language' => 'zh-CN,zh;q=0.9', - 'cache-control' => 'no-cache', - 'cookie' => 'ig_did=1E87B96C-B061-484F-89A8-C76BF8E11C52; ig_nrcb=1; mid=Y0QEJQAEAAGK3xW8v5Uwszo_cBzM; csrftoken=dLe4oZbHolS34IhgbfD6NRaoJ4iilQVM; ds_user_id=361404591; shbid="10286\\054361404591\\0541696938018:01f7596ca6fe3cd1740fef8fecf08fd17c2910140fae26ccb6e274ff56b223f6316d8ee2"; shbts="1665402018\\054361404591\\0541696938018:01f7855bda173a37fd66003ff0e80976169aeaca910868996e5b6fe361db529bc7b913e9"; dpr=2; datr=qAREY1W0Mocw3OoikuJcsL1c; sessionid=361404591%3A8yKJcm5Zo7zUCg%3A18%3AAYeLTpVvZHm7sVyM9Rz9xK2sRdYriewjsvaEl1-jKw; rur="NAO\\054361404591\\0541697161117:01f76650d386b96fb3a69fc8e7f634344f5400d2b251cffb887a98dd900f353d940cdf07"', - 'origin' => 'https://www.instagram.com', - 'pragma' => 'no-cache', - 'referer' => 'https://www.instagram.com/', - 'sec-ch-ua' => '"Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99"', - 'sec-ch-ua-mobile' => '?0', - 'sec-ch-ua-platform' => '"macOS"', - 'sec-fetch-dest' => 'empty', - 'sec-fetch-mode' => 'cors', - 'sec-fetch-site' => 'same-site', - 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36', - 'x-asbd-id' => '198387', - 'x-csrftoken' => 'dLe4oZbHolS34IhgbfD6NRaoJ4iilQVM', - 'x-ig-app-id' => '936619743392459', - 'x-ig-www-claim' => 'hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvDAG', - 'x-instagram-ajax' => '1006374487' - ]; - $url = "https://i.instagram.com/api/v1/friendships/361404591/following/?count=12"; - if ($maxId != null) { - $url .= "&max_id={$maxId}"; - } - $request = new Request('GET', $url, $headers); - $res = $client->sendAsync($request)->wait(); - $resStr = $res->getBody(); - $jsonArray = @json_decode($resStr, true, 512, JSON_BIGINT_AS_STRING); - $response = new Response\FollowerAndFollowingResponse(); - $response->assignObjectData($jsonArray, false); - return $response; - } - - public function queryMyFollowing() - { - $maxId = null; - try { - do { - - $response = $this->queryFollowing($maxId); - - $users = $response->getUsers(); - foreach ($users as $user) { - echo "\n" . $user->getUsername() . " " . $user->getPk(); - Log::info("username: " . $user->getUsername() . " id: " . $user->getPk()); - } - $maxId = $response->getNextMaxId(); - echo "\n new maxId: " . $maxId . "\n"; - echo "\n Sleeping for 5s...\n"; - sleep(5 * random_int(1, 10)); - } while ($maxId != null); - } catch (\Exception $e) { - echo $e->getMessage(); - } - } +class InstagramService { + private $username = "nicksxs"; + private $password = '949sxs949@IN'; + // private $password = 'mff@5201314'; + // private $username = "sili1024"; + // private $password = 'Qwer2020'; + private $debug = true; + private $truncatedDebug = true; + private $ig; + private const INS_USER_KEY = "ins_user"; + + private const TODAY_USER_KEY = "recent_ins"; + + public function __construct() { + // $this->ig = new Instagram($this->debug, $this->truncatedDebug); + + // try { + // $this->ig->login($this->username, $this->password); + // } catch + // (Exception $e) { + // echo 'Login has something went wrong: ' . $e->getMessage() . "\n"; + // exit(0); + // } + } + + private $userList = [ + "bedich520" => 17707667205, + "airisuzuki_official_uf" => 5585980310, + "nancylobh" => 17865689564, + "eom_sangmi" => 1243405225, + "welsh_koby" => 12048064898, + "limerencelm" => 13305603901, + "__leeheeeun__" => 366102850, + "jeonjisu92" => 478396079, + "aiiiiidj" => 4839785330, + "senap_official" => 8611432627, + "super_fetish" => 12801506409, +// "jelly_jilli" => 3581231676, + "ji_an35" => 9498787524, + "lusiakiss" => 448335248, + "ngoctrinh89" => 1526791424, + "yiping_0226" => 632775673, + "wsmslbn" => 6794713533, + "mc807lsy" => 3315177035, + "beauty.leg" => 3320867558, + "queena820628" => 12991274468, + "bitnara1105" => 5849529154, + "mobe_carrie0223" => 566598605, + "mikamikatn" => 45602633214, + "inkyung97" => 5763414441, + "e_seoa" => 6859472347, + "r_ap82_" => 11599648301, + "hanna91914" => 6114468708, + "hana.bunny_bunny" => 3273363525, + "rakukoo" => 24837017, + "suyue233" => 6196235525, + "sakura_maomao" => 8173365074, + "irishuo_" => 598800246, + "maousamaa" => 3662020754, + "dongdong810" => 647869935, + "m.hakase" => 1509208867, + "dododoris__" => 539095769, + "banyfit" => 574865424, + "cherry_quahst" => 22834825, + "tngnlo" => 184952266, + "7alice77" => 7502308859, + "e.s2.e" => 1112115704, + "aohsuehfu" => 241869017, + "beargenie" => 454557268, + "changchinlan" => 178911602, + "dadachan" => 1361004, + "imjennycheng" => 286180341, + "loveruby_official" => 2198824121, + "maggiewu1008" => 372772460, + "nyanchan22" => 527514115, + "nz0502" => 1101667954, + "sharalinmusic" => 468754721, + "yura_936" => 1780070827, + "skuukzky" => 1507979106, + "angelcandices" => 43114731, + "yoona__lim" => 2213235565, + "masami_nagasawa" => 1126358805, + "weiman_the_real_one" => 367492101, + "sabrina888888_" => 19900699, + "yifei_cc" => 6648247795, + "siawase726" => 343071306, + "claudiashkim" => 1553792415, + "amberchenslife" => 2104721, + "jennawang525" => 296074766, + "aoi_sola" => 2080763, + "li_yen_chin" => 1585810775, + "vousmevoyez" => 1774404143, + "parlovetati" => 381724660, + "lurehsu" => 291109063, + "shinopp._.ai" => 1992367739, + "1992.ai_" => 8108074320, + "yui_xin_" => 1934526383, + "isangelc" => 4308276, + "amandacerny" => 10245870, + "mandytao" => 202316740, + "taeyeon_ss" => 329452045, + "seojuhyun_s" => 1499879597, + "shuhan.mei" => 202813045, + "cho_hyunyoung" => 1097213789, + "boram__jj" => 1577496884, + "cxxsomi" => 644060463, + "zyzyxin222" => 48904712836, + "chen_01_24" => 806888132, + "naughty_rabbit_" => 533122832, + "sejinming" => 5877651933, + "na0912mi" => 1200529361, + "ling.lingerie" => 49122819171, + "samiaowu" => 13288296956, + "janed_404" => 25532050868, + ]; + + private $userListNew = [ + "adrienleyronas" => 24410221, + "beastar_inc" => 8388701136, + "hungry_seolhyun" => 17814228706, + "withlovefromamanda" => 355774487, + "setmenstalk" => 2219875737, + "miamiac" => 181451258, + "xiaomadajiasijia" => 1398803340, + "vietnam.inlove" => 2322275473, + "_jiyulluv_" => 599361711, + "jacblackjacworks" => 49270530152, + "kellyedo1" => 9214447973, + "yuzu.zuzuzu" => 4295513868, + "akemimi_q" => 502224807, + "hejyalice" => 4412178166, + "estherrr.mu" => 4171107865, + "choastagram.23" => 3295023121, + "maherokeh" => 1093490388, + "sportypretty" => 3014281754, + "xiaoye_0914" => 5552800488, + "mei.shuhan" => 202813045, + "z811205" => 244381137, + "exid__hani" => 1614049605, + "aaronli_ca" => 5928238988, + "baebae_de" => 1282690987, + "flyier" => 31126237740, + "aboutchenfafa" => 306436191, + "risachsa" => 251387485, + "followers.941" => 10982959592, + "sheorganic.official" => 11312471629, + "sheenee11" => 48127320309, + "haezh" => 289940701, + "onlyswan" => 577146, + "rorayangjangjeom" => 11767899788, + "ween.jp" => 23318560030, + "fanzixian" => 3934462576, + "burrooooooo" => 487191386, + "bella_huang1993" => 12902619269, + "xxssiinx" => 307594962, + "x1nouv" => 3006684053, + "lupek.kyo" => 3060430989, + "_mina321916" => 5694824987, + "aiiiiidj" => 4839785330, + "bobosensei0123" => 12362700883, + "babyleesooooocute" => 4206112644, + "pannypun" => 3262116, + "dali23333" => 699145880, + "amila.yu" => 1115452351, + "hyo_book" => 1956956388, + "minakoxx" => 2102050539, + "zhucebuliaohanhan" => 1136405411, + "queenrikachuu" => 3988508181, + "uuuppzcf_19990" => 6899470290, + "momo_0v0" => 2174592659, + "ageofdecline" => 1133230930, + "jocelyn__song" => 502365504, + "beautylegh" => 1275264695, + "akirakeiki" => 593636280, + "xox0meis" => 6371636114, + "yoona_lim196" => 2054846300, + "vicnichien" => 332454442, + "_yunzheng" => 7455405118, + "aoa_seolhyun9513" => 2057802793, + "969wmy" => 639509654, + "yanxi531" => 222570186, + "catwang6868" => 1130108064, + "nooer_er" => 8888006176, + "formidat_rebe_" => 2094324381, + "oruibao" => 987953487, + "official_stellar" => 2128218602, + "c.g.m_pr" => 1487927736, + "emmawatson_90_" => 320900662, + "619_cyz" => 2506812226, + "arammmm0305" => 9498787524, + "flashwife" => 27659958643, + "lekorbrothers" => 548709615, + "warwin_outlet" => 7658097775, + "hotasian_journal" => 3443480533, + "yingcaier" => 224470216, + "teenyfeng" => 1482105218, + "lana_doris" => 3581341608, + "yidazhigui" => 1915747988, + "lll0621lll" => 44351036373, + "_asianmodelgirls_" => 3544460988, + "better_me_caolu" => 2106303407, + "yt0ng_" => 329707186, + "vvchennnn" => 1548759342, + "yanyanzi4" => 8499820810, + "keiko.kitagawa" => 372087793, + "momoland.yeonwoo" => 4093171071, + "m522723" => 5764409116, + "lizwenya" => 250939171, + "emmort4l" => 17865689564, + "shutupsb" => 1396013349, + "aoa.hyejeong" => 1182300669, + "akira_429" => 366324022, + "leeyufen" => 254351705, + "mii75208" => 1671899963, + "asianmostwanted" => 1715027156, + "nierxiaoyao" => 434290527, + "aoa.news" => 1697552056, + "yu1gakki" => 1344304375, + "ev_love520" => 37747875975, + "girlsdaykimyura" => 1364108952, + "miss.xuanan" => 32101494027, + "limjueun0107" => 2058367292, + "akihoyoshizawa" => 622958560, + "maggiewu1008" => 372772460, + "ivykuang21" => 191755326, + "nanshiiyahh" => 11577330755, + "suyue233" => 6196235525, + "lxx.baby" => 50433688641, + "seolhyun.aoa" => 1511848858, + "202innewyork" => 2967989437, + "superfetish" => 1154961788, + "sakura_maomao" => 8173365074, + "yoga_clinic" => 1692680878, + "refife.official" => 2205668457, + "_.meganfox" => 2104541316, + "mimibaeeeee" => 8059568, + "nemuhimelody" => 8565192439, + "shishiya520" => 41093172588, + "chinesegirls" => 1941056260, + "ranxiaoyang919" => 4462768701, + "akiho_net" => 1135492086, + "cutegirl.asia" => 3663988138, + "__momoko813" => 8496686944, + "kawasaki__aya" => 3282745463, + "promotion_cbeauty" => 50417901835, + "kkln_" => 487618040, + "amyxinhdeplamnha" => 3043608423, + "thaihotties" => 1795638171, + "hotgirlthailand" => 4078836054, + "ahnee18" => 1451840251, + "sukiyou_" => 30034211232, + "linda.zz99tw" => 3305193023, + "majiahuia312" => 1386396955, + "jessicastep" => 29317383, + "artgravia_global" => 1521033984, + "leggybabebb" => 17785025682, + "maybe_iamawesome" => 180923833, + "luodanwang" => 1305584611, + "yfff2727" => 188322217, + "agentsofshield" => 352078895, + "zozeongzeon" => 49034788798, + "rudanae" => 178174577, + "chinamodelblog" => 9613667181, + "blacksiwamay" => 31213186923, + "avivi000" => 375281688, + "tangyan1206" => 3090889112, + "ace_of_angels08" => 2206867365, + "x.miko__" => 41704764985, + "sgasami" => 5561717680, + "tiny.foto" => 25154119453, + "kaguramiko__" => 8345035809, + "yudong423" => 7356689114, + "reon_soul" => 3963778032, + "yiyang.silvia" => 8476845724, + "ms.maron_2022" => 51403172829, + "lookadesign" => 4181127120, + "xiamei.jiang" => 1964512382, + "170_kimch" => 8317930313, + "_wwhale_fall" => 19682237216, + "amanadabeauties" => 34881427757, + "sususucream" => 2219995801, + "lanlanbabyhi" => 1803050823, + "jessievardie" => 4112637356, + "ko_aku_ma" => 11663277457, + "yone69harajuku" => 14202860, + "d_mi_j" => 20292600017, + "maousamaa" => 3662020754, + "xiamei0828" => 2264949910, + "_catfishhh" => 675886495, + "lan_koyo" => 1721696093, + "warmswinds" => 6167907084, + "chonoblack03" => 2301889639, + "jelly_jiajia" => 339974003, + "leg_fetish_man" => 7633193601, + "top.asian.babes" => 6094994772, + "pn_static" => 1055495109, + "bo_ram_0322" => 492949707, + "loveuu_0919" => 5425097866, + "hia.s2" => 46248526303, + "g_my0" => 623474543, + "libingbing" => 2020489209, + "yangmi_" => 225241552, + "yiyi_444m" => 1559450690, + "maikayinghua" => 7056032571, + "sa_a_529" => 46993114870, + "bonanza.__________" => 697663180, + "reina_chin" => 20695195, + "setsuna100_" => 9765069331, + "shinupusaa" => 52098515282, + "nanaring_" => 208407863, + "renrenbaebae" => 1557255715, + "fhrm_1219" => 32703146081, + "latte_1124" => 3304325339, + "jeanaho" => 18750468, + "nattobbm" => 343623438, + "whitehairpin" => 1337989022, + "robertaklein" => 1696752016, + "koohara__" => 291832515, + "gorgeous_studio_" => 3309361470, + "baimiintt" => 3510911766, + "aoa_luvwies" => 1971425857, + "yue_9.3" => 4134368426, + "saya__second" => 46726960922, + "ruda__s2" => 884491926, + "cindyyenofficial" => 424423160, + "mookies_zapp" => 642556386, + "wannanana27" => 1265834758, + "banana_nani999" => 4255048898, + "yeungchinwah" => 432462230, + "sabrina____s" => 508574681, + "bear.clothess" => 16937729268, + "cutegirlaec" => 3665226024, + "haze989889" => 521037073, + "djjuicykorea" => 2017368087, + "moneychen_" => 1728545843, + "nishino_show" => 1285649, + "yoonhye.chung" => 1392917333, + "sep19__" => 1152537078, + "xii_mannn" => 263751843, + "160_34d" => 998542334, + "luna_hillll" => 2194388358, + "ruriko_ishikawa" => 989260641, + "aomimiki" => 7469770439, + "verna_pei" => 1131073, + "bebe_sl" => 1151751954, + "schelleyyuki_" => 30411241623, + "lisawanglijen" => 502605269, + "soyoungyim" => 1146654768, + "seoyoung_84" => 1686187272, + "evelynyinn" => 358822339, + "lililiiiiiiiiiilllililil" => 536329736, + "eom_sangmi" => 1243405225, + "m.hakase" => 1509208867, + "reiiko_sy" => 643750920, + "fangyu_lin" => 378968318, + "elv.elv.elf" => 9415911483, + "tracywxm" => 1425997067, + "wangleehom" => 3451650438, + "peggy.yuyu" => 328998131, + "yiyanlovegod" => 1310369388, + "crystalpancake" => 4658295, + "nhatien0801" => 1213333085, + "melissah.ee" => 305390340, + "lucycecile" => 13394112, + "ms_joeechong" => 499994294, + "hv_alice" => 1500763258, + "yitai_w" => 336600445, + "cutegirlasean" => 3942265075, + "banyfit" => 574865424, + "zhi_yiyi520" => 5695518232, + "minchunlo" => 2470323210, + "172page_" => 4239936758, + "nanaco_33" => 54073179, + "aileduoaliga" => 546201529, + "yztuan_" => 966969489, + "gaoyuanyuan_gyy" => 794155792, + "karry113" => 245076789, + "lllilybaby" => 198356505, + "beibei2211" => 5074612, + "159qq___" => 6057675702, +// "jelly_jilli" => 3581231676, + "venuskang.1" => 1395850499, + "imdoris_1230" => 626999763, + "helloleeholeehoho" => 1469105294, + "novaliya888" => 6436301899, + "chiehyu1027" => 449256781, + "377.bb" => 3307247145, + "mandytao" => 202316740, + "yifaer_chen" => 516972696, + "ai_to_rin" => 42137247216, + "kagari.7330" => 1369138730, + "xxplmch99_" => 416018139, + "choa880_aoa" => 2283460141, + "ariellereitsma" => 14114832, + "cr5p__official" => 5849338586, + "michellet22_" => 41266931, + "savanna_blade" => 234666069, + "vanessa.only4567" => 50905592134, + "yoonmirae" => 732010139, + "lkk_imagine" => 6166245751, + "993a9" => 18749480, + "aiwa.only" => 35306340023, + "djxin_tw" => 564987626, + "joyfulck" => 54468468, + "cassieeebae_" => 1400725713, + "linleah529" => 348075794, + "twinshk" => 226875150, + "verna.1206" => 202733181, + "leohex_official" => 7746467656, + "lusiakiss" => 448335248, + "songjooa0225" => 4592263087, + "witchhat_ringo" => 50956936058, + "miss_merlyn" => 1351265910, + "fteikaros" => 45953750279, + "asianmodelblog" => 6609199774, + "kkwonsso_94" => 357805234, + "ting.talk" => 257009757, + "areasayaka" => 637192875, + "1ee.zw9" => 1696816620, + "chiyu3u" => 1483508898, + "amierwwwwww" => 6185863880, + "buckycloud" => 6746410822, + "jacblackjac" => 10855003607, + "stilleecho" => 255372656, + "alicebambam" => 8568258, + "jennawang525" => 296074766, + "p_e_r_r_y_x" => 26986768791, + "tosarei19" => 48335696746, + "jisook718" => 1560977276, + "isangelc" => 4308276, + "kaede_erouraaka" => 46563658191, + "kanomwhannatcha789" => 4247061798, + "yi.seo.a" => 1557234932, + "laine_laineng" => 187651374, + "1milliongirls_" => 4282338844, + "dg8dg" => 5966995904, + "pangwinks" => 33190676, + "jesse_0921" => 189604380, + "qsexyloveme" => 12991274468, + "annabellellll" => 36011584, + "nikaynakih" => 6780905, + "ts_takasho" => 3109461469, + "sso1124" => 714788301, + "seolhyun_choa" => 2544374274, + "i_hee_c" => 3218062159, + "edithyindaily" => 1666271946, + "jane.duu.88" => 230967212, + "mikokissy" => 253851678, + "amberchenslife" => 2104721, + "yiping_0226" => 632775673, + "aoi_sola" => 2080763, + "li_yen_chin" => 1585810775, + "lynnalin" => 9048043, + "jill_g.e" => 3129947648, + "_azhua" => 1659615193, + "saaya_official_" => 2311919780, + "beauty.leg" => 3320867558, + "171.12.10" => 52605491439, + "kimjeii" => 1648065138, + "sandeul_11" => 1966366408, + "mc807lsy" => 3315177035, + "blacksilk_girls" => 7905141442, + "miko516" => 786823534, + "jeehyeounn" => 3266249104, + "pinkbabe0309" => 12090972, + "phy2938" => 1220279993, + "loluuuuuu_cos" => 4234300721, + "_rongqin99" => 5492352718, + "instababes_asia" => 1572135335, + "limerencem_" => 13305603901, + "sunkisssedbeauty" => 1477474933, + "therivergirl" => 3450388, + "kailiofficial" => 530022543, + "appleweiting" => 357101752, + "babyno_money" => 7374605364, + "_bb_ann_" => 26120107, + "innocent_katty" => 28089309069, + "bebewchang" => 240744142, + "noh.eul_89" => 1152845939, + "miinyan73" => 224643854, + "zsycollection" => 47907341798, + "alice_mather" => 384583705, + "yumisecrets" => 245292194, + "_____sia__" => 3930839708, + "vivianchowwaiman" => 1633307983, + "dancekimiko" => 17448030, + "lyvonne0526" => 523509020, + "gravuremagazinejp" => 2029936802, + "cho_hyunyoung" => 1097213789, + "jeonjisu92" => 478396079, + "snowmanloveu" => 1097259991, + "claudiashkim" => 1553792415, + "sexywht" => 3678604153, + "meiri_gravure" => 46162882571, + "shishi_love521" => 31278522055, + "yueer_moonlover_" => 190089556, + "tn1rw9" => 10865607809, + "godbella" => 1048431023, + "peachplease_tw" => 8477064025, + "houpatty" => 2756069868, + "maruemon_96" => 1512084225, + "x.wistien.x" => 1393372610, + "actressclara" => 540305545, + "dalsooobin" => 1531118206, + "qingshanyuandai" => 13765106295, + "r_ap82_" => 11599648301, + "chen_01_24" => 806888132, + "myksan1717" => 1070063001, + "_yunjeekim_" => 1667520443, + "felix_woojin1224" => 1823916713, + "senap_official" => 8611432627, + "___jung.g" => 1366344647, + "lihenglai" => 4525313872, + "piamodel" => 1941243764, + "c3eru" => 4060717710, + "sira_gravia" => 38574171161, + "anran.1033" => 51701350062, + "mengxinyue2018" => 5316866087, + "rollipop__p" => 1353824141, + "nimoan0729" => 9260679970, + "asakawa_nana" => 4933721527, + "jiwoola" => 29335269474, + "bootyfull_jamie" => 411454438, + "dongdong810" => 647869935, + "dayuanlin" => 451833335, + "ahyoung_hwang" => 1410260507, + "chiushinshin1103" => 47713518600, + "s2yuhanjun" => 8528962808, + "1993kg" => 585645951, + "a.lissiee" => 11528696616, + "choi_hs93" => 1722987053, + "yun_0928_" => 6504504560, + "amy00526" => 48553202369, + "niya840325" => 5517755941, + "tot_omato" => 36650759971, + "h.viviha" => 5371154909, + "cave0927" => 468187419, + "meiri_01familia" => 11474012713, + "lxxbaby.official" => 50433688641, + "sexy_asian_lady" => 3402597260, + "crystal_swung" => 34033186, + "sugimotoyumi_official" => 2092502045, + "flowersora0813" => 1403325955, + "doly0818" => 12542141036, + "creemmy_16" => 4146979506, + "shinapit46" => 12904833236, + "eki_holic" => 5596110873, + "lunmei" => 13376560, + "fit_hyunjin" => 2192572841, + "weiman_the_real_one" => 367492101, + "erioishitokyo" => 412582193, + "jen2jen2_" => 8921988213, + "kimberlly_chen" => 441117903, + "weiyin.com.tw" => 5968181, + "seol_ah_s" => 1344967412, + "fanfan" => 3212682, + "naomihype" => 1495119895, + "q_gill" => 1567349, + "wang52001112" => 8285185524, + "jiee_wen" => 29364142936, + "ling.lingerie" => 49122819171, + "zzzzm83" => 8010039182, + "shika.xiaolu_lu" => 8739724418, + "min_ching_chang" => 499591666, + "irishuo_" => 598800246, + "nolovehowll" => 52802349, + "melodysoyani" => 1027760475, + "beatricefang" => 29101719, + "tngnlo" => 184952266, + "titi_wxt" => 360924402, + "bedich520" => 17707667205, + "mobe_carrie0223" => 566598605, + "samiaowu" => 13288296956, + "yn_s_1230" => 2053646255, + "ahnlina" => 1129208300, + "yazhubabalu" => 4014137413, + "lovely_ahyeong" => 427920662, + "goeun.1226" => 2117797883, + "rissoft_" => 1445881042, + "7alice77" => 7502308859, + "mika_ccy" => 26787564, + "j_i_y__" => 3190385497, + "nikita.hsu" => 889797, + "kimune5531" => 4176410878, + "sakura10h" => 2239088044, + "la__young" => 1133101059, + "syc_joycechu_" => 348953197, + "zhangsiyunnice" => 311826247, + "mimi112023" => 1442394500, + "fall0715" => 760538193, + "yuyanpeng" => 2158725, + "qiaoxinhuang" => 298943049, + "156.melody" => 10006613875, + "chaeyoon.93" => 1334536697, + "nnabiyeon" => 11129125092, + "rinn_xc" => 2056630159, + "artgravia" => 5980110266, + "moranatias" => 40046089, + "s_ylll" => 690384254, + "kerina_hsueh" => 948148, + "changchinlan" => 178911602, + "yuyan.148" => 14081991939, + "chanmi_96a" => 2044142664, + "superstar_jhs" => 642764983, + "sumire_shinohana" => 6147506212, + "sunha_cos" => 22014899966, + "melodykliu" => 245061361, + "tanganqi88" => 51192268147, + "chiling.lin" => 2282601782, + "teacherkeidi" => 412409374, + "qlj_qlj" => 50897922219, + "mabel_goo" => 235787282, + "a12486" => 3016965959, + "beth_lookgade6666" => 271293671, + "xdoudou2" => 9071014399, + "karinas_aespax" => 6825904394, + "nomoli_photo" => 1465036354, + "fishleong616" => 1559345030, + "_kimjaekyung_" => 839270202, + "dorachai" => 435583573, + "dahye0612" => 1189099446, + "bonnieyuxx" => 296380760, + "daily_irene" => 3427229519, + "groupgirlvn" => 32209938025, + "emperor.photo" => 6931526607, + "tinapouty" => 255550677, + "vanessa.tw" => 450134130, + "park_kkone" => 2977341117, + "hinako_sano" => 1693998248, + "__leeheeeun__" => 366102850, + "so_____y_" => 1065286586, + "xuer_1230" => 502374468, + "suitangtang" => 419267209, + "vivi02257" => 7559843970, + "chuyo622" => 359329053, + "ryosay_p.g" => 3933635611, + "zyzyxin222" => 48904712836, + "shibuya_yuri" => 950707600, + "_wendydydydy" => 1070811604, + "kvwowv" => 1938048867, + "sabrina5477_" => 19900699, + "chrissienana" => 681990, + "physit" => 556427, + "lok666" => 2212872, + "mifancha" => 1404983759, + "soo_flower" => 1692288454, + "shababy___" => 1468537490, + "jimin0807_" => 2014512749, + "judy.3._" => 24308143343, + "miwakokakei" => 345892761, + "amandaseet" => 5210490, + "love_jun1031" => 25232085780, + "chuuu_0908" => 2292786719, + "selinanahaha" => 47947504, + "heidibibe" => 1086059, + "tropicofc" => 1697390959, + "chen_ai_ling51" => 88976, + "katie_chennn" => 219783207, + "gyeongree" => 484009840, + "saorikiyomi" => 3941469424, + "sharon701111" => 372878170, + "willpan23" => 249954422, + "candybaby0402" => 2062027168, + "jess.02.23" => 1113303344, + "la_vie_enrose__" => 325627366, + "victoria02_02" => 600694929, + "ayreen" => 8800691, + "nz0502" => 1101667954, + "sylvia.1204" => 2247622627, + "shi_orii" => 19483824, + "dododoris___" => 7054157082, + "only4567" => 353311243, + "nomita193" => 40570367195, + "qtfreet" => 549186335, + "wt_0102" => 3058770061, + "queenchoa_" => 1919552169, + "hazyryu" => 6794713533, + "nairuru.i" => 2688001520, + "wakatsuki_cmore" => 6979382782, + "still_need" => 487580958, + "ff0427" => 327728950, + "amy00522" => 21818594449, + "cutesww0125" => 27788081, + "xinya_an" => 314309875, + "joannalin724" => 311868662, + "clarkgregg" => 192999062, + "pinksophia0818" => 189840658, + "hisuihisui" => 3250745476, + "sharalinmusic" => 468754721, + "hyo_1013" => 1199621090, + "zhizhibooty" => 11785987554, + "honjo_suzu" => 7144705801, + "mimichan.259" => 1519796225, + "yuleumn" => 537833784, + "dora0x0" => 327634528, + "e_s2_e" => 1112115704, + "rh_ab" => 1117033221, + "yuxinuna" => 7287122, + "k_jenny_k" => 1204481975, + "syamoeri" => 15479745607, + "sanga_yonini" => 572140084, + "sunnylin_520" => 6465963, + "kaytse" => 255920381, + "lurehsu" => 291109063, + "feifei_11111" => 33388543295, + "lil_henstridge" => 221757628, + "misschailing" => 177158910, + "colin.anthony2" => 1685534598, + "sakura.gun" => 1508769542, + "saki__saito" => 1097425418, + "hermosavidaluna" => 642134943, + "bivi_0420" => 471784690, + "_ram_e" => 542591824, + "leehee.express" => 5608680453, + "chienweihah" => 1735736, + "misszzie_" => 1150129265, + "hesui923" => 3685309, + "muse_j" => 1217233625, + "shihpii" => 4593410962, + "christinetinevonvon" => 48415853219, + "hyejoozz" => 1907700472, + "chihiro_chang" => 2249244906, + "maria_grnd" => 11037462, + "dj_siena" => 479243807, + "yudayeon1004" => 1437768957, + "e_seoa" => 6859472347, + "chenbolin" => 16116170, + "beargenie" => 454557268, + "na0912mi" => 1200529361, + "ann.manas" => 4348994, + "yangchenchen.sugar" => 42186993922, + "danielaboterofficial" => 1908919341, + "exidofficial" => 2160054170, + "lovelyjoohee" => 438094240, + "anxi061" => 8070188727, + "ww0205ww" => 1524235496, + "mikowong" => 1600500, + "candice0723" => 1535328320, + "amami_tsubasa000" => 15362256455, + "imjennycheng" => 286180341, + "marie_iitoyo" => 660654932, + "mayyr_" => 9406894, + "yifeis" => 7427384, + "dabechen" => 13130800, + "kiyocosplay" => 1510080263, + "zlsigg" => 49844877406, + "shinopp._.ai" => 1992367739, + "qiu_qqq" => 967496552, + "sqwhat" => 453366618, + "blackielovelife" => 206180117, + "crissielee_" => 144511281, + "stboo" => 776626, + "eunjung.hahm" => 383482884, + "tamara1228" => 10318475, + "aragakiyui_fanspage" => 719563314, + "lilyiu_" => 1195739871, + "him_ella0618" => 3981440758, + "borusushi" => 4206328034, + "falachenfala" => 1170369155, + "bingbing_fan" => 637148837, + "choisaaaa" => 1248351663, + "mypinkmy" => 2954063236, + "pinksoulpuss" => 7340787077, + "alyssachia" => 1384688312, + "atsuko_maeda_official" => 3106934995, + "hebe_tien_0330" => 8159219726, + "official_hitomitanaka" => 343520302, + "poydtreechada" => 16149283, + "rakukoo" => 24837017, + "rio_uchida" => 1119919131, + "shasa_fly" => 1283904669, + "janed_404" => 25532050868, + "dadachan" => 1361004, + "stronger917" => 969620004, + "babe.weng" => 641204465, + "mookpichana" => 3553575875, + "hannah_quinlivan" => 654027902, + "yaokuo" => 422913171, + "hana_sooong" => 606565915, + "sakurai.hinako_official" => 5656141795, + "vox.ngoc.traan" => 3030197091, + "loveruby_official" => 2198824121, + "niecewaidhofer" => 208138222, + "shibukaho" => 3472878594, + "vicky_7155" => 1389128825, + "jessievard" => 2242281072, + "cherry_quahst" => 22834825, + "joanne_722" => 51054288, + "woohye0n" => 1578796854, + "leeesovelys2" => 52105860685, + "jiminbaby_18" => 1690284223, + "yuk00shima" => 1395828484, + "kimi850531" => 1118195392, + "jolin_cai" => 53277501, + "candyseul" => 5738287265, + "shimizuairi" => 4167595154, + "monpink_mon" => 1589997876, + "1989ivyshao" => 370962121, + "ilove7388" => 774854, + "haneulina" => 1261320668, + "rina_kawaei.official" => 4449731542, + "vivamoon" => 370080040, + "xiianger" => 195577939, + "asahina_aya" => 835943084, + "takomayuyi" => 2940077942, + "loveyu_ju" => 48836882462, + "fumika_baba" => 1683518161, + "michiyo_ho" => 20232660, + "boram__jj" => 1577496884, + "jjlin" => 6322604, + "zzyuridayo" => 5782093649, + "miyoshi.aa" => 1545478726, + "dreamstatemuse" => 1410036650, + "elephantdee" => 1359749783, + "kiligkira" => 8105332086, + "elaiza_ikd" => 1498552173, + "seinonana" => 1474952074, + "airisuzuki_official_uf" => 5585980310, + "k_hanna_" => 1346871035, + "sprite0719ss" => 1682380316, + "mirei_kiritani_" => 2283097631, + "habin_s2._" => 517375840, + "angelachong_99" => 436245394, + "shaya.lor" => 252350475, + "chloebennet" => 18186502, + "95_mizuki" => 472670344, + "aohsuehfu" => 241869017, + "suzu.hirose.official" => 5619836719, + "parlovetati" => 381724660, + "angelinadanilova" => 26119622, + "yura_936" => 1780070827, + "duyenn.hipp" => 2305584684, + "tsubasa_0627official" => 2379644219, + "yumibb8888" => 302285124, + "senyamiku" => 4012343855, + "kannahashimoto.mg" => 6878201673, + "chengxiao_0715" => 4167720175, + "epoint2016" => 5923076936, + "iammingki" => 372775239, + "masami_nagasawa" => 1126358805, + "yamamotomaika_official" => 4033564327, + "irisxiao_" => 1428761749, + "exy_s2" => 2032465180, + "ashleyresch" => 1518028512, + "ulzzanggirlth" => 3000477155, + "jaychou" => 5951385086, + "eeelyeee" => 397471523, + "dami_amond" => 5487826028, + "wmookies" => 1203803713, + "snow1111726" => 47523163551, + "haneame_cos" => 3994090562, + "fearythanyarat" => 20392165, + "angelababyct" => 9156600, + "jiyeon2__" => 1738782834, + "wjsn_cosmic" => 2307331080, + "natalieportman" => 6414707404, + "kasumi_arimura.official" => 3610274988, + "eeunseo._.v" => 1764466250, + "haruna_kawaguchi_official" => 5020663420, + "nozomisasaki_official" => 3536539706, + "jeee622" => 1708079295, + "riho_yoshioka" => 2040847679, + "naughty_rabbit_" => 533122832, + "marcellasne_" => 2354318526, + "taaarannn" => 1336020390, + "sooyoungchoi" => 1078607901, + "sooyaaa__" => 8011506095, + "eimi0318" => 42149371331, + "cathrynli" => 211590939, + "asukakiraran" => 384875489, + "xxapple_e" => 8590776830, + "pandorakaaki" => 5152138052, + "natalee.007" => 7125325489, + "hana.bunny_bunny" => 3273363525, + "nagaimariaa" => 16324360355, + "ngoctrinh89" => 1526791424, + "jessica.syj" => 1678311178, + "yulyulk" => 416573427, + "taeyeon_ss" => 329452045, + "vousmevoyez" => 1774404143, + "robertdowneyjr" => 1518284433, + "cxxsomi" => 644060463, + "hyunah_aa" => 491862741, + "moe_five" => 364669222, + "jun.amaki" => 2244743788, + "moon.fit_" => 7188187232, + "inkyung97" => 5763414441, + "s2seolhyuns2" => 2009373206, + "katdenningsss" => 18785563, + "taylorswift" => 11830955, + "boakwon" => 23637003, + "hyominnn" => 378123881, + "tiffanyyoungofficial" => 1497851591, + "nanaouyang" => 1431522319, + "dlwlrma" => 1692800026, + "yuuuuukko_" => 287707051, + "goyounjung" => 3129378920, + "sejinming" => 5877651933, + "hyeri_0609" => 1559113799, + "hyoyeon_x_x" => 363567749, + "janie.lin" => 40529471, + "skuukzky" => 1507979106, + "heylaurensummer" => 3946017843, + "seojuhyun_s" => 1499879597, + "therock" => 232192182, + "nyanchan22" => 527514115, + "beyonce" => 247944034, + "yoona__lim" => 2213235565, + "gatitayan777" => 6300774164, + "cobiesmulders" => 44510012, + "ohttomom" => 1390020866, + "morisakitomomi" => 1179476381, + "daisykeech" => 6980531480, + "meganfox" => 1376331573, + "leomessi" => 427553890, + "ms_puiyi" => 864686480, + "han_kyung__" => 1701694942, + "nyanchan22" => 527514115, + "deejaysoda" => 41287672, + "jin_a_nana" => 1206440978, + "2525nicole2" => 1771420083, + "candiceswanepoel" => 43114731, + "ari_maj" => 1931289525, + "prattprattpratt" => 24065795, + "kendalljenner" => 6380930, + "mirandakerr" => 179801071, + "romeestrijd" => 144912935, + "emmawatson" => 1418652011, + "rosiehw" => 25096719, + "amandacerny" => 10245870, + "gal_gadot" => 20788692, + "jenna_chew" => 190358318, + "ahnanihh" => 532606451, + "helga_model" => 303375147, + "markruffalo" => 1191807828, + "leonardodicaprio" => 1506607755, + "real__yami" => 1334305466, + "_2km2km_" => 8419330744, + "2km2km" => 1261174072, + "2km_2km_dj2" => 50785456344, + "17_chill" => 38054610130, + "gawonaa" => 6552618014, + "bitnara_daily" => 56599499536, + "bonnie.90106_" => 55798122328, + "zennyrt" => 9676745878, + "gggglow_" => 51530943636, + "u.zyn" => 1639118555, + "1jinoh" => 6820106727, + "miaomi7188" => 56607909216, + + ]; + + private $userAliasMap = [ + "2km2km" => "2km_2km_dj2", + "siawase726" => "snow1111726", + ]; + + function traceExistFiles($dir) { + $existFiles = []; + if (is_dir($dir)) { + $files = array_diff(scandir($dir), ['.', '..']); + foreach ($files as $file) { + if (isMedia($file)) { + $existFiles[] = $file; + } + } + return $existFiles; + } + return []; + } + + function isMedia($file) { + if (in_array(pathinfo($file)['extension'], ['jpg', 'mp4'])) { + return true; + } + return false; + } + + function logFailUrl($filePrefix, $fileUrl) { + $failLogFile = "fail.log"; + $myfile = file_put_contents($failLogFile, $filePrefix . "\t" . $fileUrl . PHP_EOL, FILE_APPEND | LOCK_EX); + } + + function oldFileDirList() { + return ["/Users/shixuesen/OneDrive/Pictures/instagram/Likes_old/"]; + } + + function downloadFile($filenameUrl, $flag = 0, $filePrefix = "", $fileNamePrefix = "") { + //echo $filenameUrl;exit; + $filePathInfo = pathinfo($filenameUrl); + $filename = $filePathInfo['filename']; + // echo $filename; + // echo "\n"; + $pos = strpos($filename, "?"); + // echo "pos: ".$pos; + // echo "\n"; + if ($pos > 0) { + $filename = substr($filename, 0, $pos); + } + if (file_exists($filePrefix . $filename) && $fileNamePrefix != null) { + rename($filePrefix . $filename, $filePrefix . $fileNamePrefix . $filename); + echo "\n file exists and has rename to " . $filePrefix . $fileNamePrefix . $filename; + return 0; + } + $filename = $fileNamePrefix . $filename; + // if ($filename == "33020038_640464766303508_27725890796388352_n.jpg"){ + // $flag = 1; + // } + if (file_exists($filePrefix . $filename) || file_exists($filePrefix . $filename . ".back")) { + echo "\n file exists " . $filePrefix . $filename; + return 0; + } + // 去老的目录检查下是否已存在 + $oldFileDirList = $this->oldFileDirList(); + foreach ($oldFileDirList as $oldFileDir) { + if (file_exists($oldFileDir . $filename)) { + echo "\n file exists " . $oldFileDir . $filename; + return 0; + } + } + // try { + // $cn_match = "https://scontent-lax3-1.cdninstagram.com"; + // $options = array( + // 'ssl' => array( + // 'verify_peer' => true, + // 'cafile' => "/Users/shixuesen/Downloads/cacert.pem", + // 'ciphers' => 'HIGH:TLSv1.2:TLSv1.1:TLSv1.0:!SSLv3:!SSLv2', + // 'CN_match' => $cn_match, + // 'disable_compression' => true, + // ) + // ); + // $context = stream_context_create($options); + // $ch = curl_init(); + // + // curl_setopt_array($ch, array( + // CURLOPT_URL => $filenameUrl, + // CURLOPT_RETURNTRANSFER => true, + // CURLOPT_ENCODING => '', + // CURLOPT_MAXREDIRS => 10, + // CURLOPT_TIMEOUT => 0, + // CURLOPT_FOLLOWLOCATION => true, + // CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + // CURLOPT_CUSTOMREQUEST => 'GET', + // CURLOPT_HTTPHEADER => array( + // 'authority: scontent-hkt1-2.cdninstagram.com', + // 'accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + // 'accept-language: zh-CN,zh;q=0.9', + // 'cache-control: no-cache', + // 'origin: https://www.instagram.com', + // 'pragma: no-cache', + // 'referer: https://www.instagram.com/', + // 'sec-ch-ua: "Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99"', + // 'sec-ch-ua-mobile: ?0', + // 'sec-ch-ua-platform: "macOS"', + // 'sec-fetch-dest: image', + // 'sec-fetch-mode: cors', + // 'sec-fetch-site: cross-site', + // 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36' + // ), + // )); + // $image = curl_exec($ch); + // curl_close($ch); + // // $image = file_get_contents($filenameUrl, false, null); + // } catch (\Throwable $e) { + // var_dump($e->getMessage()); + // $this->logFailUrl($filePrefix, $filenameUrl); + // return -1; + // } + + echo "new filename: " . $filePrefix . $filename . "\n"; + $retryTime = 0; + $downloadResult = ""; + do { + $downloadResult = shell_exec("export http_proxy=http://127.0.0.1:1087; export https_proxy=http://127.0.0.1:1087; cd $filePrefix && wget -t 3 '$filenameUrl' -O '$filename' && echo 'ok'"); + $retryTime++; + } while (Str::contains($downloadResult, "Unable to establish SSL connection") && $retryTime < 5); + + // $downloadResult = file_put_contents($filePrefix . $filename, $image); + Log::info("result: $downloadResult"); + $resultLineArray = explode("\n", $downloadResult); + if (count($resultLineArray) <= 1) { + $this->logFailUrl($filePrefix, $filenameUrl); + return -1; + } + $lastLine = explode("\n", $downloadResult)[count(explode("\n", $downloadResult)) - 2]; + Log::info("lastLine is $lastLine"); + if (trim($lastLine) == 'ok') { + return 1; + } else { + $this->logFailUrl($filePrefix, $filenameUrl); + return -1; + } + } + + public function parseExactFileName($fileUrl) { + $filePathInfo = pathinfo($fileUrl); + $filename = $filePathInfo['filename']; + $pos = strpos($filename, "?"); + if ($pos > 0) { + $filename = substr($filename, 0, $pos); + } + return $filename; + } + + public function checkFileExists($fileName, $isDb = true, $filePrefix = '') { + if ($isDb) { + return Ins::where('image_name', $fileName)->where('is_uploaded', 1)->count() > 0; + } else { + return file_exists($filePrefix . $fileName) || file_exists($filePrefix . $fileName . ".back"); + } + } + + public function scrapeLikedUsers() { + + $baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/Likes_new/"; + try { + $maxId = null; + do { + $response = $this->ig->media->getLikedFeed(); + foreach ($response->getItems() as $item) { + //echo json_encode($response->getItems());exit; + $userName = $item->getUser()->getUsername() . "_"; + switch ($item->getMediaType()) { + case Item::PHOTO: + $imageUrl = $item->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $baseImageDir, $userName); + if ($res == 0) { + return; + } + break; + case Item::VIDEO: + $videoUrl = $item->getVideoVersions()[0]->getUrl(); + $res = $this->downloadFile($videoUrl, 0, $baseImageDir, $userName); + if ($res == 0) { + return; + } + break; + case Item::CAROUSEL: + // echo json_encode($item); + // exit; + foreach ($item->getCarouselMedia() as $imageItem) { + $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $baseImageDir, $userName); + if ($res == 0) { + return; + } + } + break; + } + } + + // Now we must update the maxId variable to the "next page". + // This will be a null value again when we've reached the last page! + // And we will stop looping through pages as soon as maxId becomes null. + $maxId = $response->getNextMaxId(); + echo "\n new maxId: " . $maxId . "\n"; + + // Sleep for 5 seconds before requesting the next page. This is just an + // example of an okay sleep time. It is very important that your scripts + // always pause between requests that may run very rapidly, otherwise + // Instagram will throttle you temporarily for abusing their API! + echo "\n Sleeping for 5s...\n"; + sleep(5 * random_int(1, 10)); + } while ($maxId != null); + } catch (Exception $e) { + echo 'scrapeLikedUsers something went wrong: ' . $e->getTraceAsString() . "\n"; + } + } + + public function scrapeFeeds() { + $count = 0; + + $baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/Likes_new/"; + try { + $maxId = "KJgBARQAIAFwAFAAMAAgABgAEAAIAAgACADZa_v9-Pm7d5_W_5Xvd_7_mPv8_z_33fr2p_D8dPx99u_Xctse5msKHZn0u-RNHtpn37-8kZneycSmz3qj99bAii8bvsnA7qPcjbYj_v92n-f___-_v_v9P___7-_f875v_f___5___95ZRzUFT9m_uKqgR79U8eO0uMQcXTQYqQIW1p7lw_hgRhApBBkEIjIA"; + do { + $response = $this->ig->timeline->getTimelineFeed($maxId); + foreach ($response->getFeedItems() as $item) { + if ($item->getMediaOrAd() == null || $item->getMediaOrAd()->getProductType() == "ad") { + continue; + } + // else{ + // echo json_encode($item->getMediaOrAd()) . "\n"; + // echo "product type: " . $item->getMediaOrAd()->getProductType(). "\n"; + // echo $item->getMediaOrAd()->getUser()->getUsername() . "\n"; + // echo "ad id "; + // echo $item->getMediaOrAd()->getAdId() ; + // echo "\n"; + // echo "is add4ad ". $item->isAd4ad() . "\n"; + // echo "is add link type" . $item->isAdLinkType() . "\n"; + // echo "is media or ad" . $item->isMediaOrAd() . "\n"; + // } + // if () + $userName = $item->getMediaOrAd()->getUser()->getUsername() . "_"; + + switch ($item->getMediaOrAd()->getMediaType()) { + case Item::PHOTO: + $imageUrl = $item->getMediaOrAd()->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $baseImageDir, $userName); + // if ($res == 0) { + // return; + // } + break; + case Item::VIDEO: + $videoUrl = $item->getMediaOrAd()->getVideoVersions()[0]->getUrl(); + $res = $this->downloadFile($videoUrl, 0, $baseImageDir, $userName); + // if ($res == 0) { + // return; + // } + break; + case Item::CAROUSEL: + foreach ($item->getMediaOrAd()->getCarouselMedia() as $imageItem) { + $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $baseImageDir, $userName); + // if ($res == 0) { + // return; + // } + } + break; + } + $count++; + if ($count > 100) { + return; + } + sleep(5 * random_int(1, 10)); + } + // Now we must update the maxId variable to the "next page". + // This will be a null value again when we've reached the last page! + // And we will stop looping through pages as soon as maxId becomes null. + $maxId = $response->getNextMaxId(); + echo "\n new maxId: " . $maxId . "\n"; + + // Sleep for 5 seconds before requesting the next page. This is just an + // example of an okay sleep time. It is very important that your scripts + // always pause between requests that may run very rapidly, otherwise + // Instagram will throttle you temporarily for abusing their API! + echo "\n Sleeping for 5s...\n"; + sleep(5 * random_int(1, 100)); + } while ($maxId != null); + } catch (Exception $e) { + echo 'scrapeFeeds something went wrong: ' . $e->getTraceAsString() . "\n"; + } + } + + public function scrapeFeedsV2() { + $count = 0; + + $baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/Likes_new/"; + try { + // $maxId = "KLYBARoAIAGQAGgASAAwACAAGAAQAAgACAAIAAgACABjuCa_l9v-dr3zx9F7Xp3d-L1r6Vo3DXT_6R-tfP2empv10y5ZsWklYjcXJGpsa50zvaA350LlHBg6cDmivafrIrGQn7gexjClt1_a0r7vgPD6h-s5vczr03H-cNX93_-_f-1Hv1q7_u31__j_-fP7Syn89b577Gk3bPR9K73-l1cMOsnNQL7SxQf8bSAUtXxMoRCYHMIwAEAWpJua5YZhRhgpBBkEIjIA"; + $maxId = null; + do { + $response = $this->queryTimeLineSingle($maxId); + // Log::info("response: " . $response->asJson()); + foreach ($response->getFeedItems() as $item) { + if ($item->getMediaOrAd() == null || $item->getMediaOrAd()->getProductType() == "ad") { + continue; + } + // else{ + // echo json_encode($item->getMediaOrAd()) . "\n"; + // echo "product type: " . $item->getMediaOrAd()->getProductType(). "\n"; + // echo $item->getMediaOrAd()->getUser()->getUsername() . "\n"; + // echo "ad id "; + // echo $item->getMediaOrAd()->getAdId() ; + // echo "\n"; + // echo "is add4ad ". $item->isAd4ad() . "\n"; + // echo "is add link type" . $item->isAdLinkType() . "\n"; + // echo "is media or ad" . $item->isMediaOrAd() . "\n"; + // } + // if () + if ($item->getMediaOrAd()->getAdId() != null || $item->getMediaOrAd()->getUser() == null || $item->getMediaOrAd()->getUser()->getUsername() == null) { + Log::info("current item " . $item->asJson()); + continue; + } + $userName = $item->getMediaOrAd()->getUser()->getUsername() . "_"; + + switch ($item->getMediaOrAd()->getMediaType()) { + case Item::PHOTO: + $imageUrl = $item->getMediaOrAd()->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $baseImageDir, $userName); + // if ($res == 0) { + // return; + // } + break; + case Item::VIDEO: + $videoUrl = $item->getMediaOrAd()->getVideoVersions()[0]->getUrl(); + $res = $this->downloadFile($videoUrl, 0, $baseImageDir, $userName); + // if ($res == 0) { + // return; + // } + break; + case Item::CAROUSEL: + foreach ($item->getMediaOrAd()->getCarouselMedia() as $imageItem) { + $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $baseImageDir, $userName); + // if ($res == 0) { + // return; + // } + } + break; + } + $count++; + if ($count > 50) { + return; + } + sleep(5 * random_int(1, 10)); + } + // Now we must update the maxId variable to the "next page". + // This will be a null value again when we've reached the last page! + // And we will stop looping through pages as soon as maxId becomes null. + $maxId = $response->getNextMaxId(); + // exit; + echo "\n new maxId: " . $maxId . "\n"; + Log::info("current maxId: " . $maxId); + + // Sleep for 5 seconds before requesting the next page. This is just an + // example of an okay sleep time. It is very important that your scripts + // always pause between requests that may run very rapidly, otherwise + // Instagram will throttle you temporarily for abusing their API! + echo "\n Sleeping for 5s...\n"; + sleep(5 * random_int(1, 100)); + } while ($maxId != null); + } catch (Exception $e) { + echo $e->getMessage();exit; + echo 'scrapeFeeds something went wrong: ' . $e->getTraceAsString() . "\n"; + } + } + + public function scrapeUsers($start = 0) { + + // $list = $ig->collection->getFeed("17906577283646940"); + // dump($list->getItems()[0]->getMedia()->getCarouselMedia());exit; + + $baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/"; + + try { + + $userList = file("/Users/shixuesen/OneDrive/Pictures/instagram/user.txt"); + $userList = array_slice($userList, $start, 55); + // $userList = ['1992.ai_']; + // print_r($userList);exit; + // print_r($userList); + foreach ($userList as $userName) { + $trueName = trim($userName); + // echo $trueName;exit; + $thisUserImageDir = $baseImageDir . $trueName . "/"; + // $existFiles = $this->traceExistFiles($thisUserImageDir); + try { + $userId = $this->ig->people->getUserIdForName(trim($userName)); + } catch (Exception $e) { + // if ($e instanceof UserNotFou) + Log::error("ins get user id for name error: " . $e->getMessage() . " username is " . $userName); + $userId = null; + if (array_key_exists(trim($userName), $this->userList)) { + $userId = Arr::get($userList, trim($userName)); + } + if ($userId == null) { + continue; + } + // continue; + } + echo "\n username: " . $trueName . " " . $userId . "\n"; + // continue; + + // if ($trueName == 'sabrina888888_') { + // echo "\n______________________\n"; + // $maxId = '1451179182821586881_19900699'; + // } else { + + try { + $response = $this->ig->story->getUserReelMediaFeed($userId); + } catch (Exception $e) { + Log::error("current user has error, $userName, " . $e->getMessage()); + } + foreach ($response->getItems() as $item) { + if (Item::VIDEO == $item->getMediaType()) { + $videoUrl = $item->getVideoVersions()[0]->getUrl(); + $res = $this->downloadFile($videoUrl, 0, $thisUserImageDir); + } + } + // echo $item[0]->getVideoVersions()[0]->getUrl(); + sleep(5 * random_int(1, 10)); + $maxId = null; + // } + do { + // Request the page corresponding to maxId. + echo "\n current maxId: " . $maxId; + try { + $response = $this->ig->timeline->getUserFeed($userId, $maxId); + } catch (Exception $e) { + Log::error("current user has error, $userName, " . $e->getMessage()); + continue 2; + } + + // In this example we're simply printing the IDs of this page's items. + foreach ($response->getItems() as $item) { + switch ($item->getMediaType()) { + case Item::PHOTO: + $imageUrl = $item->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $thisUserImageDir); + $filename = $this->parseExactFileName($imageUrl); + // Ins::firstOrCreate(['image_name' => $filename], [ + // 'username' => $userName, + // 'image_url' => $imageUrl + // ]); + if ($res == 0) { + goto a; + } + break; + case Item::VIDEO: + $videoUrl = $item->getVideoVersions()[0]->getUrl(); + $res = $this->downloadFile($videoUrl, 0, $thisUserImageDir); + $filename = $this->parseExactFileName($videoUrl); + // Ins::firstOrCreate(['image_name' => $filename], [ + // 'username' => $userName, + // 'image_url' => $videoUrl + // ]); + if ($res == 0) { + goto a; + } + break; + case Item::CAROUSEL: + foreach ($item->getCarouselMedia() as $imageItem) { + $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $thisUserImageDir); + $filename = $this->parseExactFileName($imageUrl); + // Ins::firstOrCreate(['image_name' => $filename], [ + // 'username' => $userName, + // 'image_url' => $imageUrl + // ]); + if ($res == 0) { + goto a; + } + } + break; + } + + // printf("[%s] https://instagram.com/p/%s/\n", $item->getId(), $item->getCode()); + sleep(5 * random_int(1, 10)); + } + + // Now we must update the maxId variable to the "next page". + // This will be a null value again when we've reached the last page! + // And we will stop looping through pages as soon as maxId becomes null. + $maxId = $response->getNextMaxId(); + echo "\n new maxId: " . $maxId . "\n"; + + // Sleep for 5 seconds before requesting the next page. This is just an + // example of an okay sleep time. It is very important that your scripts + // always pause between requests that may run very rapidly, otherwise + // Instagram will throttle you temporarily for abusing their API! + echo "\n Sleeping for 5s...\n"; + sleep(10); + } while ($maxId !== null); // Must use "!==" for comparison instead of "!=". + a: + } + // Get the UserPK ID for "natgeo" (National Geographic). + /** + * $userId = $ig->people->getUserIdForName('nyanchan22'); + * + * // Starting at "null" means starting at the first page. + * $maxId = null; + * do { + * // Request the page corresponding to maxId. + * $response = $ig->timeline->getUserFeed($userId, $maxId); + * + * // In this example we're simply printing the IDs of this page's items. + * foreach ($response->getItems() as $item) { + * printf("[%s] https://instagram.com/p/%s/\n", $item->getId(), $item->getCode()); + * } + * + * // Now we must update the maxId variable to the "next page". + * // This will be a null value again when we've reached the last page! + * // And we will stop looping through pages as soon as maxId becomes null. + * $maxId = $response->getNextMaxId(); + * + * // Sleep for 5 seconds before requesting the next page. This is just an + * // example of an okay sleep time. It is very important that your scripts + * // always pause between requests that may run very rapidly, otherwise + * // Instagram will throttle you temporarily for abusing their API! + * echo "Sleeping for 5s...\n"; + * sleep(5); + * } while ($maxId !== null); // Must use "!==" for comparison instead of "!=". + */ + } catch (Exception $e) { + echo 'scrapeUsers something went wrong: ' . $e->getTraceAsString() . "\n"; + } + } + + public function scrapeUsersV2($start = 0, $singleUser) { + + // $list = $ig->collection->getFeed("17906577283646940"); + // dump($list->getItems()[0]->getMedia()->getCarouselMedia());exit; + + $baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/"; + + try { + if ($singleUser == null) { + $len = Redis::connection()->llen(self::INS_USER_KEY); + $toQueryUsers = []; + if ($len < 10) { + $toQueryUsers = Redis::connection()->lrange(self::INS_USER_KEY, 0, -1); + $userList = file("/Users/shixuesen/OneDrive/Pictures/instagram/user.txt"); + shuffle($userList); + $toQueryUsers = array_merge($toQueryUsers, array_slice($userList, 0, 10 - $len)); + Redis::connection()->del(self::INS_USER_KEY); + Redis::connection()->lpush(self::INS_USER_KEY, array_slice($userList, 10 - $len)); + } else { + $toQueryUsers = Redis::connection()->lrange(self::INS_USER_KEY, 0, 9); + Redis::connection()->ltrim(self::INS_USER_KEY, 10, -1); + } + $alwaysNeedToQueryUsers = []; + $alwaysNeedToQueryUsers = ["gawonaa", "bonnie.90106_", "jiee_wen", "hazyryu", "mikamikatn", "boram__jj", "cho_hyunyoung", "cxxsomi", "inkyung97", "na0912mi", "naughty_rabbit_", "sejinming", "zyzyxin222"]; + // "bonnie.90106_", "amy00522", "bitnara1105", "zhizhibooty", "_azhua", "exy_s2", "colin.anthony2", "7alice77", "leeesovelys2", "anran.1033", "doly0818", "siawase726", "yifei_cc", "17_chill", "shinapit46", "crissielee_", + $toQueryUsers = array_unique(array_merge($alwaysNeedToQueryUsers, $toQueryUsers)); + } else { + if (is_array($singleUser)) { + $toQueryUsers = $singleUser; + } else { + $toQueryUsers[] = $singleUser; + } + } + + // dump($toQueryUsers);exit; + + // $userList = array_slice($userList, $start, 20); + // $userList = ['1992.ai_']; + // print_r($userList);exit; + // print_r($userList); + //$userList = ["ngoctrinh89"]; + // $userList = ["_2km2km_", "2km2km", "janed_404"]; + // $userList = ["mobe_carrie0223", "na0912mi", "naughty_rabbit_", "sejinming", "zyzyxin222"]; + $userList = $toQueryUsers; + // 打乱下 + shuffle($userList); + $efficientUserList = []; + $recentUsers = Redis::connection()->smembers(self::TODAY_USER_KEY); + foreach ($userList as $userName) { + if (empty($recentUsers) || !in_array($userName, $recentUsers)) { + $efficientUserList[] = $userName; + } + } + $userList = $efficientUserList; + + // cherry_quahst 2928997722502282551_22834825 + // $userList = ["shinapit46"]; + + // 跳过逻辑 + $skipUsers = ["youbastardddd", "hanna91914", "amandacerny"]; + foreach ($userList as $userName) { + if (in_array($userName, $skipUsers)) { + continue; + } + $trueName = trim($userName); + // echo $trueName;exit; + + $thisUserImageDir = $baseImageDir . $trueName . DIRECTORY_SEPARATOR; + if (!is_dir($thisUserImageDir)) { + mkdir($thisUserImageDir); + } + // echo "open $thisUserImageDir \n"; + // shell_exec("open -g '$thisUserImageDir'"); + // sleep(1*60); + + if (array_key_exists($trueName, $this->userAliasMap)) { + $trueName = trim($this->userAliasMap[$trueName]); + } + + // $existFiles = $this->traceExistFiles($thisUserImageDir); + // try { + // $userId = $this->ig->people->getUserIdForName(trim($userName)); + // } catch (Exception $e) { + // // if ($e instanceof UserNotFou) + // Log::error("ins get user id for name error: " . $e->getMessage() . " username is " . $userName); + // $userId = null; + // if (array_key_exists(trim($userName), $this->userList)) { + // $userId = Arr::get($this->userList, trim($userName)); + // } + // if ($userId == null) { + // continue; + // } + // // continue; + // } + $userId = Arr::get($this->userListNew, trim($trueName)); + if ($userId == null) { + $userId = Arr::get($this->userList, trim($trueName)); + if ($userId == null) { + echo "{$trueName} id is null"; + continue; + // exit; + } + } + echo "\n username: " . $trueName . " " . $userId . "\n"; + // continue; + + // if ($trueName == 'sabrina888888_') { + // echo "\n______________________\n"; + // $maxId = '1451179182821586881_19900699'; + // } else { + + $maxId = null; + // } + $count = 0; + $existCount = 0; + do { + // Request the page corresponding to maxId. + echo "\n current maxId: " . $maxId; + try { + $response = $this->userFeed($userId, $maxId); + } catch (Exception $e) { + Log::error("current user has error, $userName, " . $e->getMessage()); + if (str_contains($e->getMessage(), "400 Bad Request")) { + exit; + } + continue 2; + } + // In this example we're simply printing the IDs of this page's items. + foreach ($response->getItems() as $item) { + switch ($item->getMediaType()) { + case Item::PHOTO: + $imageUrl = $item->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $thisUserImageDir); + $filename = $this->parseExactFileName($imageUrl); + // Ins::firstOrCreate(['image_name' => $filename], [ + // 'username' => $userName, + // 'image_url' => $imageUrl + // ]); + if ($res == 0) { + $existCount++; + // goto a; + } + break; + case Item::VIDEO: + $videoUrl = $item->getVideoVersions()[0]->getUrl(); + $res = $this->downloadFile($videoUrl, 0, $thisUserImageDir); + $filename = $this->parseExactFileName($videoUrl); + // Ins::firstOrCreate(['image_name' => $filename], [ + // 'username' => $userName, + // 'image_url' => $videoUrl + // ]); + if ($res == 0) { + $existCount++; + // goto a; + } + break; + case Item::CAROUSEL: + foreach ($item->getCarouselMedia() as $imageItem) { + $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $thisUserImageDir); + $filename = $this->parseExactFileName($imageUrl); + // Ins::firstOrCreate(['image_name' => $filename], [ + // 'username' => $userName, + // 'image_url' => $imageUrl + // ]); + if ($res == 0) { + $existCount++; + // goto a; + } + } + break; + } + + // printf("[%s] https://instagram.com/p/%s/\n", $item->getId(), $item->getCode()); + sleep(1 * random_int(1, 10)); + $count++; + } + + // Now we must update the maxId variable to the "next page". + // This will be a null value again when we've reached the last page! + // And we will stop looping through pages as soon as maxId becomes null. + if ($singleUser != null || (is_array($singleUser) && count($singleUser) > 0)) { + if ($count - $existCount > (100 + random_int(0, 20)) || $count > 200) { + // || $count > (50 + random_int(0, 20)) + Log::info("new count bigger than 100", ['user' => $trueName]); + goto a; + } + } else { + if ($count > (20 + random_int(0, 20)) || $count - $existCount > 10) { + goto a; + } + } + $maxId = $response->getNextMaxId(); + echo "\n new maxId: " . $maxId . "\n"; + + // Sleep for 5 seconds before requesting the next page. This is just an + // example of an okay sleep time. It is very important that your scripts + // always pause between requests that may run very rapidly, otherwise + // Instagram will throttle you temporarily for abusing their API! + echo "\n Sleeping for 5s...\n"; + sleep(10); + } while ($maxId !== null); // Must use "!==" for comparison instead of "!=". + a: + Redis::connection()->sadd(self::TODAY_USER_KEY, $userName); + $lastSeconds = strtotime(date("Y-m-d 23:59:59")); + Redis::connection()->expireat(self::TODAY_USER_KEY, $lastSeconds); + } + // Get the UserPK ID for "natgeo" (National Geographic). + /** + * $userId = $ig->people->getUserIdForName('nyanchan22'); + * + * // Starting at "null" means starting at the first page. + * $maxId = null; + * do { + * // Request the page corresponding to maxId. + * $response = $ig->timeline->getUserFeed($userId, $maxId); + * + * // In this example we're simply printing the IDs of this page's items. + * foreach ($response->getItems() as $item) { + * printf("[%s] https://instagram.com/p/%s/\n", $item->getId(), $item->getCode()); + * } + * + * // Now we must update the maxId variable to the "next page". + * // This will be a null value again when we've reached the last page! + * // And we will stop looping through pages as soon as maxId becomes null. + * $maxId = $response->getNextMaxId(); + * + * // Sleep for 5 seconds before requesting the next page. This is just an + * // example of an okay sleep time. It is very important that your scripts + * // always pause between requests that may run very rapidly, otherwise + * // Instagram will throttle you temporarily for abusing their API! + * echo "Sleeping for 5s...\n"; + * sleep(5); + * } while ($maxId !== null); // Must use "!==" for comparison instead of "!=". + */ + } catch (Exception $e) { + echo 'scrapeUsers something went wrong: ' . $e->getTraceAsString() . "\n"; + } + } + + public function scrapeUsersInFile($file) { + + $baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/"; + + try { + + $userList = file($file); + foreach ($userList as $userName) { + $trueName = trim($userName); + $thisUserImageDir = $baseImageDir . $trueName . DIRECTORY_SEPARATOR; + if (!is_dir($thisUserImageDir)) { + mkdir($thisUserImageDir); + } + try { + $userId = $this->ig->people->getUserIdForName(trim($userName)); + } catch (Exception $e) { + // if ($e instanceof UserNotFou) + Log::error("ins get user id for name error: " . $e->getMessage() . " username is " . $userName); + $userId = null; + if (array_key_exists(trim($userName), $this->userList)) { + $userId = Arr::get($userList, trim($userName)); + } + if ($userId == null) { + continue; + } + } + echo "\n username: " . $trueName . " " . $userId . "\n"; + + try { + $response = $this->ig->story->getUserReelMediaFeed($userId); + } catch (Exception $e) { + Log::error("current user has error, $userName, " . $e->getMessage()); + } + foreach ($response->getItems() as $item) { + if (Item::VIDEO == $item->getMediaType()) { + $videoUrl = $item->getVideoVersions()[0]->getUrl(); + $res = $this->downloadFile($videoUrl, 0, $thisUserImageDir); + } + } + $userItemNum = 0; + sleep(5 * random_int(1, 10)); + $maxId = null; + do { + // Request the page corresponding to maxId. + echo "\n current maxId: " . $maxId; + try { + $response = $this->ig->timeline->getUserFeed($userId, $maxId); + } catch (Exception $e) { + Log::error("current user has error, $userName, " . $e->getMessage()); + continue 2; + } + + // In this example we're simply printing the IDs of this page's items. + foreach ($response->getItems() as $item) { + switch ($item->getMediaType()) { + case Item::PHOTO: + $imageUrl = $item->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $thisUserImageDir); + break; + case Item::VIDEO: + $videoUrl = $item->getVideoVersions()[0]->getUrl(); + $res = $this->downloadFile($videoUrl, 0, $thisUserImageDir); + break; + case Item::CAROUSEL: + foreach ($item->getCarouselMedia() as $imageItem) { + $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $thisUserImageDir); + } + break; + } + + sleep(5 * random_int(1, 10)); + $userItemNum++; + if ($userItemNum > 5500) { + break; + } + } + + // Now we must update the maxId variable to the "next page". + // This will be a null value again when we've reached the last page! + // And we will stop looping through pages as soon as maxId becomes null. + $maxId = $response->getNextMaxId(); + echo "\n new maxId: " . $maxId . "\n"; + + // Sleep for 5 seconds before requesting the next page. This is just an + // example of an okay sleep time. It is very important that your scripts + // always pause between requests that may run very rapidly, otherwise + // Instagram will throttle you temporarily for abusing their API! + echo "\n Sleeping for 5s...\n"; + sleep(10); + } while ($maxId !== null); // Must use "!==" for comparison instead of "!=". + a: + } + // Get the UserPK ID for "natgeo" (National Geographic). + /** + * $userId = $ig->people->getUserIdForName('nyanchan22'); + * + * // Starting at "null" means starting at the first page. + * $maxId = null; + * do { + * // Request the page corresponding to maxId. + * $response = $ig->timeline->getUserFeed($userId, $maxId); + * + * // In this example we're simply printing the IDs of this page's items. + * foreach ($response->getItems() as $item) { + * printf("[%s] https://instagram.com/p/%s/\n", $item->getId(), $item->getCode()); + * } + * + * // Now we must update the maxId variable to the "next page". + * // This will be a null value again when we've reached the last page! + * // And we will stop looping through pages as soon as maxId becomes null. + * $maxId = $response->getNextMaxId(); + * + * // Sleep for 5 seconds before requesting the next page. This is just an + * // example of an okay sleep time. It is very important that your scripts + * // always pause between requests that may run very rapidly, otherwise + * // Instagram will throttle you temporarily for abusing their API! + * echo "Sleeping for 5s...\n"; + * sleep(5); + * } while ($maxId !== null); // Must use "!==" for comparison instead of "!=". + */ + } catch (Exception $e) { + echo 'scrapeUsers something went wrong: ' . $e->getTraceAsString() . "\n"; + } + } + + public function scrapeCollection() { + + // dump($list->getItems()[0]->getMedia()->getCarouselMedia()); + + $collectImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/collect/"; + + $maxId = null; + // } + do { + // Request the page corresponding to maxId. + echo "\n current maxId: " . $maxId; + $response = $this->ig->collection->getFeed("17906577283646940", $maxId); + // In this example we're simply printing the IDs of this page's items. + foreach ($response->getItems() as $item) { + $userFullName = str_replace("/", "", $item->getMedia()->getUser()->getFullName()); + switch ($item->getMedia()->getMediaType()) { + case Item::PHOTO: + $imageUrl = $item->getMedia()->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $collectImageDir, $userFullName . "-"); + $filename = $this->parseExactFileName($imageUrl); + // Ins::firstOrCreate(['image_name' => $filename], [ + // 'username' => $userName, + // 'image_url' => $imageUrl + // ]); + if ($res == 0) { + return; + } + break; + case Item::VIDEO: + $videoUrl = $item->getMedia()->getVideoVersions()[0]->getUrl(); + $res = $this->downloadFile($videoUrl, 0, $collectImageDir, $userFullName . "-"); + $filename = $this->parseExactFileName($videoUrl); + // Ins::firstOrCreate(['image_name' => $filename], [ + // 'username' => $userName, + // 'image_url' => $videoUrl + // ]); + if ($res == 0) { + return; + } + break; + case Item::CAROUSEL: + foreach ($item->getMedia()->getCarouselMedia() as $imageItem) { + $imageUrl = $imageItem->getImageVersions2()->getCandidates()[0]->getUrl(); + $res = $this->downloadFile($imageUrl, 0, $collectImageDir, $userFullName . "-"); + $filename = $this->parseExactFileName($imageUrl); + // Ins::firstOrCreate(['image_name' => $filename], [ + // 'username' => $userName, + // 'image_url' => $imageUrl + // ]); + if ($res == 0) { + return; + } + } + break; + } + + // printf("[%s] https://instagram.com/p/%s/\n", $item->getId(), $item->getCode()); + sleep(5 * random_int(1, 10)); + } + echo "\n Sleeping for 5s...\n"; + sleep(10); + } while ($maxId !== null); + } + + public function scanLocalFiles($baseDir = '/Users/shixuesen/OneDrive/Pictures/instagram/') { + $dirs = scandir($baseDir, 1); + foreach ($dirs as $subDir) { + if ($subDir == '.' || $subDir == '..') { + continue; + } + $subPath = $baseDir . $subDir; + if (is_dir($subPath)) { + $files = scandir($subPath); + foreach ($files as $file) { + if ($file == '.' || $file == '..') { + continue; + } + echo "now file: " . $file . "\n"; + Ins::firstOrCreate(['image_name' => $file], [ + 'username' => $subDir, + 'is_uploaded' => 1, + 'image_url' => '', + ]); + } + } + } + } + + public function testNewApi() { + } + + public function getUserNameById($id = 13305603901) { + $ig = new Instagram($this->debug, $this->truncatedDebug); + + try { + $ig->login($this->username, $this->password); + } catch (Exception $e) { + echo 'Something went wrong: ' . $e->getMessage() . "\n"; + exit(0); + } + + dump($ig->people->getInfoById($id)); + exit; + $response = $ig->user->getUserFeed('6794713533', null); + // $response = $ig->story->getUserReelMediaFeed('12801506409'); + dump($response); + exit; + + $rankToken = \InstagramAPI\Signatures::generateUUID(); + $res = $ig->people->getSelfFollowing($rankToken); + Log::info($res->asJson()); + dump($res); + exit; + $users = $res->getUsers(); + foreach ($users as $user) { + Log::info(json_encode($user->getUserId())); + if ($user->getPk() == '12801506409' || $user->getUserId() == '12801506409') { + dump($user); + } + } + } + + public function queryFollowUsers() { + $params = []; + $params["id"] = 13305603901; + $params["include_reel"] = true; + $params["first"] = 12; + $params["fetch_mutual"] = false; + $var = json_encode($params); + + $curl = curl_init(); + + curl_setopt_array($curl, array( + CURLOPT_URL => "https://www.instagram.com/graphql/query/?query_hash=d04b0a864b4b54837c0d870b0e77e076&variables=$var", + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => "", + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => "GET", + CURLOPT_HTTPHEADER => array( + "authority: www.instagram.com", + "pragma: no-cache", + "cache-control: no-cache", + "accept: */*", + "x-ig-www-claim: hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvNm6", + "x-requested-with: XMLHttpRequest", + "user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36", + "x-csrftoken: 7WVPjhWHhNqm2h1wcnslDgdkJJ9Ahqc6", + "x-ig-app-id: 936619743392459", + "sec-fetch-site: same-origin", + "sec-fetch-mode: cors", + "referer: https://www.instagram.com/nicksxs/following/", + "accept-encoding: gzip, deflate, br", + "accept-language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6,ja;q=0.5", + "cookie: mid=XPJbKwAEAAEjcIilinpyKblsZqyx; fbm_124024574287414=base_domain=.instagram.com; ig_cb=1; ig_did=398CBD62-5C55-40BF-B917-0972BEE47035; csrftoken=7WVPjhWHhNqm2h1wcnslDgdkJJ9Ahqc6; ds_user_id=361404591; sessionid=361404591%3AJSLulZCziyeBSQ%3A5; shbid=13796; shbts=1581407718.4487948; rur=PRN; urlgen=\"{\"2607:fcd0:100:4600::5:d6c0\": 8100}:1j1Qy8:f8y9XAMkFUmNt5rl-hcF2hx9-74\"", + ), + )); + + $response = curl_exec($curl); + + curl_close($curl); + echo $response; + } + + public function commonRequest($url = "https://www.instagram.com/graphql/query/", $params = []) { + $header = [ + "authority" => "www.instagram.com", + "pragma" => "no-cache", + "cache-control" => "no-cache", + "accept" => "*/*", + "x-ig-www-claim" => "hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvNm6", + "x-requested-with" => "XMLHttpRequest", + "user-agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36", + "x-csrftoken" => "7WVPjhWHhNqm2h1wcnslDgdkJJ9Ahqc6", + "x-ig-app-id" => "936619743392459", + "sec-fetch-site" => "same-origin", + "sec-fetch-mode" => "cors", + "referer" => "https://www.instagram.com/nicksxs/following/", + "accept-encoding" => "gzip, deflate, br", + "accept-language" => "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6,ja;q=0.5", + // "cookie" => " mid=XPJbKwAEAAEjcIilinpyKblsZqyx; fbm_124024574287414=base_domain=.instagram.com; ig_cb=1; ig_did=398CBD62-5C55-40BF-B917-0972BEE47035; csrftoken=7WVPjhWHhNqm2h1wcnslDgdkJJ9Ahqc6; ds_user_id=361404591; sessionid=361404591%3AJSLulZCziyeBSQ%3A5; shbid=13796; shbts=1581407718.4487948; rur=PRN; urlgen=\"{\"2607:fcd0:100:4600::5:d6c0\": 8100}:1j1Qy8:f8y9XAMkFUmNt5rl-hcF2hx9-74\"" + ]; + + $cookieJar = CookieJar::fromArray([ + 'sessionid' => '361404591%3Ab13E3MH2Eis7QW%3A13', + 'ds_user_id' => '361404591', + 'ig_did' => '4B0E363A-C65C-4311-8117-CD49993B46F3', + 'mid' => 'Xi2DdwAEAAFfFk6izuuXW0tMPSEx', + 'rur' => 'PRN', + 'shbid' => '13796', + 'shbts' => '1581259038.7557411', + 'urlgen' => '"{\"152.32.187.149\": 135377}:1j1sXK:mckgvU-Hvlbl4BuOgZrh21n1bjQ"', + ], '.instagram.com'); + $params = []; + $params["id"] = 361404591; + $params["include_reel"] = true; + $params["first"] = 12; + $params["fetch_mutual"] = false; + $var = json_encode($params); + // echo $var; + $query = [ + "variables" => $var, + "query_hash" => "d04b0a864b4b54837c0d870b0e77e076", + ]; + // $url = $url . "?query_hash=d04b0a864b4b54837c0d870b0e77e076&variables=$var"; + dump($url); + $request = new Client(); + $res = $request->request( + "GET", + $url, + [ + "headers" => $header, + "query" => $query, + "cookies" => $cookieJar, + 'proxy' => [ + 'http' => 'http://127.0.0.1:1087', // Use this proxy with "http" + 'https' => 'http://127.0.0.1:1087', // Use this proxy with "https", + ], + 'timeout' => 2000, + 'http_errors' => true, + ] + ); + $follow = json_decode($res->getBody()->getContents(), true)["data"]["user"]["edge_follow"]; + $pageInfo = $follow["page_info"]; + while ($pageInfo["has_next_page"]) { + $users = $follow["edges"]; + foreach ($users as $user) { + echo $user["node"]["username"]; + echo " \t"; + echo $user["node"]["id"]; + echo "\n"; + } + $params["after"] = $pageInfo["end_cursor"]; + $var = json_encode($params); + // echo $var; + $query = [ + "variables" => $var, + "query_hash" => "d04b0a864b4b54837c0d870b0e77e076", + ]; + $res = $request->request( + "GET", + $url, + [ + "headers" => $header, + "query" => $query, + "cookies" => $cookieJar, + 'proxy' => [ + 'http' => 'http://127.0.0.1:1087', // Use this proxy with "http" + 'https' => 'http://127.0.0.1:1087', // Use this proxy with "https", + ], + 'timeout' => 2000, + 'http_errors' => true, + ] + ); + $follow = json_decode($res->getBody()->getContents(), true)["data"]["user"]["edge_follow"]; + $pageInfo = $follow["page_info"]; + } + + exit; + while (count($res->getBody()->getContents()) > 0) { + $data = json_decode($res->getBody()->getContents()); + dump($data); + exit; + } + // dump($res->getBody()->getContents()); + } + + public function singleQuery($maxId = null) { + + $curl = curl_init(); + + $postFields = "device_id=99BFED75-73D9-415E-90D3-7A5F7B1EC00A&is_async_ads_rti=0&is_async_ads_double_request=0&rti_delivery_backend=0&is_async_ads_in_headload_enabled=0"; + if ($maxId != null) { + $postFields .= "&max_id={$maxId}"; + } + + curl_setopt_array($curl, array( + CURLOPT_URL => 'https://i.instagram.com/api/v1/feed/timeline/', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POSTFIELDS => 'device_id=99BFED75-73D9-415E-90D3-7A5F7B1EC00A&is_async_ads_rti=0&is_async_ads_double_request=0&rti_delivery_backend=0&is_async_ads_in_headload_enabled=0', + CURLOPT_HTTPHEADER => array( + 'authority: i.instagram.com', + 'accept: */*', + 'accept-language: zh-CN,zh;q=0.9', + 'cache-control: no-cache', + 'content-type: application/x-www-form-urlencoded', + 'cookie: ig_did=99BFED75-73D9-415E-90D3-7A5F7B1EC00A; mid=X8CXRQAEAAHx-Hj80MJnsfNCB0yg; datr=NQfTX4X4dXyNB64vmn-0iRCP; fbm_124024574287414=base_domain=.instagram.com; dpr=2; shbid="10286\\054361404591\\0541692883356:01f777d3b0318164b2056c2bfe376b92ee0f3bd65651a75dbb9efe2f00b9a09b8cf87de5"; shbts="1661347356\\054361404591\\0541692883356:01f725828117d2dd4571a5a9cc6824c7b0d6da88565a31a1e1fa30e4eed7454aba4ca7a9"; ig_nrcb=1; fbsr_124024574287414=NbdGv2d7ug1fHkWPQX9KvTvNgDIHKD3yPGm1WrJGb4Q.eyJ1c2VyX2lkIjoiMTAwMDA3ODU5ODI1MDQ3IiwiY29kZSI6IkFRQjdrdkdYNUJydjdoZjJCR05IUkxmSjhQRHp6eFEweV9jb2RpNlI0LVA2SkVtY09kYmNrSFp0RjNJRTN3Qy1oLUIxUEtmdWdrREs0MktsVThONC1WTU5OaXVkNmw2bjhnTHVSV2pqNGVCVnhsakFKRGxoVGN3SUxHbnl6TWJmV0dRc2otVExQOWVpYnRtaURWcUdsU1F1WFVLYy1xb2U5V1huZThHRzNtcE5NZ0JhajZJdlZBU0NXMlZCOHlzbEFnX0pTbDJYaW9tNDJELTVrQUtyZ2FqWWNoM3dIakJiYnE1UFloLVZLV1hhMzMzV0RuSjNwa3FJSE5xWVoySlhPUnB6SzdGUjU0cEY4anRpemtEczRCdzB4WFo3TW5TcHJseXBXRFc3aXhPZk9sQTFNalRtcmVfUE5LUVIzRnhSRUctVFV5cGdWTWlJTExJRXNKVEU5RDlwM00xczRBNGdvemVWTnZlUm5HRmgzUSIsIm9hdXRoX3Rva2VuIjoiRUFBQnd6TGl4bmpZQkFISWF2MDVQT2pYZVJ2Y2drb2dKWG1tUDhlVmdTSEtmcFpDNzZUZVFYNWRWNGFBRGtoWkNWVndJbkRjbGlsSTY5dWdFamdaQnBSMERRTktaQTFMNG5sYXVMWEVaQlpBYkNBc3NhQ1VTZndlZVBFZnloeDJEVGRPTndoUkc0QklVVVJMdktkWkF6U09ZOG1aQ1lIR09BMG9sZ3E3Z21tWWQ5MWw3blBWRUJxYlYiLCJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTY2MTM0NzY1NH0; csrftoken=RZ4aR37h1k5a4thauO540jYPC1PHMxpT; ds_user_id=361404591; sessionid=361404591%3AdI1lmFVKUX5Eyr%3A2%3AAYcSUb4ZjzfjCR7fqCv4MkVctQKvRORGqJDsSnSbLA; rur="NAO\\054361404591\\0541692884140:01f70fc499d6201617e6527e35d1766f8875763f8660a227e69d1c4be3f73e904792e26e"; csrftoken=RZ4aR37h1k5a4thauO540jYPC1PHMxpT; ds_user_id=361404591; rur="EAG\\054361404591\\0541693637104:01f71dc22d7bf4c3c3367f9143da42875838ba34a32e2c05e89572507b0b4c7df62747bf"; sessionid=361404591%3AdI1lmFVKUX5Eyr%3A2%3AAYd8jd8ZwMOSkDqkM406F8NTFZLiIYF7Wc94MzihCw; shbid="10286\\054361404591\\0541693479894:01f73478e70722195fc8655bf88cc407737b830952f250b7406f58c2b6229827d52b1f72"; shbts="1661943894\\054361404591\\0541693479894:01f71f5d0af6912af5933020471b91959ecaf1a06e0ce7156af9778097698cce0cdc8459"', + 'origin: https://www.instagram.com', + 'pragma: no-cache', + 'referer: https://www.instagram.com/', + 'sec-ch-ua: "Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104"', + 'sec-ch-ua-mobile: ?0', + 'sec-ch-ua-platform: "macOS"', + 'sec-fetch-dest: empty', + 'sec-fetch-mode: cors', + 'sec-fetch-site: same-site', + 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36', + 'x-asbd-id: 198387', + 'x-csrftoken: RZ4aR37h1k5a4thauO540jYPC1PHMxpT', + 'x-ig-app-id: 936619743392459', + 'x-ig-www-claim: hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvKG5', + 'x-instagram-ajax: 1006083216', + ), + )); + + $response = curl_exec($curl); + + curl_close($curl); + return $response; + } + + public function queryTimeLineSingle($maxId) { + $client = new Client(); + $headers = [ + 'authority' => 'www.instagram.com', + 'accept' => '*/*', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cache-control' => 'no-cache', + 'content-type' => 'application/x-www-form-urlencoded', + 'cookie' => 'ig_did=1E87B96C-B061-484F-89A8-C76BF8E11C52; ig_nrcb=1; mid=Y0QEJQAEAAGK3xW8v5Uwszo_cBzM; datr=qAREY1W0Mocw3OoikuJcsL1c; ds_user_id=361404591; fbm_124024574287414=base_domain=.instagram.com; fbsr_124024574287414=DbSlSA-tZBTw9JzVnqD5ryNyIo2U7ckE0uZMJ7GVTC8.eyJ1c2VyX2lkIjoiMTAwMDA3ODU5ODI1MDQ3IiwiY29kZSI6IkFRRHp5N2VndUhRZWdRV296WFdmeW5FMXpOVlJBeGM0VDU3UldWR1kwWFlUd21DdmtuY0tFREl6Y080ZzZ0MGo3R1pVRW1wVElQWkxuMXBIcllkX2t5VVBubXZYS3BkSThjOUNaVzREVFZoSzc3ODJoNlVrLVNnUXQ1OFY1UFNXNm9SNFBSNnYzUGJmSE9pdDBpX1pJTmJRUUQybUFBVXNJV2MtaU5IdnNzcGcyZmhkdy1UX2hpbEpPR2Zfc3p3YTFLSm9hbV9yNE1GeGhDbmpYUUlfaDJfUjZiSEhrWTUzZ1UzRkROMXV2MjFKb0NhU3IxYzhaT3Z1VDhXZ2wtc3hsTk5oRFFuSTl2c29pY0xrTmxwUHhrQ21ZQ1Nfd19PVi1OR2tqRl9UU0RQdzRYNjRERlJtTVczZ0tCQmN3TzBUZ1ZRay1XY0QySUc2UHpUT09TY1Z3WDROIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCTzdZSTdxY1pBSEk4cDFITFYyMm9Dc0kzVXdteTdQeXJnMUd6NXpaQVByb0htSnFROTFQOUhKQkFaQ1Rkd2RQb1hYTEZjTTJQc0x3cHBVZ2lBc3ZjUDE2eFFqUUNZZnVRVUpidDdZTzlLVmtrTFd4WkNVRVJRcG90UjZaQjdQOEwxbGxvWkMxS1kzNDFsbkM3RGVIaGlZWkM1R05TbUVldFZZdlZHMGhMcDVuTnA4OFZoVjFydW9KTzJRWkQiLCJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTY5NDM5NjE2OX0; csrftoken=Ui04sky5NhWWDWeXLxYxfPhdKCgqfhu4; sessionid=361404591%3AZBf1YdHhefMkKX%3A11%3AAYdl4U9C6fjdDt0xp8p8CHq_iGCA4EUe77b79RNIXw; shbid="13821\\054361404591\\0541725932196:01f732cd89bc9826f1160617f11f97630898e75f77669f52fbe192cbb392c77aa67f95f6"; shbts="1694396196\\054361404591\\0541725932196:01f736ffd2dc35effaf88e1f7b00784a8c14088d8bbd5eb11b512e2c4f68fb9acf070ef2"; fbsr_124024574287414=DbSlSA-tZBTw9JzVnqD5ryNyIo2U7ckE0uZMJ7GVTC8.eyJ1c2VyX2lkIjoiMTAwMDA3ODU5ODI1MDQ3IiwiY29kZSI6IkFRRHp5N2VndUhRZWdRV296WFdmeW5FMXpOVlJBeGM0VDU3UldWR1kwWFlUd21DdmtuY0tFREl6Y080ZzZ0MGo3R1pVRW1wVElQWkxuMXBIcllkX2t5VVBubXZYS3BkSThjOUNaVzREVFZoSzc3ODJoNlVrLVNnUXQ1OFY1UFNXNm9SNFBSNnYzUGJmSE9pdDBpX1pJTmJRUUQybUFBVXNJV2MtaU5IdnNzcGcyZmhkdy1UX2hpbEpPR2Zfc3p3YTFLSm9hbV9yNE1GeGhDbmpYUUlfaDJfUjZiSEhrWTUzZ1UzRkROMXV2MjFKb0NhU3IxYzhaT3Z1VDhXZ2wtc3hsTk5oRFFuSTl2c29pY0xrTmxwUHhrQ21ZQ1Nfd19PVi1OR2tqRl9UU0RQdzRYNjRERlJtTVczZ0tCQmN3TzBUZ1ZRay1XY0QySUc2UHpUT09TY1Z3WDROIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCTzdZSTdxY1pBSEk4cDFITFYyMm9Dc0kzVXdteTdQeXJnMUd6NXpaQVByb0htSnFROTFQOUhKQkFaQ1Rkd2RQb1hYTEZjTTJQc0x3cHBVZ2lBc3ZjUDE2eFFqUUNZZnVRVUpidDdZTzlLVmtrTFd4WkNVRVJRcG90UjZaQjdQOEwxbGxvWkMxS1kzNDFsbkM3RGVIaGlZWkM1R05TbUVldFZZdlZHMGhMcDVuTnA4OFZoVjFydW9KTzJRWkQiLCJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTY5NDM5NjE2OX0; rur="FRC\\054361404591\\0541725932220:01f77f27fc8923954701627c92a96d87c8da6524ada064bcf32c3a4f6dce539bf1003b92"', + 'origin' => 'https://www.instagram.com', + 'pragma' => 'no-cache', + 'referer' => 'https://www.instagram.com/cho_hyunyoung/', + 'sec-ch-prefers-color-scheme' => 'light', + 'sec-ch-ua' => '"Not/A)Brand";v="99", "Google Chrome";v="115", "Chromium";v="115"', + 'sec-ch-ua-full-version-list' => '"Not/A)Brand";v="99.0.0.0", "Google Chrome";v="115.0.5790.170", "Chromium";v="115.0.5790.170"', + 'sec-ch-ua-mobile' => '?0', + 'sec-ch-ua-platform' => '"macOS"', + 'sec-ch-ua-platform-version' => '"12.6.0"', + 'sec-fetch-dest' => 'empty', + 'sec-fetch-mode' => 'cors', + 'sec-fetch-site' => 'same-origin', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36', + 'viewport-width' => '1512', + 'x-asbd-id' => '129477', + 'x-csrftoken' => 'Ui04sky5NhWWDWeXLxYxfPhdKCgqfhu4', + 'x-ig-app-id' => '936619743392459', + 'x-ig-www-claim' => 'hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvJBm', + 'x-instagram-ajax' => '1007675716', + 'x-requested-with' => 'XMLHttpRequest', + ]; + $options = [ + 'form_params' => [ + 'device_id' => '1E87B96C-B061-484F-89A8-C76BF8E11C52', + 'is_async_ads_rti' => '0', + 'is_async_ads_double_request' => '0', + 'rti_delivery_backend' => '0', + 'is_async_ads_in_headload_enabled' => '0', + ], + ]; + if ($maxId != null) { + $options["form_params"]["max_id"] = $maxId; + } + $request = new Request('POST', 'https://i.instagram.com/api/v1/feed/timeline/', $headers); + $res = $client->sendAsync($request, $options)->wait(); + $resStr = $res->getBody(); + // echo $resStr; + $jsonArray = @json_decode($resStr, true, 512, JSON_BIGINT_AS_STRING); + $response = new Response\TimelineFeedResponse(); + $response->assignObjectData($jsonArray); + return $response; + } + + public function nextTimeLine() { + $client = new Client(); + $headers = [ + 'authority' => 'i.instagram.com', + 'accept' => '*/*', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cache-control' => 'no-cache', + 'content-type' => 'application/x-www-form-urlencoded', + 'cookie' => 'ig_did=1E87B96C-B061-484F-89A8-C76BF8E11C52; ig_nrcb=1; mid=Y0QEJQAEAAGK3xW8v5Uwszo_cBzM; csrftoken=dLe4oZbHolS34IhgbfD6NRaoJ4iilQVM; sessionid=361404591%3A5sOqwyqflJD2pc%3A21%3AAYfM2Z-qqhcSIn4rPP8fQyQwu9PZ03KGjL3wnqW60Q; ds_user_id=361404591; shbid="10286\\054361404591\\0541696938018:01f7596ca6fe3cd1740fef8fecf08fd17c2910140fae26ccb6e274ff56b223f6316d8ee2"; shbts="1665402018\\054361404591\\0541696938018:01f7855bda173a37fd66003ff0e80976169aeaca910868996e5b6fe361db529bc7b913e9"; dpr=2; datr=qAREY1W0Mocw3OoikuJcsL1c; rur="NAO\\054361404591\\0541696938731:01f783e7af0d153ff3c72cecb09542e1984f6259569a1f51923d4e57004fdcef667f7ee8"', + 'origin' => 'https://www.instagram.com', + 'pragma' => 'no-cache', + 'referer' => 'https://www.instagram.com/', + 'sec-ch-ua' => '"Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99"', + 'sec-ch-ua-mobile' => '?0', + 'sec-ch-ua-platform' => '"macOS"', + 'sec-fetch-dest' => 'empty', + 'sec-fetch-mode' => 'cors', + 'sec-fetch-site' => 'same-site', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36', + 'x-asbd-id' => '198387', + 'x-csrftoken' => 'dLe4oZbHolS34IhgbfD6NRaoJ4iilQVM', + 'x-ig-app-id' => '936619743392459', + 'x-ig-www-claim' => 'hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvHHD', + 'x-instagram-ajax' => '1006356620', + ]; + $options = [ + 'form_params' => [ + 'device_id' => '1E87B96C-B061-484F-89A8-C76BF8E11C52', + 'is_async_ads_rti' => '0', + 'is_async_ads_double_request' => '0', + 'rti_delivery_backend' => '0', + 'is_async_ads_in_headload_enabled' => '0', + 'max_id' => 'KHIBEAAgASgAGAAQABAACAAIAAgAe__f____3___9__95__f5____v____3__0_8_3____7_93-_thjntDvZU_uUd_a_fvv_-9_zf_____7_v_-_-f____373_--_dv_f_3_________v_7vyosoHiB0AQAWzumRm_hgRgQpBBkEIjIA', + // 'feed_view_info' => '[{"media_id":"2944578362761275568_50897922219","media_pct":1,"time_info":{"10":475,"25":475,"50":475,"75":475},"version":24}]' + ], + ]; + $request = new Request('POST', 'https://i.instagram.com/api/v1/feed/timeline/', $headers); + $res = $client->sendAsync($request, $options)->wait(); + echo $res->getBody(); + } + + public function userFeed($userId, $maxId): Response\UserFeedResponse { + + $client = new Client(); + $headers = [ + 'authority' => 'www.instagram.com', + 'accept' => '*/*', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cache-control' => 'no-cache', + 'cookie' => 'ig_did=1E87B96C-B061-484F-89A8-C76BF8E11C52; ig_nrcb=1; mid=Y0QEJQAEAAGK3xW8v5Uwszo_cBzM; datr=qAREY1W0Mocw3OoikuJcsL1c; ds_user_id=361404591; fbm_124024574287414=base_domain=.instagram.com; fbsr_124024574287414=DbSlSA-tZBTw9JzVnqD5ryNyIo2U7ckE0uZMJ7GVTC8.eyJ1c2VyX2lkIjoiMTAwMDA3ODU5ODI1MDQ3IiwiY29kZSI6IkFRRHp5N2VndUhRZWdRV296WFdmeW5FMXpOVlJBeGM0VDU3UldWR1kwWFlUd21DdmtuY0tFREl6Y080ZzZ0MGo3R1pVRW1wVElQWkxuMXBIcllkX2t5VVBubXZYS3BkSThjOUNaVzREVFZoSzc3ODJoNlVrLVNnUXQ1OFY1UFNXNm9SNFBSNnYzUGJmSE9pdDBpX1pJTmJRUUQybUFBVXNJV2MtaU5IdnNzcGcyZmhkdy1UX2hpbEpPR2Zfc3p3YTFLSm9hbV9yNE1GeGhDbmpYUUlfaDJfUjZiSEhrWTUzZ1UzRkROMXV2MjFKb0NhU3IxYzhaT3Z1VDhXZ2wtc3hsTk5oRFFuSTl2c29pY0xrTmxwUHhrQ21ZQ1Nfd19PVi1OR2tqRl9UU0RQdzRYNjRERlJtTVczZ0tCQmN3TzBUZ1ZRay1XY0QySUc2UHpUT09TY1Z3WDROIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCTzdZSTdxY1pBSEk4cDFITFYyMm9Dc0kzVXdteTdQeXJnMUd6NXpaQVByb0htSnFROTFQOUhKQkFaQ1Rkd2RQb1hYTEZjTTJQc0x3cHBVZ2lBc3ZjUDE2eFFqUUNZZnVRVUpidDdZTzlLVmtrTFd4WkNVRVJRcG90UjZaQjdQOEwxbGxvWkMxS1kzNDFsbkM3RGVIaGlZWkM1R05TbUVldFZZdlZHMGhMcDVuTnA4OFZoVjFydW9KTzJRWkQiLCJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTY5NDM5NjE2OX0; csrftoken=Ui04sky5NhWWDWeXLxYxfPhdKCgqfhu4; sessionid=361404591%3AZBf1YdHhefMkKX%3A11%3AAYdl4U9C6fjdDt0xp8p8CHq_iGCA4EUe77b79RNIXw; shbid="13821\\054361404591\\0541725932196:01f732cd89bc9826f1160617f11f97630898e75f77669f52fbe192cbb392c77aa67f95f6"; shbts="1694396196\\054361404591\\0541725932196:01f736ffd2dc35effaf88e1f7b00784a8c14088d8bbd5eb11b512e2c4f68fb9acf070ef2"; fbsr_124024574287414=DbSlSA-tZBTw9JzVnqD5ryNyIo2U7ckE0uZMJ7GVTC8.eyJ1c2VyX2lkIjoiMTAwMDA3ODU5ODI1MDQ3IiwiY29kZSI6IkFRRHp5N2VndUhRZWdRV296WFdmeW5FMXpOVlJBeGM0VDU3UldWR1kwWFlUd21DdmtuY0tFREl6Y080ZzZ0MGo3R1pVRW1wVElQWkxuMXBIcllkX2t5VVBubXZYS3BkSThjOUNaVzREVFZoSzc3ODJoNlVrLVNnUXQ1OFY1UFNXNm9SNFBSNnYzUGJmSE9pdDBpX1pJTmJRUUQybUFBVXNJV2MtaU5IdnNzcGcyZmhkdy1UX2hpbEpPR2Zfc3p3YTFLSm9hbV9yNE1GeGhDbmpYUUlfaDJfUjZiSEhrWTUzZ1UzRkROMXV2MjFKb0NhU3IxYzhaT3Z1VDhXZ2wtc3hsTk5oRFFuSTl2c29pY0xrTmxwUHhrQ21ZQ1Nfd19PVi1OR2tqRl9UU0RQdzRYNjRERlJtTVczZ0tCQmN3TzBUZ1ZRay1XY0QySUc2UHpUT09TY1Z3WDROIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCTzdZSTdxY1pBSEk4cDFITFYyMm9Dc0kzVXdteTdQeXJnMUd6NXpaQVByb0htSnFROTFQOUhKQkFaQ1Rkd2RQb1hYTEZjTTJQc0x3cHBVZ2lBc3ZjUDE2eFFqUUNZZnVRVUpidDdZTzlLVmtrTFd4WkNVRVJRcG90UjZaQjdQOEwxbGxvWkMxS1kzNDFsbkM3RGVIaGlZWkM1R05TbUVldFZZdlZHMGhMcDVuTnA4OFZoVjFydW9KTzJRWkQiLCJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTY5NDM5NjE2OX0; rur="FRC\\054361404591\\0541725932220:01f77f27fc8923954701627c92a96d87c8da6524ada064bcf32c3a4f6dce539bf1003b92"', + 'dpr' => '2', + 'pragma' => 'no-cache', + 'referer' => 'https://www.instagram.com/cho_hyunyoung/', + 'sec-ch-prefers-color-scheme' => 'light', + 'sec-ch-ua' => '"Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"', + 'sec-ch-ua-full-version-list' => '"Chromium";v="116.0.5845.179", "Not)A;Brand";v="24.0.0.0", "Google Chrome";v="116.0.5845.179"', + 'sec-ch-ua-mobile' => '?0', + 'sec-ch-ua-model' => '""', + 'sec-ch-ua-platform' => '"macOS"', + 'sec-ch-ua-platform-version' => '"12.6.0"', + 'sec-fetch-dest' => 'empty', + 'sec-fetch-mode' => 'cors', + 'sec-fetch-site' => 'same-origin', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36', + 'viewport-width' => '1512', + 'x-asbd-id' => '129477', + 'x-csrftoken' => 'Ui04sky5NhWWDWeXLxYxfPhdKCgqfhu4', + 'x-ig-app-id' => '936619743392459', + 'x-ig-www-claim' => 'hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvJBm', + 'x-requested-with' => 'XMLHttpRequest', + ]; + $url = "https://i.instagram.com/api/v1/feed/user/{$userId}/?count=12"; + if ($maxId != null) { + $url .= "&max_id={$maxId}"; + } + $request = new Request('GET', $url, $headers); + $res = $client->sendAsync($request)->wait(); + // echo $res->getBody(); + $resStr = $res->getBody(); + // echo $resStr; + Log::info($resStr); + $jsonArray = @json_decode($resStr, true, 512, JSON_BIGINT_AS_STRING); + $response = new Response\UserFeedResponse(); + $response->assignObjectData($jsonArray, false); + return $response; + } + + public function queryUser() { + + $client = new Client(); + $headers = [ + 'authority' => 'i.instagram.com', + 'accept' => '*/*', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cache-control' => 'no-cache', + 'cookie' => 'ig_did=1E87B96C-B061-484F-89A8-C76BF8E11C52; ig_nrcb=1; mid=Y0QEJQAEAAGK3xW8v5Uwszo_cBzM; csrftoken=dLe4oZbHolS34IhgbfD6NRaoJ4iilQVM; ds_user_id=361404591; shbid="10286\\054361404591\\0541696938018:01f7596ca6fe3cd1740fef8fecf08fd17c2910140fae26ccb6e274ff56b223f6316d8ee2"; shbts="1665402018\\054361404591\\0541696938018:01f7855bda173a37fd66003ff0e80976169aeaca910868996e5b6fe361db529bc7b913e9"; dpr=2; datr=qAREY1W0Mocw3OoikuJcsL1c; sessionid=361404591%3A8yKJcm5Zo7zUCg%3A18%3AAYeLTpVvZHm7sVyM9Rz9xK2sRdYriewjsvaEl1-jKw; rur="NAO\\054361404591\\0541697160718:01f7ed7adb1303230d77283542adfa82e17aea2799057985e9fb0d5bf9bc71dc1f53d834"', + 'origin' => 'https://www.instagram.com', + 'pragma' => 'no-cache', + 'referer' => 'https://www.instagram.com/', + 'sec-ch-ua' => '"Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99"', + 'sec-ch-ua-mobile' => '?0', + 'sec-ch-ua-platform' => '"macOS"', + 'sec-fetch-dest' => 'empty', + 'sec-fetch-mode' => 'cors', + 'sec-fetch-site' => 'same-site', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36', + 'x-asbd-id' => '198387', + 'x-csrftoken' => 'dLe4oZbHolS34IhgbfD6NRaoJ4iilQVM', + 'x-ig-app-id' => '936619743392459', + 'x-ig-www-claim' => 'hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvDAG', + 'x-instagram-ajax' => '1006374487', + ]; + $request = new Request('GET', 'https://i.instagram.com/api/v1/users/web_profile_info/?username=zyzyxin222', $headers); + $res = $client->sendAsync($request)->wait(); + echo $res->getBody(); + } + + public function queryFollowing($maxId) { + $client = new Client(); + $headers = [ + 'authority' => 'i.instagram.com', + 'accept' => '*/*', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cache-control' => 'no-cache', + 'cookie' => 'ig_did=1E87B96C-B061-484F-89A8-C76BF8E11C52; ig_nrcb=1; mid=Y0QEJQAEAAGK3xW8v5Uwszo_cBzM; csrftoken=dLe4oZbHolS34IhgbfD6NRaoJ4iilQVM; ds_user_id=361404591; shbid="10286\\054361404591\\0541696938018:01f7596ca6fe3cd1740fef8fecf08fd17c2910140fae26ccb6e274ff56b223f6316d8ee2"; shbts="1665402018\\054361404591\\0541696938018:01f7855bda173a37fd66003ff0e80976169aeaca910868996e5b6fe361db529bc7b913e9"; dpr=2; datr=qAREY1W0Mocw3OoikuJcsL1c; sessionid=361404591%3A8yKJcm5Zo7zUCg%3A18%3AAYeLTpVvZHm7sVyM9Rz9xK2sRdYriewjsvaEl1-jKw; rur="NAO\\054361404591\\0541697161117:01f76650d386b96fb3a69fc8e7f634344f5400d2b251cffb887a98dd900f353d940cdf07"', + 'origin' => 'https://www.instagram.com', + 'pragma' => 'no-cache', + 'referer' => 'https://www.instagram.com/', + 'sec-ch-ua' => '"Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99"', + 'sec-ch-ua-mobile' => '?0', + 'sec-ch-ua-platform' => '"macOS"', + 'sec-fetch-dest' => 'empty', + 'sec-fetch-mode' => 'cors', + 'sec-fetch-site' => 'same-site', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36', + 'x-asbd-id' => '198387', + 'x-csrftoken' => 'dLe4oZbHolS34IhgbfD6NRaoJ4iilQVM', + 'x-ig-app-id' => '936619743392459', + 'x-ig-www-claim' => 'hmac.AR2DN3JP5T1uzerp-Udyl58luFekDMO1MUYZolRys4KAvDAG', + 'x-instagram-ajax' => '1006374487', + ]; + $url = "https://i.instagram.com/api/v1/friendships/361404591/following/?count=12"; + if ($maxId != null) { + $url .= "&max_id={$maxId}"; + } + $request = new Request('GET', $url, $headers); + $res = $client->sendAsync($request)->wait(); + $resStr = $res->getBody(); + $jsonArray = @json_decode($resStr, true, 512, JSON_BIGINT_AS_STRING); + $response = new Response\FollowerAndFollowingResponse(); + $response->assignObjectData($jsonArray, false); + return $response; + } + + public function queryMyFollowing() { + $maxId = null; + try { + do { + + $response = $this->queryFollowing($maxId); + + $users = $response->getUsers(); + foreach ($users as $user) { + echo "\n" . $user->getUsername() . " " . $user->getPk(); + Log::info("username: " . $user->getUsername() . " id: " . $user->getPk()); + } + $maxId = $response->getNextMaxId(); + echo "\n new maxId: " . $maxId . "\n"; + echo "\n Sleeping for 5s...\n"; + sleep(5 * random_int(1, 10)); + } while ($maxId != null); + } catch (\Exception $e) { + echo $e->getMessage(); + } + } } diff --git a/app/Services/RenameService.php b/app/Services/RenameService.php index d02b54c..7c193a1 100644 --- a/app/Services/RenameService.php +++ b/app/Services/RenameService.php @@ -1,211 +1,201 @@ nameLevel; - } - - /** - * @param int $nameLevel - */ - public function setNameLevel(int $nameLevel): void - { - $this->nameLevel = $nameLevel; - } - - const HYPHEN = "-"; - public function rename($baseDir = "/Volumes/N/v/美腿骇客 Leghacker&Leglegs-TLoB/", $prefix = "") - { - if (!is_dir($baseDir)) { - return; - } - $this->parseDir($baseDir, $prefix); - - } - - public function yaRename($baseDir = "/Volumes/intel660p/image/xg/zz/") - { - if (!is_dir($baseDir)) { - return; - } - $this->yaParseDir($baseDir); - - } - - private function parseDir($dir, $prefix = "") - { - if (!is_dir($dir)) { - return; - } - $files = scandir($dir); - foreach ($files as $file) { +class RenameService { + + private $nameLevel = -1; + + /** + * @return int + */ + public function getNameLevel(): int { + return $this->nameLevel; + } + + /** + * @param int $nameLevel + */ + public function setNameLevel(int $nameLevel): void { + $this->nameLevel = $nameLevel; + } + + const HYPHEN = "-"; + public function rename($baseDir = "/Volumes/N/v/美腿骇客 Leghacker&Leglegs-TLoB/", $prefix = "") { + if (!is_dir($baseDir)) { + return; + } + $this->parseDir($baseDir, $prefix); + + } + + public function yaRename($baseDir = "/Volumes/intel660p/image/xg/zz/") { + if (!is_dir($baseDir)) { + return; + } + $this->yaParseDir($baseDir); + + } + + private function parseDir($dir, $prefix = "") { + if (!is_dir($dir)) { + return; + } + $files = scandir($dir); + foreach ($files as $file) { // dump($file); - if ($file == "." || $file == ".." || $file == ".DS_Store" || $file == ".tmp.drivedownload") { - continue; - } - if (is_dir($dir . DIRECTORY_SEPARATOR .$file)) { - $this->parseDir($dir . DIRECTORY_SEPARATOR . $file, $prefix); - } - if (is_file($dir . DIRECTORY_SEPARATOR .$file) && (pathinfo($file, PATHINFO_EXTENSION) == "JPG" || pathinfo($file, PATHINFO_EXTENSION) == "gif" || pathinfo($file, PATHINFO_EXTENSION) == "jpg" || pathinfo($file, PATHINFO_EXTENSION) == "jpeg" || pathinfo($file, PATHINFO_EXTENSION) == "png" || pathinfo($file, PATHINFO_EXTENSION) == "mp4" || pathinfo($file, PATHINFO_EXTENSION) == "avi")) { - echo $dir; - echo "\n"; - echo $file; - $dirList = explode(DIRECTORY_SEPARATOR, $dir); - $filePrefix = $prefix . array_slice($dirList, -$this->getNameLevel(), 1)[0]; + if ($file == "." || $file == ".." || $file == ".DS_Store" || $file == ".tmp.drivedownload") { + continue; + } + if (is_dir($dir . DIRECTORY_SEPARATOR . $file)) { + $this->parseDir($dir . DIRECTORY_SEPARATOR . $file, $prefix); + } + if (is_file($dir . DIRECTORY_SEPARATOR . $file) && (pathinfo($file, PATHINFO_EXTENSION) == "JPG" || pathinfo($file, PATHINFO_EXTENSION) == "gif" || pathinfo($file, PATHINFO_EXTENSION) == "jpg" || pathinfo($file, PATHINFO_EXTENSION) == "jpeg" || pathinfo($file, PATHINFO_EXTENSION) == "png" || pathinfo($file, PATHINFO_EXTENSION) == "mp4" || pathinfo($file, PATHINFO_EXTENSION) == "avi")) { + echo $dir; + echo "\n"; + echo $file; + $dirList = explode(DIRECTORY_SEPARATOR, $dir); + $filePrefix = $prefix . array_slice($dirList, -$this->getNameLevel(), 1)[0]; // $filePrefix = $prefix . array_pop($dirList); - if (!str_contains($file, $filePrefix)) { - $newFile = $dir. DIRECTORY_SEPARATOR. $filePrefix. self::HYPHEN . $file; - dump("new file :" . $newFile); - rename($dir . DIRECTORY_SEPARATOR . $file, $dir. DIRECTORY_SEPARATOR. $filePrefix. self::HYPHEN . $file); - } - echo "\n"; + if (!str_contains($file, $filePrefix)) { + $newFile = $dir . DIRECTORY_SEPARATOR . $filePrefix . self::HYPHEN . $file; + dump("new file :" . $newFile); + rename($dir . DIRECTORY_SEPARATOR . $file, $dir . DIRECTORY_SEPARATOR . $filePrefix . self::HYPHEN . $file); + } + echo "\n"; // exit; - } - } - } - - private function yaParseDir($dir, $starter = "zz") { - if (!is_dir($dir)) { - return; - } - $files = scandir($dir); - foreach ($files as $file) { - // dump($file); - if ($file == "." || $file == ".." || $file == ".DS_Store" || $file == ".tmp.drivedownload") { - continue; - } - if (is_dir($dir . "/" . $file)) { - $this->yaParseDir($dir . "/" . $file); - } - if (is_file($dir . "/" . $file) && (pathinfo($file, PATHINFO_EXTENSION) == "jpg" || pathinfo($file, PATHINFO_EXTENSION) == "jpeg" || pathinfo($file, PATHINFO_EXTENSION) == "mp4")) { - echo $dir; - echo "\n"; - echo $file; - $dirList = explode("/", $dir); - $filePrefix = array_pop($dirList); - $filePrefixList = explode("-", $filePrefix); - if (!str_contains($file, $starter . "-" . $filePrefixList[0])) { - rename($dir . "/" . $file, $dir . "/" . $starter . "-" . $filePrefixList[0] . "-" . $file); - } - echo "\n"; - // exit; - } - } - } - - public function mvFiles($dir = "") - { - $dirList = []; - $fileList = []; - if (is_dir($dir)){ - $files = scandir($dir); - foreach ($files as $file) { - if ($file == "." || $file == "..") { - continue; - } - if (is_dir($dir . $file)) { - $dirList[$file] = $dir . $file; - } - if (is_file($dir . $file) && pathinfo($file, PATHINFO_EXTENSION) == "mp4") { - $fileList[$file] = $dir . $file; - } - } + } + } + } + + private function yaParseDir($dir, $starter = "zz") { + if (!is_dir($dir)) { + return; + } + $files = scandir($dir); + foreach ($files as $file) { + // dump($file); + if ($file == "." || $file == ".." || $file == ".DS_Store" || $file == ".tmp.drivedownload") { + continue; + } + if (is_dir($dir . "/" . $file)) { + $this->yaParseDir($dir . "/" . $file); + } + if (is_file($dir . "/" . $file) && (pathinfo($file, PATHINFO_EXTENSION) == "jpg" || pathinfo($file, PATHINFO_EXTENSION) == "jpeg" || pathinfo($file, PATHINFO_EXTENSION) == "mp4")) { + echo $dir; + echo "\n"; + echo $file; + $dirList = explode("/", $dir); + $filePrefix = array_pop($dirList); + $filePrefixList = explode("-", $filePrefix); + if (!str_contains($file, $starter . "-" . $filePrefixList[0])) { + rename($dir . "/" . $file, $dir . "/" . $starter . "-" . $filePrefixList[0] . "-" . $file); + } + echo "\n"; + // exit; + } + } + } + + public function mvFiles($dir = "") { + $dirList = []; + $fileList = []; + if (is_dir($dir)) { + $files = scandir($dir); + foreach ($files as $file) { + if ($file == "." || $file == "..") { + continue; + } + if (is_dir($dir . $file)) { + $dirList[$file] = $dir . $file; + } + if (is_file($dir . $file) && pathinfo($file, PATHINFO_EXTENSION) == "mp4") { + $fileList[$file] = $dir . $file; + } + } // foreach ($fileList as $key => $value) { -// $fileKey = explode(" ", $key)[0]; -// if (array_key_exists($fileKey, $dirList)) { -// echo $fileKey . "\n"; -//// copy($value, $dirList[$fileKey] . "/" . $key); -// shell_exec("mv " . escapeshellarg($value) . " " . escapeshellarg($dirList[$fileKey] . "/" . $fileKey . ".mp4")); -//// exit; -// } -//// exit; -// } - foreach ($fileList as $key => $value) { - $fileMatches = []; - preg_match("#VN.\d+#", $key, $fileMatches); - foreach ($dirList as $dirKey => $dirValue) { - $dirMatches = []; - preg_match("#VN.\d+#", $dirKey, $dirMatches); - if (count($fileMatches) == 1 && count($dirMatches) == 1 && $fileMatches[0] == $dirMatches[0]) { - - echo "file is " . $key . " dir is " . $dirKey . "\n"; - shell_exec("mv " . escapeshellarg($value) . " " . escapeshellarg($dirList[$dirKey] . "/" . $dirKey . ".mp4")); - } - } - } - - print_r($dirList); - print_r($fileList); - } - } - - public function splitCustomSizeOfFolder($dir = "", $prefix = "", $size = 500) - { - $files = $this->recordAllFiles($dir, $prefix); - asort($files, SORT_NUMERIC); - $files = array_keys($files); - $allFileNum = count($files); - $folderNum = ceil(count($files) / $size); - for ($i=0; $i < $folderNum; $i++) { - # code... - $currentDirName = $dir . DIRECTORY_SEPARATOR . $prefix . "_00" .$i; - if (!is_dir($currentDirName)) { - mkdir($currentDirName); - } - for ($j=0 + $i * $size; $j < ($i + 1) * $size && $j < $allFileNum; $j++) { - $fileInfo = pathinfo($files[$j]); - $newFileName = $currentDirName . DIRECTORY_SEPARATOR . $fileInfo['filename']; - $t = 0; - $trueNewFileName = $newFileName . "." . $fileInfo["extension"]; - - while (is_file($trueNewFileName)) { - echo "file " . $trueNewFileName . " already exists\n"; - $trueNewFileName = $newFileName . "_" . $t++ . "." . $fileInfo["extension"]; - echo "now rename {$files[$j]} to " . $trueNewFileName . "\n"; - } - rename($files[$j], $trueNewFileName); + // $fileKey = explode(" ", $key)[0]; + // if (array_key_exists($fileKey, $dirList)) { + // echo $fileKey . "\n"; + //// copy($value, $dirList[$fileKey] . "/" . $key); + // shell_exec("mv " . escapeshellarg($value) . " " . escapeshellarg($dirList[$fileKey] . "/" . $fileKey . ".mp4")); + //// exit; + // } + //// exit; + // } + foreach ($fileList as $key => $value) { + $fileMatches = []; + preg_match("#VN.\d+#", $key, $fileMatches); + foreach ($dirList as $dirKey => $dirValue) { + $dirMatches = []; + preg_match("#VN.\d+#", $dirKey, $dirMatches); + if (count($fileMatches) == 1 && count($dirMatches) == 1 && $fileMatches[0] == $dirMatches[0]) { + + echo "file is " . $key . " dir is " . $dirKey . "\n"; + shell_exec("mv " . escapeshellarg($value) . " " . escapeshellarg($dirList[$dirKey] . "/" . $dirKey . ".mp4")); + } + } + } + + print_r($dirList); + print_r($fileList); + } + } + + public function splitCustomSizeOfFolder($dir = "", $prefix = "", $size = 500) { + $files = $this->recordAllFiles($dir, $prefix); + asort($files, SORT_NUMERIC); + $files = array_keys($files); + $allFileNum = count($files); + $folderNum = ceil(count($files) / $size); + for ($i = 0; $i < $folderNum; $i++) { + # code... + $currentDirName = $dir . DIRECTORY_SEPARATOR . $prefix . "_00" . $i; + if (!is_dir($currentDirName)) { + mkdir($currentDirName); + } + for ($j = 0 + $i * $size; $j < ($i + 1) * $size && $j < $allFileNum; $j++) { + $fileInfo = pathinfo($files[$j]); + $newFileName = $currentDirName . DIRECTORY_SEPARATOR . $fileInfo['filename']; + $t = 0; + $trueNewFileName = $newFileName . "." . $fileInfo["extension"]; + + while (is_file($trueNewFileName)) { + echo "file " . $trueNewFileName . " already exists\n"; + $trueNewFileName = $newFileName . "_" . $t++ . "." . $fileInfo["extension"]; + echo "now rename {$files[$j]} to " . $trueNewFileName . "\n"; + } + rename($files[$j], $trueNewFileName); // if (is_file($currentDirName . DIRECTORY_SEPARATOR . $fileInfo['basename'])) { -// echo "file " . $currentDirName . DIRECTORY_SEPARATOR . $fileInfo['basename'] . " already exists\n"; -// echo "now rename {$files[$j]} to " . $currentDirName . DIRECTORY_SEPARATOR . $fileInfo['filename'] . "_1." . $fileInfo['extension'] . "\n"; -// rename($files[$j], $currentDirName . DIRECTORY_SEPARATOR . $fileInfo['filename'] . "_1." . $fileInfo['extension']); -// } else{ -// rename($files[$j], $currentDirName . DIRECTORY_SEPARATOR . $fileInfo['basename']); -// } - } - } - } - - public function recordAllFiles($dir = "", $prefix) { - $trueFiles = []; - if (is_dir($dir)) { - $files = scandir($dir); - foreach ($files as $file) { - if ($file == "." || $file == ".." || $file == ".DS_Store" || $file == ".tmp.drivedownload" || str_contains($file, $prefix . "_00")) { - continue; - } - if (is_dir($dir . DIRECTORY_SEPARATOR . $file)) { - $trueFiles = array_merge($trueFiles, $this->recordAllFiles($dir . DIRECTORY_SEPARATOR . $file, $prefix)); - } - if (is_file($dir . DIRECTORY_SEPARATOR . $file) && filesize($dir . DIRECTORY_SEPARATOR . $file) > 1024) { - $fileTime = filemtime($dir . DIRECTORY_SEPARATOR . $file); - $trueFiles[$dir . DIRECTORY_SEPARATOR . $file] = $fileTime; - } - } - } - // dump($files); - return $trueFiles; - } + // echo "file " . $currentDirName . DIRECTORY_SEPARATOR . $fileInfo['basename'] . " already exists\n"; + // echo "now rename {$files[$j]} to " . $currentDirName . DIRECTORY_SEPARATOR . $fileInfo['filename'] . "_1." . $fileInfo['extension'] . "\n"; + // rename($files[$j], $currentDirName . DIRECTORY_SEPARATOR . $fileInfo['filename'] . "_1." . $fileInfo['extension']); + // } else{ + // rename($files[$j], $currentDirName . DIRECTORY_SEPARATOR . $fileInfo['basename']); + // } + } + } + } + + public function recordAllFiles($dir = "", $prefix) { + $trueFiles = []; + if (is_dir($dir)) { + $files = scandir($dir); + foreach ($files as $file) { + if ($file == "." || $file == ".." || $file == ".DS_Store" || $file == ".tmp.drivedownload" || str_contains($file, $prefix . "_00")) { + continue; + } + if (is_dir($dir . DIRECTORY_SEPARATOR . $file)) { + $trueFiles = array_merge($trueFiles, $this->recordAllFiles($dir . DIRECTORY_SEPARATOR . $file, $prefix)); + } + if (is_file($dir . DIRECTORY_SEPARATOR . $file) && filesize($dir . DIRECTORY_SEPARATOR . $file) > 1024) { + $fileTime = filemtime($dir . DIRECTORY_SEPARATOR . $file); + $trueFiles[$dir . DIRECTORY_SEPARATOR . $file] = $fileTime; + } + } + } + // dump($files); + return $trueFiles; + } } diff --git a/app/Services/WeiboService.php b/app/Services/WeiboService.php index 2ea92fd..d9fc49e 100644 --- a/app/Services/WeiboService.php +++ b/app/Services/WeiboService.php @@ -6,6 +6,7 @@ use GuzzleHttp\Client; use GuzzleHttp\Psr7\Request; use Illuminate\Support\Arr; use Illuminate\Support\Facades\Log; +use Throwable; set_time_limit(0); ini_set('memory_limit','-1'); @@ -14,8 +15,8 @@ date_default_timezone_set('UTC'); class WeiboService { private $files = []; - private $videoDir = "/Volumes/Crucial X6/Image/weibo/video/"; - private $imageDir = "/Volumes/Crucial X6/Image/weibo/image/"; + private $videoDir = "/Volumes/T7/Image/weibo/video/"; + private $imageDir = "/Volumes/T7/Image/weibo/image/"; public function __construct() { @@ -39,8 +40,8 @@ class WeiboService // $video_dir = "/Volumes/Samsung/weibo/people/徐圣佑/video"; // $image_dir = "/Volumes/Samsung/weibo/people/徐圣佑/image"; - $video_dir = "/Volumes/Crucial X6/Image/weibo/video/"; - $image_dir = "/Volumes/Crucial X6/Image/weibo/image/"; + $video_dir = "/Volumes/T7/Image/weibo/video/"; + $image_dir = "/Volumes/T7/Image/weibo/image/"; try { if (strlen($content) > 0) { @@ -60,13 +61,13 @@ class WeiboService // mkdir($subdir); // } // echo json_encode($mblog); - Log::info("mblog info: " . json_encode($mblog)); +// Log::info("mblog info: " . json_encode($mblog)); if (array_key_exists("pics", $mblog)) { Log::info("-------enter 1"); $pics = $mblog['pics']; $user = Arr::get($mblog, "user", []); $text = Arr::get($mblog, "text", ''); - var_dump($pics); +// var_dump($pics); self::process_pic($pics, $image_dir, $user, $text); // foreach ($pics as $pic) { // if (array_key_exists("large", $pic)) { @@ -101,7 +102,7 @@ class WeiboService } else if (array_key_exists("page_info", $mblog) && array_key_exists("media_info", $mblog["page_info"])) { # code... Log::info("-------enter 3"); - Log::info("page_info: ". json_encode($mblog["page_info"])); +// Log::info("page_info: ". json_encode($mblog["page_info"])); $page_info = $mblog["page_info"]; $media_info = $mblog["page_info"]["media_info"]; $medis_urls = $mblog["page_info"]["urls"]; @@ -255,10 +256,13 @@ class WeiboService $file_name = $subDir . DIRECTORY_SEPARATOR . $picName . "." . $picExt; $baseName = $picName . "." . $picExt; if (!file_exists($file_name) && !$this->checkFileHasDownload($baseName)) { - $pic_content = $this->downloadImg($pic_url); - // echo $pic_content; - file_put_contents($file_name, $pic_content); - $this->files[] = $baseName; + try { + $pic_content = $this->downloadImg($pic_url);// echo $pic_content; + file_put_contents($file_name, $pic_content); + $this->files[] = $baseName; + } catch (Throwable $e) { + Log::error($e->getMessage()); + } } else { Log::info("$baseName file exists"); } diff --git a/app/Utils/helper.php b/app/Utils/helper.php index cb70268..3dcb9e6 100644 --- a/app/Utils/helper.php +++ b/app/Utils/helper.php @@ -5,98 +5,95 @@ use Google\Auth\HttpHandler\Guzzle7HttpHandler; use Google\Auth\OAuth2; use GuzzleHttp\Client; -function connectWithGooglePhotos($request, array $scopes, $redirectURI) -{ - $clientSecretJson = json_decode( - file_get_contents('client_secret_1000190146810-j9mohjt8m4m8j8sj6hupl1bghp6o1pdn.apps.googleusercontent.com.json'), - true - )['web']; +function connectWithGooglePhotos($request, array $scopes, $redirectURI) { + $clientSecretJson = json_decode( + file_get_contents('client_secret_1000190146810-j9mohjt8m4m8j8sj6hupl1bghp6o1pdn.apps.googleusercontent.com.json'), + true + )['web']; // dump($clientSecretJson);exit; - $clientId = $clientSecretJson['client_id']; - $clientSecret = $clientSecretJson['client_secret']; - - $oauth2 = new OAuth2([ - 'clientId' => $clientId, - 'clientSecret' => $clientSecret, - 'authorizationUri' => 'https://accounts.google.com/o/oauth2/v2/auth', - // Where to return the user to if they accept your request to access their account. - // You must authorize this URI in the Google API Console. - 'redirectUri' => $redirectURI, - 'tokenCredentialUri' => 'https://www.googleapis.com/oauth2/v4/token', - 'scope' => $scopes, - 'expiry' => 7200 - ]); - - $client = new Client(['proxy' => 'http://127.0.0.1:1087']); - $httpHandler = new Guzzle7HttpHandler($client); - - // The authorization URI will, upon redirecting, return a parameter called code. - $code = $request->get('code'); - - if ($code == null || $code == "") { - $authenticationUrl = $oauth2->buildFullAuthorizationUri(['access_type' => 'offline']); - // dump($authenticationUrl); - // redirect($authenticationUrl); -// header("Location: " . $authenticationUrl); -// redirect()->to($authenticationUrl); - return redirect($authenticationUrl); - } else { - dump("code is " . $code); - // With the code returned by the OAuth flow, we can retrieve the refresh token. - $oauth2->setCode($code); - $authToken = $oauth2->fetchAuthToken(); - $refreshToken = $authToken['access_token']; - - // The UserRefreshCredentials will use the refresh token to 'refresh' the credentials when - // they expire. - $credentials = new UserRefreshCredentials( - $scopes, - [ - 'client_id' => $clientId, - 'client_secret' => $clientSecret, - 'refresh_token' => $refreshToken - ] - ); - session(['credentials' => $credentials]); - - // Return the user to the home page. -// dump("before redirect"); - return redirect('google/photo/index'); + $clientId = $clientSecretJson['client_id']; + $clientSecret = $clientSecretJson['client_secret']; + + $oauth2 = new OAuth2([ + 'clientId' => $clientId, + 'clientSecret' => $clientSecret, + 'authorizationUri' => 'https://accounts.google.com/o/oauth2/v2/auth', + // Where to return the user to if they accept your request to access their account. + // You must authorize this URI in the Google API Console. + 'redirectUri' => $redirectURI, + 'tokenCredentialUri' => 'https://www.googleapis.com/oauth2/v4/token', + 'scope' => $scopes, + 'expiry' => 7200, + ]); + + $client = new Client(['proxy' => 'http://127.0.0.1:1087']); + $httpHandler = new Guzzle7HttpHandler($client); + + // The authorization URI will, upon redirecting, return a parameter called code. + $code = $request->get('code'); + + if ($code == null || $code == "") { + $authenticationUrl = $oauth2->buildFullAuthorizationUri(['access_type' => 'offline']); + // dump($authenticationUrl); + // redirect($authenticationUrl); + // header("Location: " . $authenticationUrl); + // redirect()->to($authenticationUrl); + return redirect($authenticationUrl); + } else { + dump("code is " . $code); + // With the code returned by the OAuth flow, we can retrieve the refresh token. + $oauth2->setCode($code); + $authToken = $oauth2->fetchAuthToken(); + $refreshToken = $authToken['access_token']; + + // The UserRefreshCredentials will use the refresh token to 'refresh' the credentials when + // they expire. + $credentials = new UserRefreshCredentials( + $scopes, + [ + 'client_id' => $clientId, + 'client_secret' => $clientSecret, + 'refresh_token' => $refreshToken, + ] + ); + session(['credentials' => $credentials]); + + // Return the user to the home page. + // dump("before redirect"); + return redirect('google/photo/index'); // header("Location: index.php"); - } + } } -function iconv_gbk_to_uft8($string){ +function iconv_gbk_to_uft8($string) { - if (!$string){ - return ''; - } - - $encode = mb_detect_encoding($string,array("ASCII","GBK","GB2312",'BIG5','UTF-8')); - // dump($encode); - return iconv($encode, "UTF-8",$string); + if (!$string) { + return ''; + } + $encode = mb_detect_encoding($string, array("ASCII", "GBK", "GB2312", 'BIG5', 'UTF-8')); + // dump($encode); + return iconv($encode, "UTF-8", $string); } -function scanFilesWithoutPath($path): array -{ - $allFiles = []; - if (is_dir($path)) { - $files = scandir($path); - foreach ($files as $file) { - if ($file == "." || $file == "..") { - continue; - } - if (is_dir($path . DIRECTORY_SEPARATOR . $file)) { - $allFiles = array_merge($allFiles, scanFilesWithoutPath($path . DIRECTORY_SEPARATOR . $file)); - } - if (is_file($path . DIRECTORY_SEPARATOR . $file)) { - $allFiles[] = $file; - } - } - } - return $allFiles; +function scanFilesWithoutPath($path): array { + $allFiles = []; + if (is_dir($path)) { + $files = scandir($path); + foreach ($files as $file) { + if ($file == "." || $file == "..") { + continue; + } + if (is_dir($path . DIRECTORY_SEPARATOR . $file)) { + $allFiles = array_merge($allFiles, scanFilesWithoutPath($path . DIRECTORY_SEPARATOR . $file)); + } + if (is_file($path . DIRECTORY_SEPARATOR . $file)) { + $allFiles[] = $file; + } + } + } + return $allFiles; } /** @@ -104,10 +101,79 @@ function scanFilesWithoutPath($path): array * @param $file * @return bool */ -function skipDefaultPathAndFile($file): bool -{ - if ($file == "." || $file == ".." || $file == "config.json" || $file == "config.backup.json" || $file == ".DS_Store") { - return true; - } - return false; +function skipDefaultPathAndFile($file): bool { + if ($file == "." || $file == ".." || $file == "config.json" || $file == "config.backup.json" || $file == ".DS_Store") { + return true; + } + return false; +} + +function processFirstLevelDirectory($dir): bool { + if (!is_dir($dir)) { + return false; + } + // 遍历第一层文件夹 + $list = scandir($dir); + foreach ($list as $file) { + if (skipDefaultPathAndFile($file)) { + continue; + } + $firstLevelDir = implode(DIRECTORY_SEPARATOR, [$dir, $file]); + if (is_dir($firstLevelDir)) { + // echo "process inner $firstLevelDir"; + processInnerDirectory($firstLevelDir, $file); + } + } + return true; +} + +function processInnerDirectory($dir, $lastLevelName) { + if (!is_dir($dir)) { + return false; + } + // 遍历内部文件 + $list = scandir($dir); + foreach ($list as $file) { + if (skipDefaultPathAndFile($file)) { + continue; + } + $secondLevelFile = implode(DIRECTORY_SEPARATOR, [$dir, $file]); + // echo "second is $secondLevelFile"; + if (is_file($secondLevelFile)) { + if (str_contains($file, $lastLevelName)) { + // echo "file has contains lastLevelName\n"; + continue; + } else { + $newFileName = $dir . DIRECTORY_SEPARATOR . $lastLevelName . "_" . $file; + echo "old name is : " . $secondLevelFile . " \n new name is : " . $newFileName . "\n"; + rename($secondLevelFile, $newFileName); + } + } else if ($file == "extrafanart") { + // $secondLevelFile ==> \A2H\EBOD-666\ + // $extrafanartDir ==> \A2H\EBOD-666\extrafanart + $extrafanartDir = $secondLevelFile; + echo "enter extrafanart: " . $extrafanartDir . "\n"; + if (is_dir($extrafanartDir)) { + $extrafanartFiles = scandir($extrafanartDir); + foreach ($extrafanartFiles as $extrafanartFile) { + if (skipDefaultPathAndFile($extrafanartFile)) { + continue; + } + $extrafanartEntireFile = implode(DIRECTORY_SEPARATOR, [$extrafanartDir, $extrafanartFile]); + if (is_file($extrafanartEntireFile)) { + if (str_contains($extrafanartFile, $lastLevelName)) { + continue; + } else { + // 把 extrafanart 目录去掉,让文件都在同一层 + $newExtraFanArtEntireFile = $dir . DIRECTORY_SEPARATOR . $lastLevelName . "_" . $extrafanartFile; + echo "old name is : " . $extrafanartEntireFile . " \n new name is : " . $newExtraFanArtEntireFile . "\n"; + rename($extrafanartEntireFile, $newExtraFanArtEntireFile); + } + } + + } + } + } + } + return true; } diff --git a/fail.log b/fail.log index 41314dd..6593d0d 100644 --- a/fail.log +++ b/fail.log @@ -2798,3 +2798,26 @@ /Users/shixuesen/OneDrive/Pictures/instagram/naughty_rabbit_/ https://scontent-iad3-2.cdninstagram.com/v/t51.2885-15/347463511_1035962154032722_6961171125783130309_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-iad3-2.cdninstagram.com&_nc_cat=1&_nc_ohc=LSu6GP7rqQcAX9Ej9TO&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzEwNTc1NjA2ODEzNjQ5ODU5OA%3D%3D.2-ccb7-5&oh=00_AfDiIVH4gjZiGlaN66rQK4SUVgkIoZT8DbPiMVV_sk87Yg&oe=64707769&_nc_sid=a1ad6c /Users/shixuesen/OneDrive/Pictures/instagram/beargenie/ https://scontent-iad3-2.cdninstagram.com/v/t51.2885-15/347725126_201443812840049_8752093749535121235_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-iad3-2.cdninstagram.com&_nc_cat=105&_nc_ohc=VDWn6gqwcC8AX9UtXT-&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzEwNjc3NTI1NTg1NTUyMDY2NQ%3D%3D.2-ccb7-5&oh=00_AfC3fPRjXm30Ie7RhuORR07U1obFzYUNICZiXNWZszM9nQ&oe=6471ED97&_nc_sid=a1ad6c /Users/shixuesen/OneDrive/Pictures/instagram/Likes_new/ https://scontent-ord5-1.cdninstagram.com/v/t51.2885-15/350240208_624666975993937_7913994115751187492_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-ord5-1.cdninstagram.com&_nc_cat=101&_nc_ohc=zb6WaSWvg5MAX9TntT8&edm=AJ9x6zYBAAAA&ccb=7-5&ig_cache_key=MzExMzE2ODAwMDU5ODYyNjkxOQ%3D%3D.2-ccb7-5&oh=00_AfBMMq50XQ70XGfBqt7mUx0xdx5b2Trd-vCGyghefYWI6A&oe=647AF0B2&_nc_sid=5f7460 +/Users/shixuesen/OneDrive/Pictures/instagram/beargenie/ https://scontent-lga3-2.cdninstagram.com/v/t66.30100-16/10000000_1383973692422600_1072119330657813145_n.mp4?_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=108&_nc_ohc=3F6fYxU1COMAX9e9A18&edm=ABmJApABAAAA&ccb=7-5&oh=00_AfDg0TaMIrloNLyp5xmzp5dFpY0Kkc9TUxtJs8TzI-CRTQ&oe=64836ADC&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/zennyrt/ https://scontent-lga3-2.cdninstagram.com/v/t66.30100-16/49787584_1151069005551794_8900095095406951099_n.mp4?_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=102&_nc_ohc=7Eh2LTstDU8AX_PuuxN&edm=ABmJApABAAAA&ccb=7-5&oh=00_AfDEWr6VSehzyobLvjKe3Q8GXNvkPAMn-ZFOZ1ZRjlo6fw&oe=6483A0EC&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/boram__jj/ https://scontent-lga3-2.cdninstagram.com/v/t66.30100-16/10000000_803492171025877_4855821439483479641_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjEwODAuY2xpcHMuaGlnaCIsInFlX2dyb3VwcyI6IltcImlnX3dlYl9kZWxpdmVyeV92dHNfb3RmXCJdIn0&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=101&_nc_ohc=bsiLp7igp-MAX8G50Qg&edm=ABmJApABAAAA&vs=947358243146070_2250294976&_nc_vs=HBksFQAYJEdJQ1dtQURWRFdfWnhkb0NBRm1HSXpuZlYyTkRicFIxQUFBRhUAAsgBABUAGCRHQ3hPd0FLWktpYXAtajhDQUJqNW5weXFURjBYYnBSMUFBQUYVAgLIAQAoABgAGwAVAAAmgNX71oW0%2BD8VAigCQzMsF0BDbtkWhysCGBJkYXNoX2hpZ2hfMTA4MHBfdjERAHX%2BBwA%3D&ccb=7-5&oh=00_AfBBlSBdpSD49MEa-V6p5tmA_pI90mQBf7LqrIl4neDMEA&oe=648492CE&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/gggglow_/ https://scontent-lga3-1.cdninstagram.com/o1/v/t16/f1/m82/AC493CCBFCC32925FA241EB56D0AD28B_video_dashinit.mp4?efg=eyJxZV9ncm91cHMiOiJbXCJpZ193ZWJfZGVsaXZlcnlfdnRzX290ZlwiXSIsInZlbmNvZGVfdGFnIjoidnRzX3ZvZF91cmxnZW4uNzIwLmNsaXBzLmJhc2VsaW5lIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=103&vs=1708667952882229_2221060263&_nc_vs=HBksFQIYT2lnX3hwdl9yZWVsc19wZXJtYW5lbnRfcHJvZC9BQzQ5M0NDQkZDQzMyOTI1RkEyNDFFQjU2RDBBRDI4Ql92aWRlb19kYXNoaW5pdC5tcDQVAALIAQAVABgkR0dmY3V3bmVINklmeUp3Q0FHejkwdUtZcEtabmJwUjFBQUFGFQICyAEAKAAYABsAFQAAJrSE4oSY0f4%2FFQIoAkMzLBdAJAAAAAAAABgSZGFzaF9iYXNlbGluZV8xX3YxEQB1%2FgcA&ccb=9-4&oh=00_AfDLw9Ofc-wk6rFfgOgMocORvgLy8KbsP6kXwxjciUXyFA&oe=64847215&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/u.zyn/ https://scontent-lga3-2.cdninstagram.com/v/t51.2885-15/276139825_373996217917755_662931764292667550_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=103&_nc_ohc=gL9TIamFAi4AX_xWoNG&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=Mjc5ODYzMDU3Nzc4ODc4MTUwMQ%3D%3D.2-ccb7-5&oh=00_AfAfW-nbV55rVydHa9O_AdBrhAez_DdN618TcxGECDeZbA&oe=6488969B&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/sharalinmusic/ https://scontent-hou1-1.cdninstagram.com/v/t51.2885-15/353963770_797637855273780_7430928432086148034_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-hou1-1.cdninstagram.com&_nc_cat=100&_nc_ohc=hfDwwskyxcAAX9E8Lr9&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzEyNDcyNzA3MDE3MjExODU5MA%3D%3D.2-ccb7-5&oh=00_AfBdObhbY3Ox3kWFT8vrb7nl-8PN8Xddi8lqtGPP9GHfqw&oe=648F4CB7&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/ayreen/ https://scontent-atl3-2.cdninstagram.com/v/t51.2885-15/352442329_774998724318266_109899416275007706_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-atl3-2.cdninstagram.com&_nc_cat=102&_nc_ohc=Uu4pZQghgl8AX-1S8zG&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzEyMjU2NDAzOTQ0Njk3MTQyMg%3D%3D.2-ccb7-5&oh=00_AfAsdKrfSAFGIHZPujvHTYdvXUTcCdfUsjFXP6rDjXxfzQ&oe=6491645B&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/ayreen/ https://scontent-atl3-2.cdninstagram.com/v/t51.2885-15/353123366_940960580491252_3149337908181045381_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-atl3-2.cdninstagram.com&_nc_cat=104&_nc_ohc=ZJranByGfuoAX_KiyPv&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzEyMjU2NDAzOTM2MzE3Nzc2NA%3D%3D.2-ccb7-5&oh=00_AfDH_hSKkjifF8MyJ9b-3tgb3PRFU4sMhZRpg0o22gUsQQ&oe=64906F46&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/ayreen/ https://scontent-atl3-1.cdninstagram.com/v/t51.2885-15/352955868_6291882967526492_6052859444930449585_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-atl3-1.cdninstagram.com&_nc_cat=108&_nc_ohc=JDvl9zWRpFYAX8Z7kZ3&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzEyMjExMzI0MTI5ODc0MjcxMQ%3D%3D.2-ccb7-5&oh=00_AfBZG-8in9Bzka6v5RCCp4OqjrkAyv4Wkb2KqVr5cAvBZg&oe=649002C1&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/ayreen/ https://scontent-atl3-2.cdninstagram.com/v/t51.2885-15/352440247_767865724822849_8855096243845585302_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-atl3-2.cdninstagram.com&_nc_cat=101&_nc_ohc=5h2--H4FuCIAX8Y6wR2&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzEyMjExMzI0MTI4MTczMTA4MQ%3D%3D.2-ccb7-5&oh=00_AfAyrOt-cjdkcyzRrE1LCn8KTLSI9tKrY3rbhVWtksV0rQ&oe=648FFC24&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/ayreen/ https://scontent-atl3-2.cdninstagram.com/v/t51.2885-15/352865445_632965758850538_6520280013889524933_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-atl3-2.cdninstagram.com&_nc_cat=102&_nc_ohc=u_sPMwsPLOsAX9Lm76_&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzEyMjExMzI0MTI0MDA0MDQ2NA%3D%3D.2-ccb7-5&oh=00_AfCrGTgMIQC46yHuQdTwikNIN9CbrIeMzdG91xYUyd_f8g&oe=649077E4&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/limerencem_/ https://scontent-atl3-1.cdninstagram.com/v/t66.30100-16/333995035_1582420995617492_3907193366897367749_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjEwODAuY2xpcHMuaGlnaCIsInFlX2dyb3VwcyI6IltcImlnX3dlYl9kZWxpdmVyeV92dHNfb3RmXCJdIn0&_nc_ht=scontent-atl3-1.cdninstagram.com&_nc_cat=108&_nc_ohc=aibC7_uwVJQAX9l8JXZ&edm=ABmJApABAAAA&vs=2565757350253757_3730618229&_nc_vs=HBksFQAYJEdCdGM2QlBVTWxRWk5KOEZBTVVhcm42cUl6azJicFIxQUFBRhUAAsgBABUAGCRHSURjTkFlTXo5TGttekFDQU9lZGVuTHotS2t1YnBSMUFBQUYVAgLIAQAoABgAGwAVAAAmgPymhPmO%2FT8VAigCQzMsF0AyO6XjU%2FfPGBJkYXNoX2hpZ2hfMTA4MHBfdjERAHX%2BBwA%3D&ccb=7-5&oh=00_AfBJ0RoNai0_c8kj6VMJHy0rY6t84jNloihs1s3Uy0hWFA&oe=648DEC3F&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/limerencem_/ https://scontent-atl3-1.cdninstagram.com/v/t51.2885-15/354173111_1352312775351753_7731156442177130463_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-atl3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=DvnFCc7D3xsAX9PgFxt&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzEyNDg4MzQ5OTg0NDcyNTc2Mg%3D%3D.2-ccb7-5&oh=00_AfBW82FMv5uqn-NB1ET3tAEY5NrfG73h7b5KzHWNUxnlLA&oe=6491B314&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/limerencem_/ https://scontent-atl3-2.cdninstagram.com/v/t51.2885-15/353829178_2176900919365877_5149905653044940363_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-atl3-2.cdninstagram.com&_nc_cat=105&_nc_ohc=3EAgjRjHc80AX8Sme6M&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzEyNDg4MzQ5OTkyODY0ODIzOA%3D%3D.2-ccb7-5&oh=00_AfCq-Wp42ogBZodYIOg5a5_S21yb6MDC0d4lqmhfeVlt2g&oe=649171BD&_nc_sid=a1ad6c +/Users/shixuesen/OneDrive/Pictures/instagram/ms_puiyi/ https://scontent-lax3-2.cdninstagram.com/v/t51.2885-15/357635424_279429894599424_7419717042844551680_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=100&_nc_ohc=ik_8lt3TwjUAX_0b3iY&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzEzODY3MTc4MTQ4MjExNDIxNA%3D%3D.2-ccb7-5&oh=00_AfDboWaIoKrb4r4JfDNXzuSN7xb7Pj6rFxaMpJs_ptz4Gg&oe=64A803FA&_nc_sid=b41fef +/Users/shixuesen/OneDrive/Pictures/instagram/ms_puiyi/ https://scontent-lax3-2.cdninstagram.com/v/t51.2885-15/357380841_3444020869144680_3718854126329507355_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=1&_nc_ohc=n2_4OXh_Zp0AX_HcfDw&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzEzODY3MTc4MTQ3MzkwMTA0NQ%3D%3D.2-ccb7-5&oh=00_AfAzhgd6QpSxKJe97gIEjDTzxCFTjOMh92cEV7rYa6fhEg&oe=64A91EC1&_nc_sid=b41fef +/Users/shixuesen/OneDrive/Pictures/instagram/bitnara1105/ https://scontent-lax3-2.cdninstagram.com/v/t50.2886-16/10000000_586138360386884_5308960175371609900_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5jbGlwcy5kZWZhdWx0IiwicWVfZ3JvdXBzIjoiW1wiaWdfd2ViX2RlbGl2ZXJ5X3Z0c19vdGZcIl0ifQ&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=108&_nc_ohc=SWaruqG5laoAX_duvnr&edm=ABmJApABAAAA&vs=17923374317756887_592937010&_nc_vs=HBksFQAYJEdJQ1dtQUJFbGNMNEZoVUNBQ3hudU1NbU42MUpicUNCQUFBRhUAAsgBABUAGCRHSUNXbUFBQ3dPNDM2U2NEQVBZNWs2My1KVXBnYnFDQkFBQUYVAgLIAQAoABgAGwAVAAAmjJzW%2Bd%2B2gEAVAigCQzMsF0C33TxqfvnbGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHX%2BBwA%3D&ccb=7-5&oh=00_AfBjYYKZZO0wKE3FgcoPc9kCOnnfUYSFCA_q4ekztfu0aA&oe=64CE3707&_nc_sid=b41fef +/Users/shixuesen/OneDrive/Pictures/instagram/bitnara1105/ https://scontent-lax3-2.cdninstagram.com/v/t51.2885-15/364341478_546086814277753_5787545069753123069_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=101&_nc_ohc=mmYgtm7RHrcAX_uWT32&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzE1OTY0MDI2NjY2MzgyOTI0OA%3D%3D.2-ccb7-5&oh=00_AfByRH73chXqErIsZosp8b6_QQbUeCDYBKSf0qxxw9fCMg&oe=64D1465A&_nc_sid=b41fef +/Users/shixuesen/OneDrive/Pictures/instagram/bitnara1105/ https://scontent-lax3-2.cdninstagram.com/v/t51.2885-15/363494221_973229240612805_6417774728773344775_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=109&_nc_ohc=bSZKGjFsJcgAX_-FVUm&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzE1OTY0MDI2NjUzNzk4Mjc1NA%3D%3D.2-ccb7-5&oh=00_AfDhGdOxW3LlLzT8ZekZQf4MJi539frPmmV2QKCqJ2S47Q&oe=64D1F58C&_nc_sid=b41fef +/Users/shixuesen/OneDrive/Pictures/instagram/bitnara1105/ https://scontent-lax3-2.cdninstagram.com/v/t51.2885-15/363514321_667434494902914_8316445459996245151_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=106&_nc_ohc=0xQKj3Nd_-gAX-r2OoQ&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzE1OTY0MDI2NjUyOTc3NDk3Mw%3D%3D.2-ccb7-5&oh=00_AfDPGa5EYe6L1tTXAKAYAcnpBuxVwQ7tTm4QjzNpdahBmw&oe=64D24273&_nc_sid=b41fef +/Users/shixuesen/OneDrive/Pictures/instagram/bitnara1105/ https://scontent-lax3-2.cdninstagram.com/v/t51.2885-15/364044295_299608662481106_3372304102905513400_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=102&_nc_ohc=wWT0ooKOhWEAX92P_ut&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzE1OTY0MDI2NjUyOTY2MDkyMQ%3D%3D.2-ccb7-5&oh=00_AfB0qdTlBjw7OfSLWTrScoBfkLeeg1sOpRV-AvEdDBpX5w&oe=64D26237&_nc_sid=b41fef +/Users/shixuesen/OneDrive/Pictures/instagram/bitnara1105/ https://scontent-lax3-2.cdninstagram.com/v/t51.2885-15/364023940_687383819910460_3865050733083143892_n.jpg?stp=dst-jpg_e35&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=104&_nc_ohc=DH40O_S-FToAX_WH5W_&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzE1OTY0MDI2NjUyOTU5MTQ3Mg%3D%3D.2-ccb7-5&oh=00_AfCcIJLSBUB5bSRA7c4Zk_j-7yL3xHNXjmTlzQ3XpaTzaA&oe=64D14317&_nc_sid=b41fef +/Users/shixuesen/OneDrive/Pictures/instagram/Likes_new/ https://scontent-lax3-2.cdninstagram.com/v/t39.30808-6/375460193_18383825071034320_1576342646316386191_n.jpg?stp=dst-jpg_e15&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=1&_nc_ohc=ZZo24vD6oKAAX_0bKFE&edm=AJ9x6zYAAAAA&ccb=7-5&ig_cache_key=MzE4NTUwNzc4NjQ1OTg5MDExNQ%3D%3D.2-ccb7-5&oh=00_AfCGtchscqRD-7IEPU-aP0lBeFZy6GDpDMbPpSPqaWz9yA&oe=64FC36D9&_nc_sid=65462d