美团抖音订单抓取修改

This commit is contained in:
karl 2024-07-28 16:50:38 +08:00
parent ed1e344f9c
commit 8551544314
4 changed files with 19 additions and 15 deletions

View File

@ -123,7 +123,7 @@ class SpiderDy extends Command
protected function execute(InputInterface $input, OutputInterface $output): int
{
// $name = $input->getArgument('name');
$output->writeln('START spider:dy');
$output->writeln('START spider:dy:'.date('Y-m-d H:i:s'));
$os = $input->getOption('os');
$orderid = $input->getOption('sn');
@ -157,20 +157,24 @@ class SpiderDy extends Command
// return 1;
// sleep(5);
$time = strtotime(date('Y-m-d'));
for ($i = 0; $i <= $d; $i++) {
$day = $time - $i * 24 * 3600;
$start = date('Y-m-d', $day);
$end = date('Y-m-d 23:59:59', $day);
$this->orders($start, $end, false);
// $this->_kuaishouOrder($start, $end, false);
}
// $time = strtotime(date('Y-m-d'));
// for ($i = 0; $i <= $d; $i++) {
// $day = $time - $i * 24 * 3600;
// $start = date('Y-m-d', $day);
// $end = date('Y-m-d 23:59:59', $day);
// $this->orders($start, $end, false);
// // $this->_kuaishouOrder($start, $end, false);
// }
$start = date('Y-m-d 00:00:00', strtotime("-{$d} days"));
$end = date('Y-m-d 23:59:59');
$this->orders($start, $end, false);
if (date('H') >= 1 && date('H') <= 7) {
$this->reload($output);
}
$output->writeln('END spider:dy');
$output->writeln('END spider:dy:'.date('Y-m-d H:i:s'));
return self::SUCCESS;
}
@ -295,7 +299,7 @@ class SpiderDy extends Command
{
foreach (Orders::OSS as $k => $os) {
$pages = 10;
$pages = 6;
$page = 1;
while (true) {

View File

@ -326,7 +326,7 @@ class SpiderMt extends Command
{
foreach (Orders::OSS as $k => $os) {
$pages = 20;
$pages = 6;
$page = 1;
while (true) {

View File

@ -17,8 +17,8 @@ class Douyin
private $id = '';
private $token = '';
private $gate = 'https://life.douyin.com';
public $totalPage = 10;
private $keywords = ['泰国', '普吉岛', '西藏'];
public $totalPage = 6;
private $keywords = ['泰国', '普吉岛', '西藏', 'S', 'G', 's', 'g'];
public function __construct()
{

View File

@ -9,7 +9,7 @@ class Meituan {
private $cookie = '';
private $gate = 'https://lvyou.meituan.com';
public $totalPage = 10;
public $totalPage = 6;
public function __construct()
{