Browse Source

add instagram and ffmpeg modify

feature/new_bilibili_and_instagram_sxs20191126
shixuesen 3 years ago
parent
commit
1935770829
9 changed files with 143 additions and 86 deletions
  1. +1
    -1
      app/Console/Commands/AcfunScrape.php
  2. +30
    -1
      app/Console/Commands/CommonTest.php
  3. +1
    -1
      app/Console/Commands/RenameTest.php
  4. +2
    -1
      app/Http/Controllers/WeiboController.php
  5. +37
    -3
      app/Services/FfmpegService.php
  6. +37
    -48
      app/Services/InstagramService.php
  7. +32
    -30
      app/Services/XiurenjiService.php
  8. +1
    -1
      app/Utils/helper.php
  9. +2
    -0
      fail.log

+ 1
- 1
app/Console/Commands/AcfunScrape.php View File

@ -43,7 +43,7 @@ class AcfunScrape extends Command
// 小清晨儿 2277346 // 小清晨儿 2277346
$service = new AcfunService(); $service = new AcfunService();
// $service->requestUpPageApi(10703951);exit; // $service->requestUpPageApi(10703951);exit;
// $service->queryUpUsersVideos(2277346);exit;
// $service->queryUpUsersVideos(10703951);exit;
$service->downloadVideo(); $service->downloadVideo();
// //
} }


+ 30
- 1
app/Console/Commands/CommonTest.php View File

