Skip to content

Commit

Permalink
Update crawler html selector for series page
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir Reza Mehrbakhsh committed Jan 17, 2020
1 parent 8e558fc commit 5f64053
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions App/Html/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ public static function getSeriesArray($html)
{
$parser = new Crawler($html);

$seriesNodes = $parser->filter(".series-card");
$seriesNodes = $parser->filter(".card");

$series = $seriesNodes->each(function(Crawler $crawler) {
$slug = str_replace('/series/', '', $crawler->filter('a.tw-block')->attr('href'));
$episode_count = (int) $crawler->filter('.card-bottom .card-stats div div.tw-text-xs.tw-font-semibold')->text();
$slug = str_replace('/series/', '', $crawler->filter('.expanded-card-heading a')->attr('href'));
$episode_count = (int) $crawler->filter('.expanded-card-meta-lessons a')->text();

return [
'slug' => $slug,
Expand Down

0 comments on commit 5f64053

Please sign in to comment.