justinribeiro / zotero-google-scholar-citation-count

Zotero plugin for fetching number of citations from Google Scholar.
Mozilla Public License 2.0
203 stars 2 forks source link

zotero 7 wrong citation count #22

Closed yjavaherian closed 2 months ago

yjavaherian commented 6 months ago

hi. i just built the zotero 7 version myself. it works, but for some reason the reported citation count does not match that of google scholar ( for some papers)!

e.g. Emergent Communication of Generalizations (google scholar citation count: 32, plugin: 55) Making sense of raw input (google scholar citation citation: 34, plugin: 314)

but for others it reports correctly e.g. GFlowNet Foundations (google scholar and plugin: 121)

yjavaherian commented 6 months ago

it looks like the problem is in the output of the google scholar for targetUrl. for example for "making sense of raw input 2021 " the targeturl is : https://scholar.google.com/scholar?hl=en&q=Making%20sense%20of%20raw%20input&as_epq=&as_occt=title&num=1&as_sauthors=Evans+Bo%C5%A1njak+Buesing&as_ylo=2019&as_yhi=2023

and when you open this url the actual paper is not present in this result! strangely changing the year filter to as_ylo=2021&as_yhi=2021 fixes this!!

i think the problem is on the side of google scholar since 2021 is between 2019 and 2023 but the the actual paper is missing from the output of 2019...2023 filter. very strange 😕

i suppose changing this line

    if (year) {
      paramDateRange = `&as_ylo=${year - 2}&as_yhi=${year + 2}`;
    }

to

    if (year) {
      paramDateRange = `&as_ylo=${year}&as_yhi=${year}`;
    }

should fix the problem.

Aman-4-Real commented 4 months ago

I also noticed some count errors in this case. Looking forward to the revised release!

Aman-4-Real commented 4 months ago

it looks like the problem is in the output of the google scholar for targetUrl. for example for "making sense of raw input 2021 " the targeturl is : https://scholar.google.com/scholar?hl=en&q=Making%20sense%20of%20raw%20input&as_epq=&as_occt=title&num=1&as_sauthors=Evans+Bo%C5%A1njak+Buesing&as_ylo=2019&as_yhi=2023

and when you open this url the actual paper is not present in this result! strangely changing the year filter to as_ylo=2021&as_yhi=2021 fixes this!!

i think the problem is on the side of google scholar since 2021 is between 2019 and 2023 but the the actual paper is missing from the output of 2019...2023 filter. very strange 😕

i suppose changing this line

    if (year) {
      paramDateRange = `&as_ylo=${year - 2}&as_yhi=${year + 2}`;
    }

to

    if (year) {
      paramDateRange = `&as_ylo=${year}&as_yhi=${year}`;
    }

should fix the problem.

I am just wondering where I can change this line?

yjavaherian commented 4 months ago

it's here: https://github.com/justinribeiro/zotero-google-scholar-citation-count/blob/bd2e8f83e72f9e1f72158762b5a6abd06c6d3740/src/chrome/content/gscc.js#L703-L705

Aman-4-Real commented 4 months ago

it's here:

https://github.com/justinribeiro/zotero-google-scholar-citation-count/blob/bd2e8f83e72f9e1f72158762b5a6abd06c6d3740/src/chrome/content/gscc.js#L703-L705

THX!!!!!

justinribeiro commented 2 months ago

See this comment regarding the behavior and limitation of Google Scholar when it comes to "perfect" matching and why I won't make this revision: https://github.com/justinribeiro/zotero-google-scholar-citation-count/issues/18#issuecomment-1795857736