Skip to content

Commit

Permalink
fix: added &hl to programable search engine to specify language to so…
Browse files Browse the repository at this point in the history
…lve NaN problem when browser language is Arabic.
  • Loading branch information
Isra1997 committed Mar 24, 2022
1 parent 13e0b22 commit 843a2e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -221,7 +221,7 @@ class CurrencyConverter {
if(this.currencyFrom === this.currencyTo)
return new Promise((resolve, _) => {resolve(this.currencyAmount) })
else
return got(`https://www.google.co.in/search?q=${this.currencyAmount}+${this.currencyFrom}+to+${this.currencyTo}`)
return got(`https://www.google.co.in/search?q=${this.currencyAmount}+${this.currencyFrom}+to+${this.currencyTo}+&hl=en`)
.then((html) => {
// const fs = require('fs');

Expand Down

0 comments on commit 843a2e0

Please sign in to comment.