[TheYeteeBridge] Fix HTML parsing (#1986)
This commit is contained in:
parent
ce34e7eb89
commit
8f086169cc
1 changed files with 6 additions and 7 deletions
|
@ -12,7 +12,7 @@ class TheYeteeBridge extends BridgeAbstract {
|
||||||
$html = getSimpleHTMLDOM(self::URI)
|
$html = getSimpleHTMLDOM(self::URI)
|
||||||
or returnServerError('Could not request The Yetee.');
|
or returnServerError('Could not request The Yetee.');
|
||||||
|
|
||||||
$div = $html->find('.hero-col');
|
$div = $html->find('.module_timed-item.is--full');
|
||||||
foreach($div as $element) {
|
foreach($div as $element) {
|
||||||
|
|
||||||
$item = array();
|
$item = array();
|
||||||
|
@ -21,16 +21,15 @@ class TheYeteeBridge extends BridgeAbstract {
|
||||||
$title = $element->find('h2', 0)->plaintext;
|
$title = $element->find('h2', 0)->plaintext;
|
||||||
$item['title'] = $title;
|
$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;
|
$item['author'] = $author;
|
||||||
|
|
||||||
$uri = $element->find('div[class=controls] a', 0)->href;
|
$item['uri'] = static::URI;
|
||||||
$item['uri'] = static::URI . $uri;
|
|
||||||
|
|
||||||
$content = '<p>' . $element->find('section[class=product-listing-info] p', -1)->plaintext . '</p>';
|
$content = '<p>' . $title . ' by ' . $author . '</p>';
|
||||||
$photos = $element->find('a[class=js-modaal-gallery] img');
|
$photos = $element->find('a.img');
|
||||||
foreach($photos as $photo) {
|
foreach($photos as $photo) {
|
||||||
$content = $content . "<br /><img src='$photo->src' />";
|
$content = $content . "<br /><img src='$photo->href' />";
|
||||||
$item['enclosures'][] = $photo->src;
|
$item['enclosures'][] = $photo->src;
|
||||||
}
|
}
|
||||||
$item['content'] = $content;
|
$item['content'] = $content;
|
||||||
|
|
Loading…
Reference in a new issue