nico-zck / zotero-scholar-citations

77 stars 2 forks source link

Wrong citation number #4

Closed Ghiclgi closed 2 years ago

Ghiclgi commented 2 years ago

I have found the addon return wrong citation numbers for this article. I got ZSCC:00013. But the citation number should be 0. I don't know the reason. Could you please fix this error? Thank you very much for the maintenance.

nico-zck commented 2 years ago

First, I need to explain why I implemented a rough time range query . For example, if a paper titled "Explaining and Exploiting Adversarial Examples" has a year of "2013" in Zotero, the original version will produce a URL that results in an incorrect query (https://scholar.google.com/scholar?q=Explaining+and+Harnessing+Adversarial+Examples&hl=en&as_sdt=0%2C5&as_ylo=2013&as_yhi=2013), while a looser range, such as 2012 - 2014, will hit the correct query (https://scholar.google.com/scholar?q=Explaining+and+Harnessing+Adversarial+Examples&hl=en&as_sdt=0%2C5&as_ylo=2012&as_yhi=2014).

For this paper, this plugin generates a url like: https://scholar.google.com/scholar?hl=en&q=Transport%20of%20complex%20and%20active%20fluids%20in%20porous%20media&as_epq=&as_occt=title&num=1&as_sauthors=Kumar+Guasto+Ardekani&as_ylo=2020&as_yhi=2024. It's obviously that the 2022 is covered by the range of 2020—2024, however, google scholar will return a wrong result. I think it's a bug caused by Google scholar.

Or, do you have any suggestion to this problem?

Ghiclgi commented 2 years ago

Yes, I think keeping the looser range is a wise choice. I just find out a solution: add the names of the first few authors directly into the search query. Is it possible? For example, the query (https://scholar.google.com/scholar?hl=en&num=1&as_sdt=0%2C33&as_ylo=2020&as_yhi=2024&q=Transport+of+complex+and+active+fluids+in+porous+media+Kumar+Guasto)

nico-zck commented 2 years ago

Yes, I think keeping the looser range is a wise choice. I just figure out a solution: add the names of the first few authors into the search query. Is it possible?

Look back the last link in the previous comment, I already added the first three authors in the query url. But it still not work😂.

Ghiclgi commented 2 years ago

Sorry, I just learn that you have already included the author names.

Ghiclgi commented 2 years ago

Yes, I think keeping the looser range is a wise choice. I just figure out a solution: add the names of the first few authors into the search query. Is it possible?

Look back the last link in the previous comment, I already added the first three authors in the query url. But it still not work😂.

Replacing q= with as_q= gives the correct result, although the reason remains unknown. Before: https://scholar.google.com/scholar?hl=en&q=Transport%20of%20complex%20and%20active%20fluids%20in%20porous%20media&as_epq=&as_occt=title&num=1&as_sauthors=Kumar+Guasto+Ardekani&as_ylo=2020&as_yhi=2024. After: https://scholar.google.com/scholar?hl=en&as_q=Transport%20of%20complex%20and%20active%20fluids%20in%20porous%20media&as_epq=&as_occt=title&num=1&as_sauthors=Kumar+Guasto+Ardekani&as_ylo=2020&as_yhi=2024.

nico-zck commented 2 years ago

Looks great! I will test this solution and fix it in the next release.