Skip to content

Commit

Permalink
Google Scholar: Add delays between consecutive network requests.
Browse files Browse the repository at this point in the history
When there are multiple items to be translated, the previous
implementation fires network requests to Google Scholar server in rapid
succession. This increases the likelihood of being rate-limited or
denied by the server.

To fix this, an artificial delay of at least 500ms is added between
successive network requests.

In addition, calls to the callback-based `doGet()` are replaced with
promise-based asynchronous calls.

A few stylistic fixes (such as `===` vs. `==`) are also included.

Resolves zotero#3037.
  • Loading branch information
zoe-translates committed Jun 4, 2023
1 parent e458dc3 commit 4c53d52
Showing 1 changed file with 189 additions and 166 deletions.
Loading

0 comments on commit 4c53d52

Please sign in to comment.