mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-08 15:44:53 +02:00
[GithubGist] fix: broken css selector for title
This commit is contained in:
parent
384790537b
commit
f34e09e93b
@ -71,8 +71,7 @@ class GitHubGistBridge extends BridgeAbstract {
|
|||||||
$uri = $comment->find('a[href*=#gistcomment]', 0)
|
$uri = $comment->find('a[href*=#gistcomment]', 0)
|
||||||
or returnServerError('Could not find comment anchor!');
|
or returnServerError('Could not find comment anchor!');
|
||||||
|
|
||||||
$title = $comment->find('div[class~="unminimized-comment"] h3[class~="timeline-comment-header-text"]', 0)
|
$title = $comment->find('h3', 0);
|
||||||
or returnServerError('Could not find comment header text!');
|
|
||||||
|
|
||||||
$datetime = $comment->find('[datetime]', 0)
|
$datetime = $comment->find('[datetime]', 0)
|
||||||
or returnServerError('Could not find comment datetime!');
|
or returnServerError('Could not find comment datetime!');
|
||||||
@ -86,7 +85,7 @@ class GitHubGistBridge extends BridgeAbstract {
|
|||||||
$item = array();
|
$item = array();
|
||||||
|
|
||||||
$item['uri'] = $uri->href;
|
$item['uri'] = $uri->href;
|
||||||
$item['title'] = str_replace('commented', 'commented on', $title->plaintext);
|
$item['title'] = str_replace('commented', 'commented on', $title->plaintext ?? '');
|
||||||
$item['timestamp'] = strtotime($datetime->datetime);
|
$item['timestamp'] = strtotime($datetime->datetime);
|
||||||
$item['author'] = '<a href="' . $author->href . '">' . $author->plaintext . '</a>';
|
$item['author'] = '<a href="' . $author->href . '">' . $author->plaintext . '</a>';
|
||||||
$item['content'] = $this->fixContent($message);
|
$item['content'] = $this->fixContent($message);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user