Skip to content

Commit

Permalink
[GoogleScholarBridge] Minor patch (#3814)
Browse files Browse the repository at this point in the history
* Do not add RSS entry if Check for updates is found in the article title - avoids repeat entries
  • Loading branch information
NicholasMcCarthy authored Dec 1, 2023
1 parent 44ff2f2 commit 206edae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bridges/GoogleScholarBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -193,6 +193,11 @@ public function collectData()
$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 : '';

Expand Down

0 comments on commit 206edae

Please sign in to comment.