Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download has stopped because of the captcha? #12

Open
mustikarizki opened this issue Aug 2, 2018 · 1 comment
Open

Download has stopped because of the captcha? #12

mustikarizki opened this issue Aug 2, 2018 · 1 comment

Comments

@mustikarizki
Copy link

mustikarizki commented Aug 2, 2018

I have tried to download pdfs using the list of DOI that I have stored in the .txt file. Then, I got an issue after 3-4 pdfs are succesfully downloaded:

`DOI:  10.1016/j.telpol.2009.08.001
	Sci-Hub Link:  http://sci-hub.tw/10.1016/j.telpol.2009.08.001
	checking if has captcha...
	Download: ok

	DOI:  10.1080/0268396032000150816
	Sci-Hub Link:  http://sci-hub.tw/10.1080/0268396032000150816
	checking if has captcha...
Traceback (most recent call last):
  File "/Users/mustikarizkifitriyanti/anaconda/envs/thesis/bin/scihub2pdf", line 191, in <module>
    main()
  File "/Users/mustikarizkifitriyanti/anaconda/envs/thesis/bin/scihub2pdf", line 163, in main
    download_from_doi(value, location, use_libgen)
  File "/Users/mustikarizkifitriyanti/anaconda/envs/thesis/lib/python2.7/site-packages/scihub2pdf/download.py", line 163, in download_from_doi
    download_from_scihub(doi, pdf_file)
  File "/Users/mustikarizkifitriyanti/anaconda/envs/thesis/lib/python2.7/site-packages/scihub2pdf/download.py", line 105, in download_from_scihub
    captcha_img = ScrapSci.get_captcha_img()
  File "/Users/mustikarizkifitriyanti/anaconda/envs/thesis/lib/python2.7/site-packages/scihub2pdf/scihub.py", line 98, in get_captcha_img
    self.driver.execute_script("document.getElementById('content').style.zIndex = 9999;")
  File "/Users/mustikarizkifitriyanti/anaconda/envs/thesis/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 635, in execute_script
    'args': converted_args})['value']
  File "/Users/mustikarizkifitriyanti/anaconda/envs/thesis/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
    self.error_handler.check_response(response)
  File "/Users/mustikarizkifitriyanti/anaconda/envs/thesis/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: {"errorMessage":"null is not an object (evaluating 'document.getElementById('content').style')","request":{"headers":{"Accept":"application/json","Accept-Encoding":"identity","Connection":"close","Content-Length":"134","Content-Type":"application/json;charset=UTF-8","Host":"127.0.0.1:49931","User-Agent":"selenium/3.13.0 (python mac)"},"httpVersion":"1.1","method":"POST","post":"{\"sessionId\": \"927e3730-9652-11e8-ae2e-f99d263e318f\", \"args\": [], \"script\": \"document.getElementById('content').style.zIndex = 9999;\"}","url":"/execute","urlParsed":{"anchor":"","query":"","file":"execute","directory":"/","path":"/execute","relative":"/execute","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/execute","queryKey":{},"chunks":["execute"]},"urlOriginal":"/session/927e3730-9652-11e8-ae2e-f99d263e318f/execute"}}
Screenshot: available via screen
`

I wonder maybe this happens because that specific DOI has a captcha, Does anyone can help me to solve this issue?

@mustikarizki mustikarizki changed the title Download has stopped because of the captcha Download has stopped because of the captcha? Aug 2, 2018
@mjonyh
Copy link

mjonyh commented Nov 18, 2019

I am having the same problem. Did you solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants