diff --git a/service/app/server/Douyin.php b/service/app/server/Douyin.php index a0ad85cd..3b493caf 100644 --- a/service/app/server/Douyin.php +++ b/service/app/server/Douyin.php @@ -18,6 +18,7 @@ class Douyin private $token = ''; private $gate = 'https://life.douyin.com'; public $totalPage = 10; + private $keywords = ['泰国', '西藏']; public function __construct() { @@ -200,7 +201,21 @@ class Douyin } //if(mb_strrpos($item->product_name, "S") === false) continue; G 达人 S 自己 - if (!(mb_strrpos($item->product_name, "S") || mb_strrpos($item->product_name, "G") || mb_strrpos($item->product_name, "甄"))) continue; + // if (!(mb_strrpos($item->product_name, "S") || mb_strrpos($item->product_name, "G") || mb_strrpos($item->product_name, "甄"))) continue; + + $kw_match = false; + + foreach ($this->keywords as $kw) { + if (mb_strpos($item->product_name, $kw) !== false) { + $kw_match = true; + break; + } + } + + if (!$kw_match) { + printf("skip order: %s %s\n", $item->sn, $item->product_name); + continue; + } $_list[] = $item; }