@ -19,7 +19,7 @@ class CommonTest extends Command
* *
* @var string * @var string
*/ */
protected $signature = 'common:test {path}';
protected $signature = 'common:test {path} {needDeleteAfterEncode=0} {needDeleteExistFiles=0}';
/** /**
* The console command description. * The console command description.
@ -51,6 +51,14 @@ class CommonTest extends Command
date_default_timezone_set('PRC'); date_default_timezone_set('PRC');
$path = $this->argument("path"); $path = $this->argument("path");
$service = new FfmpegService(); $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->checkFileEncodeType();exit;
$service->processDir(trim($path));exit; $service->processDir(trim($path));exit;
$cache = Cache::driver("redis"); $cache = Cache::driver("redis");
@ -86,4 +94,25 @@ class CommonTest extends Command
preg_match_all("#\[(\d+)\]\s+-+\s+Quality:\s+[\S]+\s+720P#", $result, $match); preg_match_all("#\[(\d+)\]\s+-+\s+Quality:\s+[\S]+\s+720P#", $result, $match);
dump($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);
}
}
} }

+ 1
- 1
app/Console/Commands/RenameTest.php View File

@ -60,7 +60,7 @@ class RenameTest extends Command
// $arr[2] = 1640488544; // $arr[2] = 1640488544;
// asort($arr); // asort($arr);
// dump($arr);exit; // dump($arr);exit;
// $rename->rename($path, $prefix);exit;
// $rename->rename($path, $prefix);
$rename->splitCustomSizeOfFolder($path, $prefix, 500);exit; $rename->splitCustomSizeOfFolder($path, $prefix, 500);exit;
// $rename->rename("/Volumes/WD/tmp/写真图/猫九", "猫九-"); // $rename->rename("/Volumes/WD/tmp/写真图/猫九", "猫九-");


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

@ -34,6 +34,7 @@ class WeiboController extends Controller
// 轮子哥 2304131916825084 // 轮子哥 2304131916825084
// 徐圣佑 5893812490 // 徐圣佑 5893812490
// 徐圣佑- 新号 1076035893812490 // 徐圣佑- 新号 1076035893812490
// Afreecatv 精选 1076037383142802
@ -47,7 +48,7 @@ class WeiboController extends Controller
// for ($i = 10; $i >= 1; $i--) { // for ($i = 10; $i >= 1; $i--) {
// $url[] = 'https://m.weibo.cn/feed/group?gid=4423532052076817&&page=' . $i; // $url[] = 'https://m.weibo.cn/feed/group?gid=4423532052076817&&page=' . $i;
// } // }
for ($i = 5; $i >= 1; $i--) {
for ($i = 10; $i >= 1; $i--) {
$url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=2304131916825084&page=' . $i; $url[] = 'https://m.weibo.cn/api/container/getIndex?containerid=2304131916825084&page=' . $i;
} }
return response()->json($url); return response()->json($url);


+ 37
- 3
app/Services/FfmpegService.php View File

@ -17,6 +17,10 @@ class FfmpegService
private $ffprobe; private $ffprobe;
private $needRemoveAfterEncode = false;
private $needRemoveExistFiles = false;
public function __construct() public function __construct()
{ {
$this->mediainfo = new MediaInfo(); $this->mediainfo = new MediaInfo();
@ -141,7 +145,7 @@ class FfmpegService
return; return;
} }
$targetFile = $fileInfo["dirname"] . '/' .$fileInfo["filename"] . '-x265'. '.' . $fileInfo["extension"]; $targetFile = $fileInfo["dirname"] . '/' .$fileInfo["filename"] . '-x265'. '.' . $fileInfo["extension"];
if (is_file($targetFile)) {
if (is_file($targetFile) && $this->isNeedRemoveExistFiles()) {
Log::info("$targetFile is exists"); Log::info("$targetFile is exists");
unlink($pathFile); unlink($pathFile);
rename($targetFile, $pathFile); rename($targetFile, $pathFile);
@ -152,7 +156,7 @@ class FfmpegService
$result = shell_exec("ffmpeg -threads 4 -i ". escapeshellarg($pathFile) ." -preset ultrafast -c:v libx265 -vtag hvc1 " . escapeshellarg($targetFile) . " && echo 'ok'"); $result = shell_exec("ffmpeg -threads 4 -i ". escapeshellarg($pathFile) ." -preset ultrafast -c:v libx265 -vtag hvc1 " . escapeshellarg($targetFile) . " && echo 'ok'");
// echo $result; // echo $result;
// return; // return;
if (trim($result) == "ok") {
if (trim($result) == "ok" && $this->isNeedRemoveAfterEncode()) {
echo "compress work done remove the file \n"; echo "compress work done remove the file \n";
Log::info("compress work done remove the file"); Log::info("compress work done remove the file");
$oldFileSize = filesize($pathFile); $oldFileSize = filesize($pathFile);
@ -256,7 +260,7 @@ class FfmpegService
public function checkFileSize($file, $size = 1): bool public function checkFileSize($file, $size = 1): bool
{ {
if (is_file($file) && filesize($file) > 1 * 1024 * 1024) { if (is_file($file) && filesize($file) > 1 * 1024 * 1024) {
return true; return true;
} }
@ -282,7 +286,37 @@ class FfmpegService
return trim($codecName) == "hevc"; return trim($codecName) == "hevc";
} }
/**
* @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;
}
} }


+ 37
- 48
app/Services/InstagramService.php View File

@ -24,6 +24,20 @@ class InstagramService
// private $password = 'Qwer2020'; // private $password = 'Qwer2020';
private $debug = false; private $debug = false;
private $truncatedDebug = false; private $truncatedDebug = false;
private $ig;
public function __construct()
{
$this->ig = new Instagram($this->debug, $this->truncatedDebug);
try {
$this->ig->login($this->username, $this->password);
} catch
(\Exception $e) {
echo 'Something went wrong: ' . $e->getMessage() . "\n";
exit(0);
}
}
private $userList = [ private $userList = [
["bedich520" => 17707667205], ["bedich520" => 17707667205],
@ -139,6 +153,10 @@ class InstagramService
$myfile = file_put_contents($failLogFile, $filePrefix . "\t" . $fileUrl . PHP_EOL, FILE_APPEND | LOCK_EX); $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 = "") function downloadFile($filenameUrl, $flag = 0, $filePrefix = "", $fileNamePrefix = "")
{ {
//echo $filenameUrl;exit; //echo $filenameUrl;exit;
@ -165,6 +183,14 @@ class InstagramService
echo "\n file exists " . $filePrefix . $filename; echo "\n file exists " . $filePrefix . $filename;
return 0; return 0;
} }
// 去老的目录检查下是否已存在
$oldFileDirList = $this->oldFileDirList();
foreach ($oldFileDirList as $oldFileDir) {
if (file_exists($oldFileDir . $filename)) {
echo "\n file exists " . $oldFileDir . $filename;
return 0;
}
}
try { try {
$cn_match = "https://scontent-lax3-1.cdninstagram.com"; $cn_match = "https://scontent-lax3-1.cdninstagram.com";
$options = array( $options = array(
@ -227,21 +253,13 @@ class InstagramService
public function scrapeLikedUsers() public function scrapeLikedUsers()
{ {
$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);
}
$baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/Likes/";
$baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/Likes_new/";
try { try {
$maxId = null; $maxId = null;
do { do {
$response = $ig->media->getLikedFeed();
$response = $this->ig->media->getLikedFeed();
foreach ($response->getItems() as $item) { foreach ($response->getItems() as $item) {
//echo json_encode($response->getItems());exit; //echo json_encode($response->getItems());exit;
$userName = $item->getUser()->getUsername() . "_"; $userName = $item->getUser()->getUsername() . "_";
@ -295,22 +313,13 @@ class InstagramService
public function scrapeFeeds() public function scrapeFeeds()
{ {
$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);
}
$count = 0; $count = 0;
$baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/Likes/";
$baseImageDir = "/Users/shixuesen/OneDrive/Pictures/instagram/Likes_new/";
try { try {
$maxId = null; $maxId = null;
do { do {
$response = $ig->timeline->getTimelineFeed($maxId);
$response = $this->ig->timeline->getTimelineFeed($maxId);
foreach ($response->getFeedItems() as $item) { foreach ($response->getFeedItems() as $item) {
if ($item->getMediaOrAd() == null || $item->getMediaOrAd()->getProductType() == "ad") { if ($item->getMediaOrAd() == null || $item->getMediaOrAd()->getProductType() == "ad") {
continue; continue;
@ -355,9 +364,10 @@ class InstagramService
break; break;
} }
$count++; $count++;
if ($count > 200) {
if ($count > 50) {
return; return;
} }
sleep(5 * random_int(1, 10));
} }
// Now we must update the maxId variable to the "next page". // Now we must update the maxId variable to the "next page".
@ -371,7 +381,7 @@ class InstagramService
// always pause between requests that may run very rapidly, otherwise // always pause between requests that may run very rapidly, otherwise
// Instagram will throttle you temporarily for abusing their API! // Instagram will throttle you temporarily for abusing their API!
echo "\n Sleeping for 5s...\n"; echo "\n Sleeping for 5s...\n";
sleep(5 * random_int(1, 10));
sleep(5 * random_int(1, 100));
} while ($maxId != null); } while ($maxId != null);
} catch (\Exception $e) { } catch (\Exception $e) {
echo 'Something went wrong: ' . $e->getMessage() . "\n"; echo 'Something went wrong: ' . $e->getMessage() . "\n";
@ -380,17 +390,7 @@ class InstagramService
public function scrapeUsers($start = 0) public function scrapeUsers($start = 0)
{ {
$ig = new Instagram($this->debug, $this->truncatedDebug);
try {
// echo 1;
$ig->login($this->username, $this->password);
} catch
(\Exception $e) {
dump($e);
echo 'Something went wrong: ' . $e->getMessage() . "\n";
exit(0);
}
// $list = $ig->collection->getFeed("17906577283646940"); // $list = $ig->collection->getFeed("17906577283646940");
// dump($list->getItems()[0]->getMedia()->getCarouselMedia());exit; // dump($list->getItems()[0]->getMedia()->getCarouselMedia());exit;
@ -409,7 +409,7 @@ class InstagramService
$thisUserImageDir = $baseImageDir . $trueName . "/"; $thisUserImageDir = $baseImageDir . $trueName . "/";
// $existFiles = $this->traceExistFiles($thisUserImageDir); // $existFiles = $this->traceExistFiles($thisUserImageDir);
try { try {
$userId = $ig->people->getUserIdForName(trim($userName));
$userId = $this->ig->people->getUserIdForName(trim($userName));
} catch (\Exception $e) { } catch (\Exception $e) {
// if ($e instanceof UserNotFou) // if ($e instanceof UserNotFou)
Log::error("ins get user id for name error: " . $e->getMessage() . " username is " . $userName); Log::error("ins get user id for name error: " . $e->getMessage() . " username is " . $userName);
@ -431,7 +431,7 @@ class InstagramService
// } else { // } else {
try { try {
$response = $ig->story->getUserReelMediaFeed($userId);
$response = $this->ig->story->getUserReelMediaFeed($userId);
} catch (\Exception $e) { } catch (\Exception $e) {
Log::error("current user has error, $userName, " . $e->getMessage()); Log::error("current user has error, $userName, " . $e->getMessage());
} }
@ -449,7 +449,7 @@ class InstagramService
// Request the page corresponding to maxId. // Request the page corresponding to maxId.
echo "\n current maxId: " . $maxId; echo "\n current maxId: " . $maxId;
try { try {
$response = $ig->timeline->getUserFeed($userId, $maxId);
$response = $this->ig->timeline->getUserFeed($userId, $maxId);
} catch (\Exception $e) { } catch (\Exception $e) {
Log::error("current user has error, $userName, " . $e->getMessage()); Log::error("current user has error, $userName, " . $e->getMessage());
continue 2; continue 2;
@ -552,17 +552,6 @@ class InstagramService
public function scrapeCollection() public function scrapeCollection()
{ {
$ig = new Instagram($this->debug, $this->truncatedDebug);
try {
// echo 1;
$ig->login($this->username, $this->password);
} catch
(\Exception $e) {
dump($e);
echo 'Something went wrong: ' . $e->getMessage() . "\n";
exit(0);
}
// dump($list->getItems()[0]->getMedia()->getCarouselMedia()); // dump($list->getItems()[0]->getMedia()->getCarouselMedia());
@ -573,7 +562,7 @@ class InstagramService
do { do {
// Request the page corresponding to maxId. // Request the page corresponding to maxId.
echo "\n current maxId: " . $maxId; echo "\n current maxId: " . $maxId;
$response = $ig->collection->getFeed("17906577283646940", $maxId);
$response = $this->ig->collection->getFeed("17906577283646940", $maxId);
// In this example we're simply printing the IDs of this page's items. // In this example we're simply printing the IDs of this page's items.
foreach ($response->getItems() as $item) { foreach ($response->getItems() as $item) {
$userFullName = str_replace("/", "", $item->getMedia()->getUser()->getFullName()); $userFullName = str_replace("/", "", $item->getMedia()->getUser()->getFullName());


+ 32
- 30
app/Services/XiurenjiService.php View File

@ -57,7 +57,8 @@ class XiurenjiService
$this->queryNew = new QueryList(); $this->queryNew = new QueryList();
} }
public function scrapeAll() {
public function scrapeAll()
{
foreach ($this->name_dir as $key => $value) { foreach ($this->name_dir as $key => $value) {
# code... # code...
dump("current site: " . $key); dump("current site: " . $key);
@ -148,11 +149,11 @@ class XiurenjiService
// 只在每个相册第一次输出名字 // 只在每个相册第一次输出名字
dump("user is " . $user); dump("user is " . $user);
} }
foreach ($images as $image) { foreach ($images as $image) {
usleep(random_int(10, 100) * 100); usleep(random_int(10, 100) * 100);
$imageUrl = $image->getAttribute("src"); $imageUrl = $image->getAttribute("src");
$trueImageUrl = "https://www.xiurenji.net" . $imageUrl;
$trueImageUrl = "https://www.xiurenb.net" . $imageUrl;
$fileInfo = pathinfo($trueImageUrl); $fileInfo = pathinfo($trueImageUrl);
if (file_exists($dir . DIRECTORY_SEPARATOR . $fileInfo["basename"])) { if (file_exists($dir . DIRECTORY_SEPARATOR . $fileInfo["basename"])) {
rename($dir . DIRECTORY_SEPARATOR . $fileInfo["basename"], $dir . DIRECTORY_SEPARATOR . $imageNo . "-" . $fileInfo["basename"]); rename($dir . DIRECTORY_SEPARATOR . $fileInfo["basename"], $dir . DIRECTORY_SEPARATOR . $imageNo . "-" . $fileInfo["basename"]);
@ -174,33 +175,33 @@ class XiurenjiService
do { do {
try { try {
$curl_handle = curl_init(); $curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, $trueImageUrl);
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 20000);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36');
curl_setopt($curl_handle, CURLOPT_REFERER, $this->xiurenRootUrl);
curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl_handle, CURLOPT_ENCODING, '');
curl_setopt($curl_handle, CURLOPT_MAXREDIRS, 10);
curl_setopt($curl_handle, CURLOPT_TIMEOUT, 0);
curl_setopt($curl_handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($curl_handle, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curl_handle, CURLOPT_HTTPHEADER, array(
'authority: www.xiurenji.net',
'pragma: no-cache',
'cache-control: no-cache',
'sec-ch-ua: "Google Chrome";v="95", "Chromium";v="95", ";Not A Brand";v="99"',
'sec-ch-ua-mobile: ?0',
'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36',
'sec-ch-ua-platform: "macOS"',
'accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8',
'sec-fetch-site: same-origin',
'sec-fetch-mode: no-cors',
'sec-fetch-dest: image',
'referer: https://www.xiurenji.net/XiuRen/9483.html',
'accept-language: zh-CN,zh;q=0.9',
'cookie: UM_distinctid=17cfa8bea8eb9e-0dd0c6d032d0fc-1c306851-13c680-17cfa8bea8fc85; CNZZDATA1278618868=1505121253-1636283360-%7C1636283360; __51cke__=; ASPSESSIONIDQAQAATSQ=LBLGNPMDHKKMNOPDBCEAPIMH; __tins__20641871=%7B%22sid%22%3A%201636291046220%2C%20%22vd%22%3A%202%2C%20%22expires%22%3A%201636292852634%7D; __51laig__=2'
curl_setopt_array($curl_handle, array(
CURLOPT_URL => $trueImageUrl,
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(
'Connection: keep-alive',
'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="98", "Google Chrome";v="98"',
'sec-ch-ua-mobile: ?0',
'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36',
'sec-ch-ua-platform: "macOS"',
'Accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8',
'Sec-Fetch-Site: same-origin',
'Sec-Fetch-Mode: no-cors',
'Sec-Fetch-Dest: image',
'Accept-Language: zh-CN,zh;q=0.9',
'Cookie: UM_distinctid=17e8fc4c12917-0742b5d542c2af-133a6253-13c680-17e8fc4c12a924; ASPSESSIONIDCWCCSCAC=EODDLCJCADBNDFDGCMALGMKO; CNZZDATA1278618868=1237248404-1643081659-%7C1646134190; ASPSESSIONIDCWCDTDAD=HAJGDPOCNBIKMMMNLCENPLAM'
),
)); ));
$content = curl_exec($curl_handle); $content = curl_exec($curl_handle);
if ($content === false) { if ($content === false) {
$le = new Exception("get image has error: " . curl_error($curl_handle)); $le = new Exception("get image has error: " . curl_error($curl_handle));
@ -209,7 +210,7 @@ class XiurenjiService
} }
curl_close($curl_handle); curl_close($curl_handle);
// $content = file_get_contents($trueImageUrl); // $content = file_get_contents($trueImageUrl);
} catch (ErrorException|Exception $e) {
} catch (ErrorException | Exception $e) {
echo $e->getTraceAsString() . "\n"; echo $e->getTraceAsString() . "\n";
$sleepTime = 10000 * random_int(100, 1000); $sleepTime = 10000 * random_int(100, 1000);
echo "wait for $trueImageUrl sleep {$sleepTime} nano second \n"; echo "wait for $trueImageUrl sleep {$sleepTime} nano second \n";
@ -220,6 +221,7 @@ class XiurenjiService
break; break;
} while ($attempts < 100); } while ($attempts < 100);
if ($content != "") { if ($content != "") {
dump("new file is " . $dir . DIRECTORY_SEPARATOR . $imageNo . "-" . $fileInfo["basename"]);
file_put_contents($dir . DIRECTORY_SEPARATOR . trim($user) . "-" . $imageNo . "-" . $fileInfo["basename"], $content); file_put_contents($dir . DIRECTORY_SEPARATOR . trim($user) . "-" . $imageNo . "-" . $fileInfo["basename"], $content);
} else { } else {
Log::error("image content is empty " . $trueImageUrl); Log::error("image content is empty " . $trueImageUrl);


+ 1
- 1
app/Utils/helper.php View File

@ -73,7 +73,7 @@ function iconv_gbk_to_uft8($string){
} }
$encode = mb_detect_encoding($string,array("ASCII","GBK","GB2312",'BIG5','UTF-8')); $encode = mb_detect_encoding($string,array("ASCII","GBK","GB2312",'BIG5','UTF-8'));
dump($encode);
// dump($encode);
return iconv($encode, "UTF-8",$string); return iconv($encode, "UTF-8",$string);


+ 2
- 0
fail.log View File

@ -2415,3 +2415,5 @@
/Users/shixuesen/OneDrive/Pictures/instagram/amandacerny/ https://scontent-lax3-1.cdninstagram.com/v/t50.2886-16/10000000_458426249278269_2831399203059854387_n.mp4?cb=9ad74b5e-c1c39920&efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5jbGlwcy5iYXNlbGluZSJ9&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=Ex7g5lOfRAEAX_8S2xn&edm=ABmJApABAAAA&vs=639577407291135_135919037&_nc_vs=HBksFQAYJEdJQ1dtQUE5Yzc2dDc2QUJBRFBzdE9PU0prc25icV9FQUFBRhUAAsgBABUAGCRHTmNkTnhBQlBMcFdiUW9CQUdIZnhIUnU4MXQwYnFfRUFBQUYVAgLIAQAoABgAGwAVAAAm3ry53ovKyj8VAigCQzMsF0BNHdLxqfvnGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHX%2BBwA%3D&_nc_rid=4bfbf6bc16&ccb=7-4&oe=61EF5C3A&oh=00_AT9EwLhWcU21qFR93E_OXz6-OqMPgCHplrGD5F_Exc6Z8Q&_nc_sid=6136e7 /Users/shixuesen/OneDrive/Pictures/instagram/amandacerny/ https://scontent-lax3-1.cdninstagram.com/v/t50.2886-16/10000000_458426249278269_2831399203059854387_n.mp4?cb=9ad74b5e-c1c39920&efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5jbGlwcy5iYXNlbGluZSJ9&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=Ex7g5lOfRAEAX_8S2xn&edm=ABmJApABAAAA&vs=639577407291135_135919037&_nc_vs=HBksFQAYJEdJQ1dtQUE5Yzc2dDc2QUJBRFBzdE9PU0prc25icV9FQUFBRhUAAsgBABUAGCRHTmNkTnhBQlBMcFdiUW9CQUdIZnhIUnU4MXQwYnFfRUFBQUYVAgLIAQAoABgAGwAVAAAm3ry53ovKyj8VAigCQzMsF0BNHdLxqfvnGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHX%2BBwA%3D&_nc_rid=4bfbf6bc16&ccb=7-4&oe=61EF5C3A&oh=00_AT9EwLhWcU21qFR93E_OXz6-OqMPgCHplrGD5F_Exc6Z8Q&_nc_sid=6136e7
/Users/shixuesen/OneDrive/Pictures/instagram/parlovetati/ https://scontent-lax3-2.cdninstagram.com/o1/v/t16/f1/m38/3C46336060C0E88EF14A62867DEF31A7_video_dashinit.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeS5iYXNlbGluZW9pbCJ9&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=106&vs=1373815423049090_3319206028&_nc_vs=HBksFQIYRGlnX3hwdl9lcGhlbWVyYWwvM0M0NjMzNjA2MEMwRTg4RUYxNEE2Mjg2N0RFRjMxQTdfdmlkZW9fZGFzaGluaXQubXA0FQACyAEAFQAYJEdQVktQUkFYc1FZRG9lc0FBTEs4UDNaYmcxTlZicGt3QUFBRhUCAsgBACgAGAAbAYgHdXNlX29pbAExFQAAJt6%2B16WA0%2Bo%2FFQIoAkMzLBdABzMzMzMzMxgVZGFzaF9iYXNlbGluZW9pbF8xX3YxEQB16AcA&_nc_rid=d8368805af&cb=9ad74b5e-c1c39920&ccb=9-4&oe=61F1818A&oh=00_AT-vnjS9ihqsdV079FI6YMHhqJ_eosGkWn3E222yC0ijrg&_nc_sid=bab638 /Users/shixuesen/OneDrive/Pictures/instagram/parlovetati/ https://scontent-lax3-2.cdninstagram.com/o1/v/t16/f1/m38/3C46336060C0E88EF14A62867DEF31A7_video_dashinit.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5zdG9yeS5iYXNlbGluZW9pbCJ9&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=106&vs=1373815423049090_3319206028&_nc_vs=HBksFQIYRGlnX3hwdl9lcGhlbWVyYWwvM0M0NjMzNjA2MEMwRTg4RUYxNEE2Mjg2N0RFRjMxQTdfdmlkZW9fZGFzaGluaXQubXA0FQACyAEAFQAYJEdQVktQUkFYc1FZRG9lc0FBTEs4UDNaYmcxTlZicGt3QUFBRhUCAsgBACgAGAAbAYgHdXNlX29pbAExFQAAJt6%2B16WA0%2Bo%2FFQIoAkMzLBdABzMzMzMzMxgVZGFzaF9iYXNlbGluZW9pbF8xX3YxEQB16AcA&_nc_rid=d8368805af&cb=9ad74b5e-c1c39920&ccb=9-4&oe=61F1818A&oh=00_AT-vnjS9ihqsdV079FI6YMHhqJ_eosGkWn3E222yC0ijrg&_nc_sid=bab638
/Users/shixuesen/OneDrive/Pictures/instagram/Likes/ https://scontent-lax3-1.cdninstagram.com/v/t51.2885-15/e35/274209204_124732130092305_602221022598421405_n.jpg?_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=X96gve0P_9MAX_S7q4S&edm=AJ9x6zYBAAAA&ccb=7-4&ig_cache_key=Mjc3NTExNDIxNTkwMjUxNTAxOQ%3D%3D.2-ccb7-4&oh=00_AT9YuSvddWiOn7hDtogr1XboXsovLzCcnc3zKMNRWe0iBA&oe=6214C58B&_nc_sid=cff2a4 /Users/shixuesen/OneDrive/Pictures/instagram/Likes/ https://scontent-lax3-1.cdninstagram.com/v/t51.2885-15/e35/274209204_124732130092305_602221022598421405_n.jpg?_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=X96gve0P_9MAX_S7q4S&edm=AJ9x6zYBAAAA&ccb=7-4&ig_cache_key=Mjc3NTExNDIxNTkwMjUxNTAxOQ%3D%3D.2-ccb7-4&oh=00_AT9YuSvddWiOn7hDtogr1XboXsovLzCcnc3zKMNRWe0iBA&oe=6214C58B&_nc_sid=cff2a4
/Users/shixuesen/OneDrive/Pictures/instagram/changchinlan/ https://scontent-lax3-1.cdninstagram.com/v/t51.2885-15/274371256_680260739988232_2321569079111921644_n.jpg?se=7&stp=dst-jpg_e35&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=104&_nc_ohc=_PjwBQFaGZMAX8v8LCr&edm=ABmJApABAAAA&ccb=7-4&ig_cache_key=Mjc3ODM2NTc3NjI4NjE4NzgyMQ%3D%3D.2-ccb7-4&oh=00_AT97jlslFM53N0sU6JFwZSE8BpLhIwI83C2GuXZehH5UvA&oe=621B962E&_nc_sid=6136e7
/Users/shixuesen/OneDrive/Pictures/instagram/mc807lsy/ https://scontent-lax3-2.cdninstagram.com/v/t51.2885-15/274546415_684872735978691_8121187069885020946_n.jpg?se=7&stp=dst-jpg_e35&_nc_ht=scontent-lax3-2.cdninstagram.com&_nc_cat=103&_nc_ohc=b4RgmVwx1NYAX_34I3f&edm=ABmJApABAAAA&ccb=7-4&ig_cache_key=Mjc4MDk4NjY5NzU5MTM0NDQ1NA%3D%3D.2-ccb7-4&oh=00_AT9ihWAyAWNdoChnpC5dq3v96eV0BGXV2rmXgNqh8CHPcw&oe=622410F8&_nc_sid=6136e7

Loading…
Cancel
Save