cute-jumper / gscholar-bibtex

Retrieve BibTeX entries from Google Scholar, ACM Digital Library, IEEE Xplore and DBLP
108 stars 12 forks source link

No results when using Google Scholar & ACM Digital Library as "source" #31

Open seakros opened 5 years ago

seakros commented 5 years ago

I'm not getting any results when polling for entries from the Google Scholar or ACM Digital Library sources. IEEE & DBLP are working as expected.

I'm using the develop branch of Spacemacs and had the same issue when using the 'almost' 0.300.x release branch.

joshrule commented 5 years ago

I'm having the same issue: on the develop branch of Spacemacs, IEEE & DBLP work as expected, but Google Scholar and ACM Digital Library do not present any results.

seakros commented 5 years ago

Tried using older version of code, and this didn't seem to fix the problem. Is this due to a change of the responses from google scholar perhaps?

cute-jumper commented 5 years ago

ACM Digital Library may be broken, but Google Scholar seems to work fine on my side. Are you able to visit the web version of Google Scholar?

seakros commented 5 years ago

Yes, I do indeed have steady access to the web version of Google Scholar.

I've tried removing and re-adding gscholar-bibtex from my list of packages in my .spacemacs config file, but to no avail.

Is the package only guaranteed to work up to certain version of Emacs or Spacemacs? I'm on Emacs 26.1 and the "develop" branch of Spacemacs.

cute-jumper commented 5 years ago

Is the package only guaranteed to work up to certain version of Emacs or Spacemacs?

No. It should work for either Emacs or Spacemacs. The reason why this package may fail is the server doesn't return any data (in the case of Google Scholar).

BTW, in the web version, are you able to actually access the BibTeX page? I have seen cases where a normal search works fine but accessing the BibTeX entry fails.

seakros commented 5 years ago

Yes, just double checked, I'm able to access the BibTex entry (enter a search, click on the "quotation marks" image for "Cite" below an entry, click on BibTex in the popup)

cute-jumper commented 5 years ago

Sorry this package doesn't work great for you. I am not able to repro on my side so I can't help much. Using Google Scholar in general isn't quite stable as Google seems to put extra scrutiny on the usages of Google Scholar.

If you are willing to debug the problem and find the solution, I will be happy to review the PR.

seakros commented 5 years ago

Okay, thanks anyway. I will try and debug the issue in the future! Perhaps if someone else is experiencing the same issue they can try and write something here to help narrow down the problem.

treese commented 5 years ago

I had a problem with a similar symptom. After a long and winding path looking for clues, I found that I needed to use (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") so that Emacs and the GNUtls library would correctly talk to Google's servers.

cute-jumper commented 5 years ago

@treese This sounds great! I would love to know whether this solves other people's issue too. If so, I can put it in the README.

LaloHao commented 5 years ago

I had a problem with a similar symptom. After a long and winding path looking for clues, I found that I needed to use (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") so that Emacs and the GNUtls library would correctly talk to Google's servers.

This is a documented problem with spacemacs package installation too, but even with this enabled i coudn't make it work.

I traced the call to gscholar-bibtex, the problem seems to be here

(defun gscholar-bibtex (&optional source query)
  ....
  (let* (...
         (search-results (gscholar-bibtex-dispatcher :search-results query))
   ...))

Google's response (last bold text) which translates to: Prove you're not a robot

Image

Screen Shot 2019-09-01 at 6 42 21 PM

Here's the raw HTML

```html Google Académico

Cargando...
El sistema no puede realizar la operación en estos momentos. Inténtalo de nuevo más tarde.

Citar

Búsqueda avanzada

Buscar artículos
p. ej., \"García Márquez\" o Cela
p. ej., JAMA o Gaceta Sanitaria
 — 
p. ej., 1996

Demuestra que no eres un robot

```

EDIT: Seems i got blocked from scholar.bib, i can't even access it from chrome

treese commented 5 years ago

I've gotten the robot check, too, but it's intermittent. So far, I don't know of any way to work around it with gscholar-bibtex, except that maybe it works later after the server is less suspicious.