Skip to content

Commit

Permalink
Fix a bug in using premium options for ScraperAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
arunkannawadi committed Jan 16, 2023
1 parent fb47ead commit a0e1413
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scholarly/_proxy_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ def ScraperAPI(self, API_KEY, country_code=None, premium=False, render=False):
for _ in range(3):
proxy_works = self._use_proxy(http=f'{prefix}:{API_KEY}@proxy-server.scraperapi.com:8001')
if proxy_works:
proxies = {'http://': f"http://scraperapi:{API_KEY}@proxy-server.scraperapi.com:8001",}
proxies = {'http://': f"{prefix}:{API_KEY}@proxy-server.scraperapi.com:8001",}
self.logger.info("ScraperAPI proxy setup successfully")
self._new_session(verify=False, proxies=proxies)
return proxy_works
Expand Down

0 comments on commit a0e1413

Please sign in to comment.