scholarly-python-package / scholarly

Retrieve author and publication information from Google Scholar in a friendly, Pythonic way without having to worry about CAPTCHAs!
https://scholarly.readthedocs.io/
The Unlicense
1.36k stars 298 forks source link

TypeError: __init__() got an unexpected keyword argument 'follow_redirects' #502

Closed sanbeichahegongheguo closed 1 year ago

sanbeichahegongheguo commented 1 year ago

Describe the bug from scholarly import scholarly

Traceback (most recent call last): File "13test.py", line 4, in from scholarly import scholarly File "C:\JupyterLab\resources\jlab_server\lib\site-packages\scholarly__init.py", line 4, in scholarly = _Scholarly() File "C:\JupyterLab\resources\jlab_server\lib\site-packages\scholarly_scholarly.py", line 34, in init self.nav = Navigator() File "C:\JupyterLab\resources\jlab_server\lib\site-packages\scholarly_navigator.py", line 27, in call cls._instances[cls] = super(Singleton, cls).call(*args, File "C:\JupyterLab\resources\jlab_server\lib\site-packages\scholarly_navigator.py", line 43, in init self.pm1 = ProxyGenerator() File "C:\JupyterLab\resources\jlab_server\lib\site-packages\scholarly_proxy_generator.py", line 62, in init self._new_session() File "C:\JupyterLab\resources\jlab_server\lib\site-packages\scholarly_proxy_generator.py", line 486, in _new_session self._session = httpx.Client(**init_kwargs) TypeError: init() got an unexpected keyword argument 'follow_redirects'

To Reproduce from scholarly import scholarly

when I run the code, then report the bug.

Desktop (please complete the following information):

sanbeichahegongheguo commented 1 year ago

find scholarly_proxy_generator.py", in line 454 and rewrite code

        # init_kwargs = {"follow_redirects": True}
        init_kwargs = {}