From 7a41a298292343a13e3017cbe90ee2b7adee1750 Mon Sep 17 00:00:00 2001 From: Chaim Date: Wed, 29 Apr 2020 14:50:53 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BC=98=E5=8C=96=E6=8A=96=E9=9F=B3?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=8E=BB=E6=B0=B4=E5=8D=B0=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/douyin/WatermarkService.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/service/douyin/WatermarkService.php b/src/service/douyin/WatermarkService.php index c6f5e9b..ce1feaf 100644 --- a/src/service/douyin/WatermarkService.php +++ b/src/service/douyin/WatermarkService.php @@ -54,7 +54,7 @@ class WatermarkService extends Service } $content = $this->getContents($this->url); $this->itemId = $this->getItemId($content); - $this->dytk = $this->getDytk($content); + $this->dytk = $this->getDyTk($content); return $this; } @@ -227,13 +227,9 @@ class WatermarkService extends Service */ private function judgeUrl($url) { - if (strpos($url, 'douyin.com') !== false) { - return $url; - } else if (strpos($url, 'iesdouyin.com') !== false) { - return $url; - } else { - return ''; - } + if (strpos($url, 'douyin.com') !== false) return $url; + else if (strpos($url, 'iesdouyin.com') !== false) return $url; + else return ''; } /** @@ -253,7 +249,7 @@ class WatermarkService extends Service * @param $content * @return mixed */ - private function getDytk($content) + private function getDyTk($content) { preg_match("~dytk(.*?)}~", $content, $matches); $Dytk = $matches[1];