renanxcortes / springerQuarantineBooksR

Download all books made available by Springer during the COVID-19 quarantine!
131 stars 41 forks source link

Warnings appearence #25

Open JC93OV opened 4 years ago

JC93OV commented 4 years ago

Hi! First of all, thanks for the code! I work with R 3.6.3 version and I used this lines to download the ebooks:

setwd("my path") download_springer_book_files()

At the end of the process, it appear on the console:

Warning messages: 1: In if (!dir.exists(current_folder)) { : the condition has length > 1 and only the first element will be used 2: In if (!dir.exists(current_folder)) { : the condition has length > 1 and only the first element will be used

And I didn't get the books. What am I supposed to do?

JC93OV commented 4 years ago

Finally, I got the books. I set the path manually (without code), then I rerun the lines and got the books, but the lines still persist, but without problems.

renanxcortes commented 4 years ago

Currently, the package navigates inside the repo generated during the iterations. This is probably not the best approach since if you stop the downloading in the middle of the generation, your R session will probably be inside in one of the repos created. And this might be causings, as the "current_folder" might not be a single element. An alternative was open in https://github.com/renanxcortes/springerQuarantineBooksR/pull/4, but changed later. The solution would be creating files with the entire path on it and avoiding this "travelling through repos" behavior. Happy for PRs in that sense.

Malik-97 commented 4 years ago

Hi,

I am having the same warning message:

**_Warning messages:

1: In if (!dir.exists(current_folder)) { : the condition has length > 1 and only the first element will be used 2: In if (!dir.exists(currentfolder)) { : the condition has length > 1 and only the first element will be used**

I am programming in R and also using a MacBook. Not sure if this is the reason why I am getting this warning. Also my files are 14 kb and I can't open the book. It gives the following message when I open a book:

The file "Thermodynamics and Energy Conversion_2014.pdf" cannot be opened. It may be damaged or have a file structure that Preview does not recognize.

renanxcortes commented 4 years ago

Hi,

I am having the same warning message:

**_Warning messages:

1: In if (!dir.exists(current_folder)) { : the condition has length > 1 and only the first element will be used 2: In if (!dir.exists(currentfolder)) { : the condition has length > 1 and only the first element will be used**

I am programming in R and also using a MacBook. Not sure if this is the reason why I am getting this warning. Also my files are 14 kb and I can't open the book. It gives the following message when I open a book:

The file "Thermodynamics and Energy Conversion_2014.pdf" cannot be opened. It may be damaged or have a file structure that Preview does not recognize.

Hi, @Malik-97 , currently, this package has a critical issue (https://github.com/renanxcortes/springerQuarantineBooksR/issues/53) due to a reCaptcha step that Springer added in their website. Therefore, the functions will produce flawed files. In the ReadMe this is highlighted in the upper part.

Malik-97 commented 4 years ago

@renanxcortes, Thankyou for your response. I will wait till the solution is found

AntoineSoetewey commented 4 years ago

@Malik-97, if I may, you can download all books here or only the desired ones here.

Malik-97 commented 4 years ago

@AntoineSoetewey , Thankyou very much!