Skip to content

Commit

Permalink
Update AnisearchBridge.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Tone866 authored Mar 23, 2024
1 parent 5d1206d commit bc7e7e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bridges/AnisearchBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ public function collectData()
$limit = 10;
$dom = getSimpleHTMLDOM($this->getInput('category'));
foreach ($dom->find('li.btype0') as $key => $li) {
if ($key >= $limit)
if ($key >= $limit) {
break;
}

$a = $li->find('a', 0);
$title = $a->find('span.title', 0);
Expand All @@ -50,7 +51,7 @@ public function collectData()
//get trailer
$trailerlink = $domarticle->find('section#trailers > div > div.swiper > ul.swiper-wrapper > li.swiper-slide > a', 0);
$ytlink = '';
if(isset($trailerlink)) {
if (isset($trailerlink)) {
$trailersite = getSimpleHTMLDOM($baseurl . $trailerlink->href);
$trailer = $trailersite->find('div#player > iframe', 0);
$ytlink = '<br /><iframe width="560" height="315" src="' . $trailer->{'data-xsrc'} . '" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>';
Expand Down

0 comments on commit bc7e7e3

Please sign in to comment.