- 优化抖音视频去水印服务

v6
Chaim 4 years ago
parent 2cc325c29e
commit 7a41a29829

@ -54,7 +54,7 @@ class WatermarkService extends Service
} }
$content = $this->getContents($this->url); $content = $this->getContents($this->url);
$this->itemId = $this->getItemId($content); $this->itemId = $this->getItemId($content);
$this->dytk = $this->getDytk($content); $this->dytk = $this->getDyTk($content);
return $this; return $this;
} }
@ -227,13 +227,9 @@ class WatermarkService extends Service
*/ */
private function judgeUrl($url) private function judgeUrl($url)
{ {
if (strpos($url, 'douyin.com') !== false) { if (strpos($url, 'douyin.com') !== false) return $url;
return $url; else if (strpos($url, 'iesdouyin.com') !== false) return $url;
} else if (strpos($url, 'iesdouyin.com') !== false) { else return '';
return $url;
} else {
return '';
}
} }
/** /**
@ -253,7 +249,7 @@ class WatermarkService extends Service
* @param $content * @param $content
* @return mixed * @return mixed
*/ */
private function getDytk($content) private function getDyTk($content)
{ {
preg_match("~dytk(.*?)}~", $content, $matches); preg_match("~dytk(.*?)}~", $content, $matches);
$Dytk = $matches[1]; $Dytk = $matches[1];

Loading…
Cancel
Save