美团抖音订单抓取修改
This commit is contained in:
parent
ed1e344f9c
commit
8551544314
|
@ -123,7 +123,7 @@ class SpiderDy extends Command
|
||||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||||
{
|
{
|
||||||
// $name = $input->getArgument('name');
|
// $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');
|
$os = $input->getOption('os');
|
||||||
$orderid = $input->getOption('sn');
|
$orderid = $input->getOption('sn');
|
||||||
|
@ -157,20 +157,24 @@ class SpiderDy extends Command
|
||||||
// return 1;
|
// return 1;
|
||||||
|
|
||||||
// sleep(5);
|
// sleep(5);
|
||||||
$time = strtotime(date('Y-m-d'));
|
// $time = strtotime(date('Y-m-d'));
|
||||||
for ($i = 0; $i <= $d; $i++) {
|
// for ($i = 0; $i <= $d; $i++) {
|
||||||
$day = $time - $i * 24 * 3600;
|
// $day = $time - $i * 24 * 3600;
|
||||||
$start = date('Y-m-d', $day);
|
// $start = date('Y-m-d', $day);
|
||||||
$end = date('Y-m-d 23:59:59', $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);
|
$this->orders($start, $end, false);
|
||||||
// $this->_kuaishouOrder($start, $end, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (date('H') >= 1 && date('H') <= 7) {
|
if (date('H') >= 1 && date('H') <= 7) {
|
||||||
$this->reload($output);
|
$this->reload($output);
|
||||||
}
|
}
|
||||||
|
|
||||||
$output->writeln('END spider:dy');
|
$output->writeln('END spider:dy:'.date('Y-m-d H:i:s'));
|
||||||
return self::SUCCESS;
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,7 +299,7 @@ class SpiderDy extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach (Orders::OSS as $k => $os) {
|
foreach (Orders::OSS as $k => $os) {
|
||||||
$pages = 10;
|
$pages = 6;
|
||||||
$page = 1;
|
$page = 1;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
|
@ -326,7 +326,7 @@ class SpiderMt extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach (Orders::OSS as $k => $os) {
|
foreach (Orders::OSS as $k => $os) {
|
||||||
$pages = 20;
|
$pages = 6;
|
||||||
$page = 1;
|
$page = 1;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
|
@ -17,8 +17,8 @@ class Douyin
|
||||||
private $id = '';
|
private $id = '';
|
||||||
private $token = '';
|
private $token = '';
|
||||||
private $gate = 'https://life.douyin.com';
|
private $gate = 'https://life.douyin.com';
|
||||||
public $totalPage = 10;
|
public $totalPage = 6;
|
||||||
private $keywords = ['泰国', '普吉岛', '西藏'];
|
private $keywords = ['泰国', '普吉岛', '西藏', 'S', 'G', 's', 'g'];
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,7 @@ class Meituan {
|
||||||
|
|
||||||
private $cookie = '';
|
private $cookie = '';
|
||||||
private $gate = 'https://lvyou.meituan.com';
|
private $gate = 'https://lvyou.meituan.com';
|
||||||
public $totalPage = 10;
|
public $totalPage = 6;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue