From f34e09e93bc2d1a5f119497abdc0202d11cb32f5 Mon Sep 17 00:00:00 2001 From: Dag Date: Thu, 24 Mar 2022 01:50:07 +0100 Subject: [PATCH] [GithubGist] fix: broken css selector for title --- bridges/GitHubGistBridge.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bridges/GitHubGistBridge.php b/bridges/GitHubGistBridge.php index 663d2852..a2339956 100644 --- a/bridges/GitHubGistBridge.php +++ b/bridges/GitHubGistBridge.php @@ -71,8 +71,7 @@ class GitHubGistBridge extends BridgeAbstract { $uri = $comment->find('a[href*=#gistcomment]', 0) or returnServerError('Could not find comment anchor!'); - $title = $comment->find('div[class~="unminimized-comment"] h3[class~="timeline-comment-header-text"]', 0) - or returnServerError('Could not find comment header text!'); + $title = $comment->find('h3', 0); $datetime = $comment->find('[datetime]', 0) or returnServerError('Could not find comment datetime!'); @@ -86,7 +85,7 @@ class GitHubGistBridge extends BridgeAbstract { $item = array(); $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['author'] = '' . $author->plaintext . ''; $item['content'] = $this->fixContent($message);