[GoogleScholarBridge] Minor patch (#3814)

* Do not add RSS entry if Check for updates is found in the article title - avoids repeat entries
This commit is contained in:
Nick McCarthy 2023-12-01 21:36:26 +00:00 committed by GitHub
parent 44ff2f2cf8
commit 206edaedf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -2,7 +2,7 @@
class GoogleScholarBridge extends BridgeAbstract
{
const NAME = 'Google Scholar v2';
const NAME = 'Google Scholar';
const URI = 'https://scholar.google.com/';
const DESCRIPTION = 'Search for publications or follow authors on Google Scholar.';
const MAINTAINER = 'nicholasmccarthy';
@ -193,6 +193,11 @@ class GoogleScholarBridge extends BridgeAbstract
$articleUrl = $articleTitleElement->find('a', 0)->href;
$articleTitle = $articleTitleElement->plaintext;
// Break the loop if 'Check for Updates' is found in the article title
if (strpos($articleTitle, 'Check for updates') !== false) {
break;
}
$articleDateElement = $publication->find('div[class="gs_a"]', 0);
$articleDate = $articleDateElement ? $articleDateElement->plaintext : '';