mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-16 21:58:21 +01:00
KoFiBridge fix the "Call to a member function find() on null" line 39 (#3807)
This commit is contained in:
parent
b037d1b4d1
commit
609eed1791
@ -27,12 +27,15 @@ class KoFiBridge extends BridgeAbstract
|
|||||||
if (isset($titleWrapper[0])) {
|
if (isset($titleWrapper[0])) {
|
||||||
$item = [];
|
$item = [];
|
||||||
$item['title'] = $element->find('div.content-link-text div')[0]->plaintext;
|
$item['title'] = $element->find('div.content-link-text div')[0]->plaintext;
|
||||||
// $item['timestamp'] = strtotime($element->find('div.feeditem-time', 0)->plaintext);
|
$uri = $element->find('div.content-link-text div')[2]->find('a')[0]->onclick;
|
||||||
$item['uri'] = self::URI . $element->find('div.fi-post-item-large a')[0]->href;
|
$uri = trim(str_replace('window.location =', '', $uri));
|
||||||
|
$uri = trim(str_replace(''', '', $uri));
|
||||||
|
$uri = trim(str_replace(';', '', $uri));
|
||||||
|
$item['uri'] = self::URI . $uri;
|
||||||
|
|
||||||
if (isset($element->find('div.fi-post-item-large div.content-link-post img')[0])) {
|
if (isset($element->find('div.fi-post-item-large div.content-link-post img')[0])) {
|
||||||
$item['enclosures'][] = $element->find('div.fi-post-item-large div.content-link-post img')[0]->src;
|
$item['enclosures'][] = $element->find('div.fi-post-item-large div.content-link-post img')[0]->src;
|
||||||
}
|
}
|
||||||
// $item['content'] = $element->find('div.content-link-text div#content-link', 0)->plaintext;
|
|
||||||
|
|
||||||
$html = getSimpleHTMLDOM($item['uri']);
|
$html = getSimpleHTMLDOM($item['uri']);
|
||||||
$feedItemTime = $html->find('div.feeditem-time', 0);
|
$feedItemTime = $html->find('div.feeditem-time', 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user