Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
falstack committed Dec 26, 2019
1 parent b57eeea commit 5926b0f
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions app/Services/Spider/BangumiSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function importBangumi($source)
}

$QShell = new Qshell();
$alias = implode('|', $source['alias']);
$alias = implode('|', array_unique($source['alias']));
$bangumi = Bangumi
::create([
'title' => $source['name'],
Expand Down Expand Up @@ -209,28 +209,6 @@ public function moveBangumiIdol($slug, $sourceId)
return;
}

protected function getHottestBangumi($page)
{
$query = new Query();
$list = $query->getBangumiList($page);

if (empty($list))
{
Redis::SADD('load-bangumi-failed-page', $page);
}

foreach ($list as $item)
{
if (!$item)
{
Redis::SADD('load-bangumi-failed-ids', $id);
continue;
}

$this->importBangumi($item);
}
}

public function importIdol($source, $bangumiSlug)
{
if (!$source['name'])
Expand All @@ -248,7 +226,7 @@ public function importIdol($source, $bangumiSlug)
}

$QShell = new Qshell();
$alias = implode('|', $source['alias']);
$alias = implode('|', array_unique($source['alias']));
$idol = Idol
::create([
'title' => $source['name'],
Expand All @@ -275,6 +253,28 @@ public function importIdol($source, $bangumiSlug)
return $slug;
}

protected function getHottestBangumi($page)
{
$query = new Query();
$list = $query->getBangumiList($page);

if (empty($list))
{
Redis::SADD('load-bangumi-failed-page', $page);
}

foreach ($list as $item)
{
if (!$item)
{
Redis::SADD('load-bangumi-failed-ids', $id);
continue;
}

$this->importBangumi($item);
}
}

protected function loadIdolItem($id, $bangumiSlug)
{
if (!$id)
Expand Down

0 comments on commit 5926b0f

Please sign in to comment.