Browse Source

modify: test

feature/for_windows_video_compress_sxs20200923
shixuesen 6 years ago
parent
commit
537e32b928
9 changed files with 265 additions and 31 deletions
  1. +2
    -3
      app/Console/Commands/BiliVideoCode.php
  2. +2
    -1
      app/Console/Commands/InstagramScrape.php
  3. +13
    -1
      app/Console/Kernel.php
  4. +5
    -2
      app/Http/Controllers/WeiboController.php
  5. +3
    -2
      app/Services/BilibiliService.php
  6. +163
    -3
      app/Services/InstagramService.php
  7. +32
    -11
      app/Services/WeiboService.php
  8. +30
    -8
      app/Services/XiuGirlsService.php
  9. +15
    -0
      fail.log

+ 2
- 3
app/Console/Commands/BiliVideoCode.php View File

@ -46,14 +46,13 @@ class BiliVideoCode extends Command
// $bilibili->queryUpVideoList(10278125); // $bilibili->queryUpVideoList(10278125);
$bilibili->compareAndDownloadUpVideos(); $bilibili->compareAndDownloadUpVideos();
// $bilibili->queryDBCollectionList(); // $bilibili->queryDBCollectionList();
// $bilibili->compareAndDownloadCollectionVideos();
// $bilibili->queryFavList();
$bilibili->compareAndDownloadCollectionVideos();
// $bilibili->queryCollectionList(); // $bilibili->queryCollectionList();
// $bilibili->compareAndDownloadNewVideos(); // $bilibili->compareAndDownloadNewVideos();
// $bilibili->queryLocalUpVideoList(); // $bilibili->queryLocalUpVideoList();
// $bilibili->queryForVideoParts(); // $bilibili->queryForVideoParts();
// $bilibili->queryDBCollectionList(); // $bilibili->queryDBCollectionList();
// $bilibili->checkVideoHasDownload();
$bilibili->checkVideoHasDownload();
} }
} }

+ 2
- 1
app/Console/Commands/InstagramScrape.php View File

@ -40,6 +40,7 @@ class InstagramScrape extends Command
{ {
// //
$ins = new InstagramService(); $ins = new InstagramService();
$ins->scrapeUsers();
// $ins->scrapeUsers();
$ins->queryFollowUsers();
} }
} }

+ 13
- 1
app/Console/Kernel.php View File

@ -62,7 +62,19 @@ class Kernel extends ConsoleKernel
$bilibili = new BilibiliService(); $bilibili = new BilibiliService();
Log::info("schedule compareAndDownloadUpVideos started at: ". date("Y-m-d H:i:s")); Log::info("schedule compareAndDownloadUpVideos started at: ". date("Y-m-d H:i:s"));
$bilibili->compareAndDownloadUpVideos(); $bilibili->compareAndDownloadUpVideos();
})->yearly();
})->dailyAt('03:00');
$schedule->call(function () {
$bilibili = new BilibiliService();
Log::info("schedule compareAndDownloadCollectionVideos started at: ". date("Y-m-d H:i:s"));
$bilibili->compareAndDownloadCollectionVideos();
})->dailyAt('07:00');
$schedule->call(function () {
$bilibili = new BilibiliService();
Log::info("schedule checkVideoHasDownload started at: ". date("Y-m-d H:i:s"));
$bilibili->checkVideoHasDownload();
})->dailyAt('09:30');
// $schedule->command('inspire') // $schedule->command('inspire')
// ->hourly(); // ->hourly();
$schedule->call(function () { $schedule->call(function () {


+ 5
- 2
app/Http/Controllers/WeiboController.php View File

@ -21,12 +21,15 @@ class WeiboController extends Controller
public function list() public function list()
{ {
// https://m.weibo.cn/api/container/getIndex?containerid=1076035123577126&openApp=0&page='.$i;
// Fan_Cam_4K 1076035733650527 page 902 // Fan_Cam_4K 1076035733650527 page 902
// 儒雅随和 1076035123577126 page 139 // 儒雅随和 1076035123577126 page 139
// https://m.weibo.cn/api/container/getIndex?containerid=230259&openApp=0
$url = array(); $url = array();
for( $i = 139 ; $i >= 1 ; $i-- )
$url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=1076035123577126&openApp=0&page='.$i;
for( $i = 783 ; $i >= 1 ; $i-- )
$url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=230259&openApp=0&page='.$i;
return response()->json($url); return response()->json($url);
} }


+ 3
- 2
app/Services/BilibiliService.php View File

@ -57,6 +57,7 @@ class BilibiliService
// 16539048 小仙若 // 16539048 小仙若
// 10278125 香草猫饼 // 10278125 香草猫饼
// 391073761 女团直拍 // 391073761 女团直拍
// 267781236 韩国女团饭拍直拍
$list = BilibiliUpVideos::all(); $list = BilibiliUpVideos::all();
foreach ($list as $item) { foreach ($list as $item) {
Log::info("schedule queryUpVideoList current up is {$item['up_name']}, started at: " . date("Y-m-d H:i:s")); Log::info("schedule queryUpVideoList current up is {$item['up_name']}, started at: " . date("Y-m-d H:i:s"));
@ -535,7 +536,7 @@ class BilibiliService
// dump($list->items()[0]->aid); // dump($list->items()[0]->aid);
while ($list->isNotEmpty()) { while ($list->isNotEmpty()) {
foreach ($list->items() as $item) { foreach ($list->items() as $item) {
dump("current item", [$item->getAttributes()]);
// dump("current item", [$item->getAttributes()]);
$response = $this->requestVideoParts($item->aid); $response = $this->requestVideoParts($item->aid);
$partList = Arr::get(json_decode($response, true), "data"); $partList = Arr::get(json_decode($response, true), "data");
if (count($partList) > 0) { if (count($partList) > 0) {
@ -593,7 +594,7 @@ class BilibiliService
$dirFiles = []; $dirFiles = [];
while ($list->isNotEmpty()) { while ($list->isNotEmpty()) {
foreach ($list->items() as $item) { foreach ($list->items() as $item) {
dump("current item", [$item->getAttributes()]);
// dump("current item", [$item->getAttributes()]);
if ($item['is_download'] == 0) { if ($item['is_download'] == 0) {
continue; continue;
} }


+ 163
- 3
app/Services/InstagramService.php View File

@ -5,6 +5,9 @@ namespace App\Services;
set_time_limit(0); set_time_limit(0);
date_default_timezone_set('UTC'); date_default_timezone_set('UTC');
use GuzzleHttp\Command\Guzzle\GuzzleClient;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Log;
use InstagramAPI\Response\Model\Item; use InstagramAPI\Response\Model\Item;
use InstagramAPI\Instagram; use InstagramAPI\Instagram;
use App\Instagram as Ins; use App\Instagram as Ins;
@ -17,6 +20,90 @@ class InstagramService
private $debug = false; private $debug = false;
private $truncatedDebug = false; private $truncatedDebug = false;
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_19920223" => 566598605],
["mikamikatn" => 4156629214],
["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],
["nyanchan22" => 527514115],
["shuhan.mei" => 202813045],
["cho_hyunyoung" => 1097213789],
["cr5p__br" => 1577496884],
["cxxsomi" => 644060463]
];
function traceExistFiles($dir) function traceExistFiles($dir)
{ {
@ -89,7 +176,7 @@ class InstagramService
curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HEADER, 0);
$image = curl_exec($ch); $image = curl_exec($ch);
curl_close($ch); curl_close($ch);
// $image = file_get_contents($filenameUrl, false, null);
// $image = file_get_contents($filenameUrl, false, null);
} catch (\Throwable $e) { } catch (\Throwable $e) {
var_dump($e->getMessage()); var_dump($e->getMessage());
$this->logFailUrl($filePrefix, $filenameUrl); $this->logFailUrl($filePrefix, $filenameUrl);
@ -219,7 +306,16 @@ class InstagramService
// echo $trueName;exit; // echo $trueName;exit;
$thisUserImageDir = $baseImageDir . $trueName . "/"; $thisUserImageDir = $baseImageDir . $trueName . "/";
// $existFiles = $this->traceExistFiles($thisUserImageDir); // $existFiles = $this->traceExistFiles($thisUserImageDir);
$userId = $ig->people->getUserIdForName(trim($userName));
try {
$userId = $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);
if (array_key_exists(trim($userName), $userList)) {
$userId = Arr::get($userList, trim($userName));
}
// continue;
}
echo "\n username: " . $trueName . " " . $userId . "\n"; echo "\n username: " . $trueName . " " . $userId . "\n";
// continue; // continue;
@ -235,7 +331,7 @@ class InstagramService
$res = $this->downloadFile($videoUrl, 0, $thisUserImageDir); $res = $this->downloadFile($videoUrl, 0, $thisUserImageDir);
} }
} }
// echo $item[0]->getVideoVersions()[0]->getUrl();
// echo $item[0]->getVideoVersions()[0]->getUrl();
sleep(5); sleep(5);
$maxId = null; $maxId = null;
// } // }
@ -368,4 +464,68 @@ class InstagramService
{ {
} }
public function getUserNameById($id = 12801506409)
{
$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));
}
public function queryFollowUsers()
{
$params = [];
$params["id"] = 361404591;
$params["include_reel"] = true;
$params["first"] = 24;
$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;
}
private function commonRequest($url, $params)
{
$request = new GuzzleClient();
$request->
}
} }

+ 32
- 11
app/Services/WeiboService.php View File

@ -1,6 +1,7 @@
<?php <?php
namespace App\Services; namespace App\Services;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
set_time_limit(0); set_time_limit(0);
@ -20,8 +21,11 @@ class WeiboService
// @mkdir('data'); // @mkdir('data');
// @mkdir('data/Kendall'); // @mkdir('data/Kendall');
// @mkdir('data/video'); // @mkdir('data/video');
$video_dir = "/Volumes/intel660p/video/weibo/ruye";
$image_dir = "/Volumes/intel660p/image/weibo/ruya";
// $video_dir = "/Volumes/intel660p/video/weibo/ruye";
// $image_dir = "/Volumes/intel660p/image/weibo/ruya";
$video_dir = "/Volumes/Samsung/weibo/video";
$image_dir = "/Volumes/Samsung/weibo/image";
try { try {
if (strlen($content) > 0) { if (strlen($content) > 0) {
@ -41,8 +45,10 @@ class WeiboService
echo json_encode($mblog); echo json_encode($mblog);
if (array_key_exists("pics", $mblog)) { if (array_key_exists("pics", $mblog)) {
$pics = $mblog['pics']; $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);
self::process_pic($pics, $image_dir, $user, $text);
// foreach ($pics as $pic) { // foreach ($pics as $pic) {
// if (array_key_exists("large", $pic)) { // if (array_key_exists("large", $pic)) {
// $pic_url = $pic['large']['url']; // $pic_url = $pic['large']['url'];
@ -67,19 +73,21 @@ class WeiboService
if (array_key_exists("pics", $mblog["retweeted_status"])) { if (array_key_exists("pics", $mblog["retweeted_status"])) {
$pics = $mblog["retweeted_status"]['pics']; $pics = $mblog["retweeted_status"]['pics'];
# code... # code...
self::process_pic($pics, $image_dir);
$user = Arr::get($mblog["retweeted_status"], "user", []);
$text = Arr::get($mblog["retweeted_status"], "text", '');
self::process_pic($pics, $image_dir, $user, $text);
} }
# code... # code...
} else if (array_key_exists("page_info", $mblog) && array_key_exists("media_info", $mblog["page_info"])) { } else if (array_key_exists("page_info", $mblog) && array_key_exists("media_info", $mblog["page_info"])) {
# code... # code...
$page_info = $mblog["page_info"]; $page_info = $mblog["page_info"];
$media_info = $mblog["page_info"]["media_info"]; $media_info = $mblog["page_info"]["media_info"];
$video_url = $media_info["mp4_720p_mp4"];
$video_url = Arr::get($media_info, "mp4_720p_mp4", "");
if ($video_url == "") { if ($video_url == "") {
$video_url = $media_info["mp4_hd_url"];
$video_url = Arr::get($media_info, "mp4_hd_url", "");
} }
if ($video_url == "") { if ($video_url == "") {
$video_url = $media_info["mp4_sd_url"];
$video_url = Arr::get($media_info, "mp4_sd_url", "");
} }
if ($video_url != "") { if ($video_url != "") {
self::process_video($video_url, $video_dir, $page_info["content2"]); self::process_video($video_url, $video_dir, $page_info["content2"]);
@ -94,7 +102,7 @@ class WeiboService
} catch (\Exception $e) { } catch (\Exception $e) {
Log::error($e); Log::error($e);
Log::error($e->getTraceAsString()); Log::error($e->getTraceAsString());
Log::info($content);
// Log::info($content);
} }
return true; return true;
} }
@ -106,24 +114,33 @@ class WeiboService
return ((float)$usec + (float)$sec); return ((float)$usec + (float)$sec);
} }
function process_pic($pics, $subdir)
function process_pic($pics, $subdir, $user, $text)
{ {
if (!file_exists($subdir)) { if (!file_exists($subdir)) {
mkdir($subdir); mkdir($subdir);
} }
$h2w = 0;
foreach ($pics as $pic) { foreach ($pics as $pic) {
if (array_key_exists("large", $pic)) { if (array_key_exists("large", $pic)) {
$pic_url = $pic['large']['url']; $pic_url = $pic['large']['url'];
$h2w = $pic['large']['geo']['height'] / $pic['large']['geo']['width'];
if (gettype($pic["large"]["geo"]) == "array") {
$h2w = $pic['large']['geo']['height'] / $pic['large']['geo']['width'];
}
} else { } else {
$pic_url = $pic['url']; $pic_url = $pic['url'];
$h2w = $pic['geo']['height'] / $pic['geo']['width'];
if (gettype($pic["geo"]) == "array") {
$h2w = $pic['geo']['height'] / $pic['geo']['width'];
}
} }
if ($h2w > 15) { if ($h2w > 15) {
continue; continue;
} }
$pic_name = pathinfo($pic_url, PATHINFO_FILENAME); $pic_name = pathinfo($pic_url, PATHINFO_FILENAME);
$pic_ext = pathinfo($pic_url, PATHINFO_EXTENSION); $pic_ext = pathinfo($pic_url, PATHINFO_EXTENSION);
$user_name = Arr::get($user, "screen_name", '');
if ($user_name != '') {
$pic_name = $user_name . '--' .$pic_name;
}
$file_name = $subdir . "/" . $pic_name . "." . $pic_ext; $file_name = $subdir . "/" . $pic_name . "." . $pic_ext;
if (!file_exists($file_name)) { if (!file_exists($file_name)) {
$pic_content = file_get_contents($pic_url); $pic_content = file_get_contents($pic_url);
@ -135,6 +152,7 @@ class WeiboService
function process_video($video_url, $subdir, $video_name) function process_video($video_url, $subdir, $video_name)
{ {
Log::info("video_url: " . $video_url);
if (!file_exists($subdir)) { if (!file_exists($subdir)) {
mkdir($subdir); mkdir($subdir);
} }
@ -142,6 +160,9 @@ class WeiboService
parse_str($url_params["query"], $params); parse_str($url_params["query"], $params);
$video_origin_name = $url_params["path"]; $video_origin_name = $url_params["path"];
$video_origin_name = substr($video_origin_name, 1); $video_origin_name = substr($video_origin_name, 1);
$video_origin_name = str_replace("stream/", "--", $video_origin_name);
$video_origin_name = str_replace("/", "", $video_origin_name);
$video_name = preg_replace("/(http|https|ftp)(.)*([a-z0-9\-\.\_])+/i", "", $video_name);
$now = strtotime(date("y-m-d h:i:s")); $now = strtotime(date("y-m-d h:i:s"));
if ($now > $params['Expires']) { if ($now > $params['Expires']) {
Log::error("视频有效期已过,now is " . $now .", Expires is ". $params['Expires']); Log::error("视频有效期已过,now is " . $now .", Expires is ". $params['Expires']);


+ 30
- 8
app/Services/XiuGirlsService.php View File

@ -12,6 +12,16 @@ use Illuminate\Support\Facades\Storage;
class XiuGirlsService class XiuGirlsService
{ {
private static $name_dir = [ private static $name_dir = [
"ycc" => [
"dir" => "ycc",
"code" => 22162,
"name" => "杨晨晨"
],
"azu" => [
"dir" => "azu",
"code" => 26002,
"name" => "阿朱"
],
"xq" => [ "xq" => [
"dir" => "xq", "dir" => "xq",
"code" => 22204, "code" => 22204,
@ -22,11 +32,6 @@ class XiuGirlsService
"code" => 15902, "code" => 15902,
"name" => "原干惠" "name" => "原干惠"
], ],
"ycc" => [
"dir" => "ycc",
"code" => 22162,
"name" => "杨晨晨"
],
"wyc" => [ "wyc" => [
"dir" => "wyc", "dir" => "wyc",
"code" => 19702, "code" => 19702,
@ -62,8 +67,7 @@ class XiuGirlsService
// 22899 芝芝 booty // 22899 芝芝 booty
// 20015 黄乐然 // 20015 黄乐然
// 26560 姜仁卿 // 26560 姜仁卿
// print_r(self::$name_dir);exit;
$NUM_OF_ATTEMPTS = 5;
$NUM_OF_ATTEMPTS = 50;
foreach (self::$name_dir as $name) { foreach (self::$name_dir as $name) {
@ -88,7 +92,19 @@ class XiuGirlsService
foreach ($items as $item) { foreach ($items as $item) {
usleep(random_int(1000, 10000) * 1000); usleep(random_int(1000, 10000) * 1000);
echo "相册子链接: " .$item . "\n"; echo "相册子链接: " .$item . "\n";
$html = (new \QL\QueryList)->get($baseUrl. $item);
$queryItemUrlTimes = 1;
do {
try {
$html = (new \QL\QueryList)->get($baseUrl . $item);
} catch (\Exception $e) {
\Log::error("查询相册子链接失败,将重试, 异常信息: " . $e->getMessage());
$sleepTime = 1000 * random_int(1000, 10000);
echo "查询相册子链接失败 sleep {$sleepTime} nano second \n";
usleep($sleepTime);
$queryItemUrlTimes++;
}
break;
} while ($queryItemUrlTimes < 10);
$title = $html->find("h1 > a")->texts(); $title = $html->find("h1 > a")->texts();
dump($title); dump($title);
echo "相册名: " . $title[0] . "\n"; echo "相册名: " . $title[0] . "\n";
@ -122,6 +138,9 @@ class XiuGirlsService
break; break;
} while ($attempts <= $NUM_OF_ATTEMPTS); } while ($attempts <= $NUM_OF_ATTEMPTS);
foreach ($images as $image) { foreach ($images as $image) {
if (strpos($image, "thumb_600x900") !== false) {
$image = str_replace( "thumb_600x900/", "", $image);
}
if (file_exists($albumPath."/".pathinfo("http:".$image)['filename'].".jpg")) { if (file_exists($albumPath."/".pathinfo("http:".$image)['filename'].".jpg")) {
continue; continue;
} }
@ -141,6 +160,9 @@ class XiuGirlsService
echo 'Curl error: ' . curl_error($curl_handle) ."\n"; echo 'Curl error: ' . curl_error($curl_handle) ."\n";
echo "retry times: " .$i++ ." times \n"; echo "retry times: " .$i++ ." times \n";
sleep(1); sleep(1);
$sleepTime = 1000 * random_int(1000, 10000);
echo "retry sleep {$sleepTime} nano second \n";
usleep($sleepTime);
$query = curl_exec($curl_handle); $query = curl_exec($curl_handle);
if ($i >= 100) { if ($i >= 100) {
break; break;


+ 15
- 0
fail.log View File

@ -448,3 +448,18 @@
/Users/shixuesen/OneDrive/Pictures/instagram/ngoctrinh89/ https://scontent-lax3-1.cdninstagram.com/v/t72.14836-16/77019280_111931726815092_703361059886920346_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeSJ9&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=108&_nc_ohc=JwuhNEi0_fkAX_4Y3lN&vs=17861648662630403_1843682635&_nc_vs=HBksFQAYJEdKQTRsd1IwMzlBaXpXVUFBSnJ5WmtzbzE4SUpidlE1QUFBRhUAABUAGCRHQXRZZ3dTWnA4QXl1YTBBQUFWaXFsRlFCZlp0YnZRNUFBQUYVAgAoABgAGwGIB3VzZV9vaWwBMRUAABgAFoaQuczkxLo%2FFQIZBRgCQzMsF0AuAAAAAAAAGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHXoBwA%3D&_nc_rid=f597c61dd8&oe=5E1C5DF0&oh=780dc4ded7749bcd89f37dc653242ec6 /Users/shixuesen/OneDrive/Pictures/instagram/ngoctrinh89/ https://scontent-lax3-1.cdninstagram.com/v/t72.14836-16/77019280_111931726815092_703361059886920346_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeSJ9&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=108&_nc_ohc=JwuhNEi0_fkAX_4Y3lN&vs=17861648662630403_1843682635&_nc_vs=HBksFQAYJEdKQTRsd1IwMzlBaXpXVUFBSnJ5WmtzbzE4SUpidlE1QUFBRhUAABUAGCRHQXRZZ3dTWnA4QXl1YTBBQUFWaXFsRlFCZlp0YnZRNUFBQUYVAgAoABgAGwGIB3VzZV9vaWwBMRUAABgAFoaQuczkxLo%2FFQIZBRgCQzMsF0AuAAAAAAAAGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHXoBwA%3D&_nc_rid=f597c61dd8&oe=5E1C5DF0&oh=780dc4ded7749bcd89f37dc653242ec6
/Users/shixuesen/OneDrive/Pictures/instagram/siawase726/ https://scontent-lax3-1.cdninstagram.com/v/t72.14836-16/75718296_2657670254316327_7781578261165409694_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeSJ9&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=103&_nc_ohc=smC3k_u7Hj4AX-tHu4p&vs=17947084597313785_2166011588&_nc_vs=HBksFQAYJEdKaGVnd1FuUzNBVEkzRUpBSjZGcWpBenVQMXJidlE1QUFBRhUAABUAGCRHTWNQZ1FUZzNVVVdCYTBCQUFXMFB4T08zSm95YnZRNUFBQUYVAgAoABgAGwGIB3VzZV9vaWwBMRUAABgAFvLmn7PnseE%2FFQIZBRgCQzMsF0AuAAAAAAAAGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHXoBwA%3D&_nc_rid=17b16e75e0&oe=5E1F0A25&oh=e5da28df25569baef8c5610c99748878 /Users/shixuesen/OneDrive/Pictures/instagram/siawase726/ https://scontent-lax3-1.cdninstagram.com/v/t72.14836-16/75718296_2657670254316327_7781578261165409694_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeSJ9&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=103&_nc_ohc=smC3k_u7Hj4AX-tHu4p&vs=17947084597313785_2166011588&_nc_vs=HBksFQAYJEdKaGVnd1FuUzNBVEkzRUpBSjZGcWpBenVQMXJidlE1QUFBRhUAABUAGCRHTWNQZ1FUZzNVVVdCYTBCQUFXMFB4T08zSm95YnZRNUFBQUYVAgAoABgAGwGIB3VzZV9vaWwBMRUAABgAFvLmn7PnseE%2FFQIZBRgCQzMsF0AuAAAAAAAAGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHXoBwA%3D&_nc_rid=17b16e75e0&oe=5E1F0A25&oh=e5da28df25569baef8c5610c99748878
/Users/shixuesen/OneDrive/Pictures/instagram/nyanchan22/ https://scontent-hkg3-1.cdninstagram.com/v/t72.14836-16/75805305_1216948708502329_2023188842245855864_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeSJ9&_nc_ht=scontent-hkg3-1.cdninstagram.com&_nc_cat=101&_nc_ohc=WPCNKzDewaUAX8I1-sc&vs=17926875466351803_2840709810&_nc_vs=HBksFQAYJEdIbXloQVE1NjNyenpsSUVBSGdhbVZfSXp4TWNidlE1QUFBRhUAABUAGCRHTjJJaUFSMFhiamRlaUVMQUdmYjVGeXhDSGNHYnZRNUFBQUYVAgAoABgAGwGIB3VzZV9vaWwBMRUAABgAFvaslo6%2Bmdg%2FFQIZBRgCQzMsF0AuAAAAAAAAGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHXoBwA%3D&_nc_rid=9c7612fad8&oe=5E24ADB7&oh=09c03071293ccc4722d58efe50b67b76 /Users/shixuesen/OneDrive/Pictures/instagram/nyanchan22/ https://scontent-hkg3-1.cdninstagram.com/v/t72.14836-16/75805305_1216948708502329_2023188842245855864_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeSJ9&_nc_ht=scontent-hkg3-1.cdninstagram.com&_nc_cat=101&_nc_ohc=WPCNKzDewaUAX8I1-sc&vs=17926875466351803_2840709810&_nc_vs=HBksFQAYJEdIbXloQVE1NjNyenpsSUVBSGdhbVZfSXp4TWNidlE1QUFBRhUAABUAGCRHTjJJaUFSMFhiamRlaUVMQUdmYjVGeXhDSGNHYnZRNUFBQUYVAgAoABgAGwGIB3VzZV9vaWwBMRUAABgAFvaslo6%2Bmdg%2FFQIZBRgCQzMsF0AuAAAAAAAAGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHXoBwA%3D&_nc_rid=9c7612fad8&oe=5E24ADB7&oh=09c03071293ccc4722d58efe50b67b76
/Users/shixuesen/OneDrive/Pictures/instagram/eom_sangmi/ https://scontent-lax3-1.cdninstagram.com/v/t72.14836-16/76783776_552333408705484_4187752608895443377_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeSJ9&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=104&_nc_ohc=Tn6Tqx1KMqkAX-mip16&vs=18051408970213676_3945280308&_nc_vs=HBksFQAYJEdLQ2drd1RNbTU4a1dQWUJBTEdoYldUUDRoMDZidlE1QUFBRhUAABUAGCRHSzJjZFFScV9OZGVTRE1DQURRT25QVTdaVDV4YnZRNUFBQUYVAgAoABgAGwGIB3VzZV9vaWwBMRUAABgAFtih2uuV6pBAFQIZBRgCQzMsF0AddcKPXCj2GBJkYXNoX2Jhc2VsaW5lXzFfdjERAHXoBwA%3D&_nc_rid=e8bdea7ccf&oe=5E37BA6E&oh=f6b35f1424e8b88ff7c19104b9a96ab1
/Users/shixuesen/OneDrive/Pictures/instagram/sharalinmusic/ https://scontent-lax3-1.cdninstagram.com/v/t72.14836-16/77007845_160920518681902_8133639976202481848_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeSJ9&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=5qssFPCbelQAX9ulwaD&vs=18114290221079493_3853898894&_nc_vs=HBkcFQAYJEdPVUxsd1F1WlZvNlc1SUFBTGd3ZF9oMmZ1QndidlE1QUFBRhUAACgAGAAbAYgHdXNlX29pbAExFQAAGAAWipDK%2Brq2rUAVAhkFGAJDMywXP%2FywIMSbpeMYEmRhc2hfYmFzZWxpbmVfMV92MREAdegHAA%3D%3D&_nc_rid=12448b6aac&oe=5E381B95&oh=f1256597c187c1861e2e0bdcef3ac043
/Users/shixuesen/OneDrive/Pictures/instagram/changchinlan/ https://scontent-lax3-1.cdninstagram.com/v/t72.14836-16/76917404_2878853552173466_6287054966578091103_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeSJ9&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=v04nXrmJwagAX_-PbzC&vs=17864147215637215_4164751642&_nc_vs=HBksFQAYJEdKeXFsUVNhY1ZaVFRUb0tBRjhVUG80dUcwQlhidlE1QUFBRhUAABUAGCRHS0RCamdUaS1ITUJXYklCQUpkVnRwMHJFQ2diYnZRNUFBQUYVAgAoABgAGwGIB3VzZV9vaWwBMRUAABgAFr7q2Jmc1rs%2FFQIZBRgCQzMsF0AhAAAAAAAAGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHXoBwA%3D&_nc_rid=b12ba79ab3&oe=5E39B0B7&oh=97516d26e9175cd35841f88a0e98d4b1
/Users/shixuesen/OneDrive/Pictures/instagram/cr5p__br/ https://scontent-lax3-1.cdninstagram.com/v/t51.2885-15/e35/83142973_120455859293164_5699295109419286793_n.jpg?_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=104&_nc_ohc=5oTXVSMa0DwAX-pWF-y&oh=a5aa22bb71c04d137d1e2a6741bb3a4e&oe=5EB5CF05&ig_cache_key=MjIzNDc5NTM2NjA3NTU0MzEzOQ%3D%3D.2
/Users/shixuesen/OneDrive/Pictures/instagram/nancylobh/ https://scontent-lax3-2.cdninstagram.com/v/t51.2885-15/e35/81585373_467745927446207_7081177701991670603_n.jpg?_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=111&_nc_ohc=NeZyxDtlrxYAX-69JNo&se=7&oh=3f5ddba7055a2156db010c08eadff559&oe=5EBDE840&ig_cache_key=MjIyNTQ2MTU4NjU4NDU3MjkzNQ%3D%3D.2
/Users/shixuesen/OneDrive/Pictures/instagram/nancylobh/ https://scontent-lax3-1.cdninstagram.com/v/t51.2885-15/e35/82116400_1195711020818535_4403205658523738781_n.jpg?_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=103&_nc_ohc=si_E8UiMo6UAX_GK2zN&se=7&oh=e02920570c10bc19ba0a732711242e4b&oe=5ECA2A8C&ig_cache_key=MjIxMTE5OTc0MDU5NTg4MTgxMA%3D%3D.2
/Users/shixuesen/OneDrive/Pictures/instagram/nancylobh/ https://scontent-lax3-2.cdninstagram.com/v/t51.2885-15/e35/78936340_565017074061395_2217281595396611309_n.jpg?_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=111&_nc_ohc=IICPLIi9WuwAX8iG6XP&se=7&oh=851e5bce2dd60103b326b73dfebf15ab&oe=5EDB47AF&ig_cache_key=MjIwNjgwMTkwMTEyMzk3MjE3OA%3D%3D.2
/Users/shixuesen/OneDrive/Pictures/instagram/super_fetish/ https://scontent-lax3-1.cdninstagram.com/v/t51.2885-15/e35/79928492_457213204953507_6004711219820486045_n.jpg?_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=103&_nc_ohc=tDAwTZsLvoAAX_rmUXg&se=7&oh=f50b42a71261c55c2a961be7ae1cfa52&oe=5ED4E3EF&ig_cache_key=MjIxMzA1NzIyMTM4MjM5NjU2OA%3D%3D.2
/Users/shixuesen/OneDrive/Pictures/instagram/super_fetish/ https://scontent-lax3-1.cdninstagram.com/v/t51.2885-15/e35/70229240_541337433289133_3443290099054635114_n.jpg?_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=105&_nc_ohc=lTvnsqYUV5IAX9NvtBM&se=8&oh=f847b103e63bb5141e42dd67b75d96c0&oe=5ED21E1D&ig_cache_key=MjE1MDU5MzA0Mjg3NzE5ODc4OA%3D%3D.2
/Users/shixuesen/OneDrive/Pictures/instagram/super_fetish/ https://scontent-lax3-2.cdninstagram.com/v/t51.2885-15/e35/47692327_402989330442847_1616283796347220582_n.jpg?_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=107&_nc_ohc=CP2WGhIQ21kAX9TPDZy&se=7&oh=7da322345917dcad431bab92f8078756&oe=5ECDA303&ig_cache_key=MTk0OTg4NTY1MzUxMDM3Njc0Nw%3D%3D.2
/Users/shixuesen/OneDrive/Pictures/instagram/super_fetish/ https://scontent-lax3-1.cdninstagram.com/v/t51.2885-15/e35/49475043_2292459564132340_2663057009087191471_n.jpg?_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=104&_nc_ohc=WJajDcZgdhgAX-Ief6G&se=8&oh=8b6dc01c0cd2cb3dbed25fb556fde9d7&oe=5EBA643D&ig_cache_key=MTk0NTc5OTY5NTE5NDM3MTIxMA%3D%3D.2
/Users/shixuesen/OneDrive/Pictures/instagram/ngoctrinh89/ https://scontent-lax3-1.cdninstagram.com/v/t72.14836-16/74818720_1096380494050032_6114039499815321815_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjU0MC5zdG9yeSJ9&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=100&_nc_ohc=FU1ttrc-RGQAX9Q_ZjX&vs=17934882442343104_2512877957&_nc_vs=HBksFQAYJEdLQ2tkUVR3OHVMNUp1VURBTmNBTXhHSWJ0bFVidlE1QUFBRhUAABUAGCRHQldPaUFTa3A5aEVRcVFBQUNYNmZSaXMxdEJKYnZRNUFBQUYVAgAoABgAGwGIB3VzZV9vaWwBMRUAABgAFoC9tfTG69s%2FFQIZBRgCQzMsF0Ald0vGp%2B%2BeGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHXoBwA%3D&_nc_rid=2355a236a6&oe=5E3C3E13&oh=a94e2bb7cf7a49124155c301e1ea0bf5
/Users/shixuesen/OneDrive/Pictures/instagram/aiiiiidj/ https://scontent-lax3-1.cdninstagram.com/v/t72.14836-16/76822683_2648312878788133_8679987958384089669_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeSJ9&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=101&_nc_ohc=xg8kkqxrNs8AX94fIMS&vs=17849782345844039_4181825681&_nc_vs=HBksFQAYJEdKczRsQVFsN21Sa29HZ0pBRVhhSmtJUGczVjRidlE1QUFBRhUAABUAGCRHUFBxbFFRdzc2WU1WVWNJQUJ5S0xtcllkdk1kYnZRNUFBQUYVAgAoABgAGwGIB3VzZV9vaWwBMRUAABgAFo68w9PvkbU%2FFQIZBRgCQzMsF0AgZmZmZmZmGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHXoBwA%3D&_nc_rid=762f16b20a&oe=5E3DD076&oh=7540bf84381fedbf799ee7d5f82749e8
/Users/shixuesen/OneDrive/Pictures/instagram/nancylobh/ https://scontent-lax3-1.cdninstagram.com/v/t51.2885-15/e35/84444144_510052023230156_5112092550493590497_n.jpg?_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=1&_nc_ohc=Ig2OLe8WqSMAX_k61vA&se=7&oh=1e6fcc74ac3b8007fb29a1b567c3fcb1&oe=5ED4D1E6&ig_cache_key=MjIzOTg0NTM0NzA4OTU0NzIwNA%3D%3D.2
/Users/shixuesen/OneDrive/Pictures/instagram/ngoctrinh89/ https://scontent-lax3-2.cdninstagram.com/v/t72.14836-16/77365254_176289706984571_8539853632472623438_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeSJ9&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=111&_nc_ohc=3AF3HKOk2EQAX9hEhF7&vs=18087672859145809_823954742&_nc_vs=HBksFQAYJEdBYUFuQVI3eEZ5bFZhQUFBRTRwWFBXaHA0TjJidlE1QUFBRhUAABUAGCRHRWlCaGdRS0RiNm1ZNm9BQUZkcEZ4d0p6YVpJYnZRNUFBQUYVAgAoABgAGwGIB3VzZV9vaWwBMRUAABgAFqL3hvGOqaFAFQIZBRgCQzMsF0At7AgxJul5GBJkYXNoX2Jhc2VsaW5lXzFfdjERAHXoBwA%3D&_nc_rid=5b7881aa96&oe=5E43043D&oh=0603705525b4989757b0d76a5e664175

Loading…
Cancel
Save