From 8f086169cca3472d99fb58e1a67c4c42dc0ab0ee Mon Sep 17 00:00:00 2001 From: Shikiryu Date: Sun, 21 Feb 2021 11:19:20 +0100 Subject: [PATCH] [TheYeteeBridge] Fix HTML parsing (#1986) --- bridges/TheYeteeBridge.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bridges/TheYeteeBridge.php b/bridges/TheYeteeBridge.php index fa5a6455..fb3c969e 100644 --- a/bridges/TheYeteeBridge.php +++ b/bridges/TheYeteeBridge.php @@ -12,7 +12,7 @@ class TheYeteeBridge extends BridgeAbstract { $html = getSimpleHTMLDOM(self::URI) or returnServerError('Could not request The Yetee.'); - $div = $html->find('.hero-col'); + $div = $html->find('.module_timed-item.is--full'); foreach($div as $element) { $item = array(); @@ -21,16 +21,15 @@ class TheYeteeBridge extends BridgeAbstract { $title = $element->find('h2', 0)->plaintext; $item['title'] = $title; - $author = trim($element->find('div[class=credit]', 0)->plaintext); + $author = trim($element->find('.module_timed-item--artist a', 0)->plaintext); $item['author'] = $author; - $uri = $element->find('div[class=controls] a', 0)->href; - $item['uri'] = static::URI . $uri; + $item['uri'] = static::URI; - $content = '

' . $element->find('section[class=product-listing-info] p', -1)->plaintext . '

'; - $photos = $element->find('a[class=js-modaal-gallery] img'); + $content = '

' . $title . ' by ' . $author . '

'; + $photos = $element->find('a.img'); foreach($photos as $photo) { - $content = $content . "
"; + $content = $content . "
"; $item['enclosures'][] = $photo->src; } $item['content'] = $content;