Giter Club home page Giter Club logo

Comments (5)

Tishacy avatar Tishacy commented on August 18, 2024

This IndexError is caused that there may somthing wrong in the current pointing scihub url.

Before you use scidownl -D DOI, you could use scidownl -u to update the available scihub urls. And then scidownl -l for listing your stored scihub urls, and there will be an * before your current using one. If there is no * in any scihub urls, you could use scidownl -c NUMBER to choose one, and your script may work fine.

If you have a list of DOIs, just use a for-loop in your script. An example is like:

from scidownl.scihub import SciHub, STD_INFO, STD_ERROR

DOIs = ['10.1016/j.cbpa.2014.05.011',
        '10.1111/gcb.12455',
        '10.1371/journal.pone.0097223',
        '10.1093/conphys/cox005']

out = 'paper'
for doi in DOIs:
    # Using a try catch to catch exceptions for avoiding code interruption
    # if something goes wrong in this for-loop.
    try:
        print("\n%sDoi: %s" %(STD_INFO, doi))
        SciHub(doi, out).download(choose_scihub_url_index=3)
    except Exception as e:
        print("%sDownload error with doi: %s. Error message: %s" %(STD_ERROR, doi, e))

You may need input the captcha code of some papers when the code runs.

And If there are errors jump up like: "[ERROR] Download error with doi: ... ", this may be because the scihub servers did not include this paper or scihub jumped to another website when post a doi, then you could manually download the paper through the official scihub website like https://sci-hub.se.

from scidownl.

j0nfen avatar j0nfen commented on August 18, 2024

Thank you, thank you.

I think there was something wrong with my terminal or system. Because once I get the error message, the script stop working. Even when I tried to change the link the script stop working. I reinstall everything in a fresh SO. I get the error sometimes when the document is not found. But the script keep working.

For mistake a paste two doi at once, and the scrip work with the two at once so in a way for a mistake now I own the "loop".

I will try the other method. The DOI number are for more recent documents. Since Sci Bub work with the titles of the papers, do you think this script could be modify to work with the titles as well?

Thank you, thank you! again.

from scidownl.

j0nfen avatar j0nfen commented on August 18, 2024

Hi Tishacy. I encounter that some DOI with ( ) and other for specific editorials the DOI doesn't work. Instead I tried to look up only with the title manually in the site and thats works. Since the search bard of scihub allows to search by title I wonder It's possible to make that the script search with the title of the article instead of the DOI?

Thank you so much!

Regards.

from scidownl.

Tishacy avatar Tishacy commented on August 18, 2024

Searching with title is currently not supported in scidownl (0.2.7), but this is a good idea to have title searching like sci-hub official website, so I may add this feature in the next version. 😉

from scidownl.

j0nfen avatar j0nfen commented on August 18, 2024

Thank you so much. I tried different DOI's and for your record the ones like this:

10.1016/0305-0491(92)90006-d
10.3989/scimar.1999.63n3-4465
10.3354/meps11514

Thank you for your work!

Take care.

from scidownl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.