[YeggiBridge] Add model source and tags (#2566)

This commit is contained in:
Yaman Qalieh 2022-03-29 18:57:25 -04:00 committed by GitHub
parent 0d80f2d5c3
commit d27c1a99c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -63,13 +63,19 @@ class YeggiBridge extends BridgeAbstract {
}
$item['uri'] = self::URI . $result->find('a', 0)->href;
$item['author'] = 'Yeggi';
$item['content'] = '';
$text = $result->find('i');
$item['content'] = $text[0]->plaintext . ' on ' . $text[1]->plaintext;
$item['uid'] = hash('md5', $item['title']);
foreach($result->find('.item_3_B_2 > a[href^=/q/]') as $tag) {
$item['tags'][] = $tag->plaintext;
}
$image = $result->find('img', 0)->src;
if($this->getInput('showimage')) {
$item['content'] .= '<img src="' . $image . '">';
$item['content'] .= '<br><img src="' . $image . '">';
}
$item['enclosures'] = array($image);