mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[BandcampBridge] Fix title extraction on empty band pages (#1966)
This commit is contained in:
parent
07e1e8497c
commit
75b85f61e7
@ -125,9 +125,11 @@ class BandcampBridge extends BridgeAbstract {
|
|||||||
case 'By album':
|
case 'By album':
|
||||||
$html = getSimpleHTMLDOMCached($this->getURI(), 86400);
|
$html = getSimpleHTMLDOMCached($this->getURI(), 86400);
|
||||||
|
|
||||||
$titleElement = $html->find('head meta[name=title]', 0)
|
if ($html->find('meta[name=title]', 0)) {
|
||||||
or returnServerError('Unable to find title on: ' . $this->getURI());
|
$this->feedName = $html->find('meta[name=title]', 0)->content;
|
||||||
$this->feedName = $titleElement->content;
|
} else {
|
||||||
|
$this->feedName = str_replace('Music | ', '', $html->find('title', 0)->plaintext);
|
||||||
|
}
|
||||||
|
|
||||||
$regex = '/band_id=(\d+)/';
|
$regex = '/band_id=(\d+)/';
|
||||||
if(preg_match($regex, $html, $matches) == false)
|
if(preg_match($regex, $html, $matches) == false)
|
||||||
|
Loading…
Reference in New Issue
Block a user