Giter Site home page Giter Site logo

Comments (17)

billgreenwald avatar billgreenwald commented on July 20, 2024

What journal is it published in, and could you download it normally from the computer you were on?

from pubmed-batch-download.

calin-qw avatar calin-qw commented on July 20, 2024

image

I had the same problem, but was able to download all papers manually. Would be great if it was looked into

from pubmed-batch-download.

rajivr79 avatar rajivr79 commented on July 20, 2024

Same problem re: **fetching of reprint failed

from pubmed-batch-download.

billgreenwald avatar billgreenwald commented on July 20, 2024

There seems to be a problem with Mechanize; it won't search any of the sites. I will work on this when I have time, but it wont be for a little bit

from pubmed-batch-download.

zakimolvi avatar zakimolvi commented on July 20, 2024

Hi @billgreenwald, thanks for taking the time to make this. I'm having the same problem as everyone else for every string of PMIDs I've tried.

Here's an example from when I ran ruby pubmedid2pdf.rb 28238146,28238140,28237713,28236573,28236485,28235723,28235591,28234628,28234487,28234430,28233996,28233941,28233218,28233053,28233000,28232590,28232293,28232288

3432423

from pubmed-batch-download.

billgreenwald avatar billgreenwald commented on July 20, 2024

Hi everyone,

I was able to fix this issue by using rvm to install ruby 2.2.7, then installing rubygems for 2.2.7 and redownloading the gems for the program. At this point in time, the default gem versions worked, but for reference, they are as follows:

socksify-1.7.1
camping-2.1.532
mechanize-2.7.5.

If anyone needs help with the above steps, let me know. If someone can try this and see if it works on their system too, that would be great. I have tested a few pmids from above and was able to fetch them properly now.

if users confirm that this works, I will update the install script to use this change and these specific versions going forward.

from pubmed-batch-download.

MBTrade15 avatar MBTrade15 commented on July 20, 2024

This is a great tool! I'm running ruby 2.2.7 and the gems you specified but when I enter ~50 PMIDs it will return only 6 PDFs and the rest fail. Do you know why this is?

Thanks in advance! If I can get the % of PDF hits up this will be amazing!

from pubmed-batch-download.

billgreenwald avatar billgreenwald commented on July 20, 2024

Could you list some of the PMIDs that did not work?

Thanks!

from pubmed-batch-download.

colbyw5 avatar colbyw5 commented on July 20, 2024

Hi @billgreenwald,

I'm having the same problem as previous users, and I attempted to follow your instructions for the solution but I am not sure I installed the gems correctly (very new ruby user). Could you help me with the steps you noted when you have a moment? This is a great tool, thanks for creating!

Colby

from pubmed-batch-download.

billgreenwald avatar billgreenwald commented on July 20, 2024

Happy to try to help.

I just tried reinstalling from scratch with my instructions 2 posts back, and they worked for me. To make it more explicit (running for Ubuntu):

First, install RVM (taken from here)

sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm

Next, install ruby 2.2.7

rvm install 2.2.7

Next, install all 3 gems

gem install socksify
gem install camping
gem install mechanize

Finally, run the script

ruby pubmedid2pdf.rb XXX,YYY,ZZZ...

Can you give me some more information about what you ran for set up, and what particular errors you got?

from pubmed-batch-download.

colbyw5 avatar colbyw5 commented on July 20, 2024

Hey @billgreenwald

Thanks for getting back to me. I ran the exact same set up in my terminal, and I got 204 of 671 pdfs that I was searching. Many of the ones that failed required a password or subscription, but for some it seemed there was a full text pdf available: 24265411 is available via BMJ, 25619871 is available via wiley, 26970696 is available via elsevier, 25778747 is available via pubmed central.

Here is the code I ran, and the error I received (I had already installed ruby 2.2.7 at this point):

rvm use 2.2.7

gem install socksify
gem install camping
gem install mechanize
ruby pubmedid2pdf.rb 25778747
Trying to fetch 25778747
** fetching of reprint 25778747 failed

Any help would be greatly appreciated, thanks again!

from pubmed-batch-download.

billgreenwald avatar billgreenwald commented on July 20, 2024

Sorry for the delayed response! I have been really busy lately, but will look into it as soon as I have time. It seems that some of the crawling methods are not being called properly.

Could you give me a PMID that worked for you as well?

from pubmed-batch-download.

colbyw5 avatar colbyw5 commented on July 20, 2024

from pubmed-batch-download.

billgreenwald avatar billgreenwald commented on July 20, 2024

your email signature posted with that last message from you, including your cell. Not sure if that was intentional, just wanted to let you know its visible in plaintext

from pubmed-batch-download.

colbyw5 avatar colbyw5 commented on July 20, 2024

Thanks for the heads up!

from pubmed-batch-download.

billgreenwald avatar billgreenwald commented on July 20, 2024

It looks like the issue is a known problem with Mechanize. I will keep looking into it and see if I can figure out a way to fix it, or if rolling back to an earlier version of ruby may help. The error is apparently well known:

too many connection resets (due to end of file reached - EOFError) after 0 requests on 26040640

I am closing this and opening a new issue as an enhancement moving forward

from pubmed-batch-download.

billgreenwald avatar billgreenwald commented on July 20, 2024

Hi everyone,

sorry to revive an old thread; mechanize was proving difficult and many people online had similar problems dating 2 years now, so i ported the code to python and cleaned it up to work with how current websites handle their metadata for scientific articles. I have uploaded and changed the github accordingly. I have tested the pdfs in this forum, and have gotten most to work, but have some errors that it would be helpful if you could reproduce, assuming you still care about using the program.

@colbyw5 could you test pmid 25778747. I got an econnreset error, which I can't tell is on my end or their end. The others worked.

@zakimolvi 28233000 can't be obtianed due to the SSL on the host site.

If you have any questions, let me know.

from pubmed-batch-download.

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.