mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-12-18 08:54:20 +03:00
[MangaReaderBridge] Change feed title to manga name (#4092)
This commit is contained in:
parent
d11b7f7754
commit
1c3024fca7
1 changed files with 15 additions and 0 deletions
|
@ -26,11 +26,26 @@ class MangaReaderBridge extends BridgeAbstract
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected $feedName = '';
|
||||||
|
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
if (empty($this->feedName)) {
|
||||||
|
return parent::getName();
|
||||||
|
} else {
|
||||||
|
return $this->feedName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function collectData()
|
public function collectData()
|
||||||
{
|
{
|
||||||
$url = $this->getInput('url');
|
$url = $this->getInput('url');
|
||||||
$lang = $this->getInput('lang');
|
$lang = $this->getInput('lang');
|
||||||
$dom = getSimpleHTMLDOM($url);
|
$dom = getSimpleHTMLDOM($url);
|
||||||
|
$aniDetail = $dom->getElementById('ani_detail');
|
||||||
|
$this->feedName = html_entity_decode($aniDetail->find('h2', 0)->plaintext);
|
||||||
|
|
||||||
$chapters = $dom->getElementById($lang . '-chapters');
|
$chapters = $dom->getElementById($lang . '-chapters');
|
||||||
|
|
||||||
foreach ($chapters->getElementsByTagName('li') as $chapter) {
|
foreach ($chapters->getElementsByTagName('li') as $chapter) {
|
||||||
|
|
Loading…
Reference in a new issue