mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-25 19:06:23 +03:00
955eecc299
instead of simple_html_dom function file_get_html Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
38 lines
1.6 KiB
PHP
38 lines
1.6 KiB
PHP
<?php
|
|
class HentaiHavenBridge extends BridgeAbstract{
|
|
|
|
public function loadMetadatas() {
|
|
|
|
$this->maintainer = "albirew";
|
|
$this->name = "Hentai Haven";
|
|
$this->uri = "http://hentaihaven.org/";
|
|
$this->description = "Returns releases from Hentai Haven";
|
|
$this->update = "2015-01-16";
|
|
|
|
}
|
|
|
|
public function collectData(array $param){
|
|
$html = $this->file_get_html('http://hentaihaven.org/') or $this->returnError('Could not request Hentai Haven.', 404);
|
|
foreach($html->find('div.zoe-grid') as $element) {
|
|
$item = new \Item();
|
|
$item->uri = $this->getURI().$element->find('div.brick-content h3 a', 0)->href;
|
|
$item->thumbnailUri = $element->find('a.thumbnail-image img', 0)->getAttribute('data-src');
|
|
$item->title = mb_convert_encoding(trim($element->find('div.brick-content h3 a', 0)->innertext), 'UTF-8', 'HTML-ENTITIES');
|
|
$item->tags = $element->find('div.oFlyout_bg div.oFlyout div.flyoutContent span.tags', 0)->plaintext;
|
|
$item->content = 'Tags: ' . $item->tags.'<br><br><a href="' . $item->uri . '"><img width="300" height="169" src="' . $item->thumbnailUri . '" /></a><br>' . $element->find('div.oFlyout_bg div.oFlyout div.flyoutContent p.description', 0)->innertext;
|
|
$this->items[] = $item;
|
|
}
|
|
}
|
|
public function getName(){
|
|
return 'Hentai Haven';
|
|
}
|
|
public function getURI(){
|
|
return '';
|
|
}
|
|
public function getDescription(){
|
|
return "Hentai Haven | Everything Else is Irrelevant";
|
|
}
|
|
public function getCacheDuration(){
|
|
return 21600; // 6 hours
|
|
}
|
|
}
|