akawashiro/jendeley

bug: `REGISTER PDF FROM URL` fails

Closed this issue · 4 comments

For this URL https://link.springer.com/content/pdf/10.1007/3-540-45937-5_6.pdf, REGISTER PDF FROM URL results in an error with the message Failed to extract text from /[...]/[jendeley download 1674566933090].pdf.

Reproduced. I am trying to fix this now.

Current workaround

  1. Save the pdf with filename of A Graph—Free Approach to Data—Flow Analysis [jendeley doi 10_1007_3-540-45937-5_6].pdf.
  2. Register using UPLOAD PDF

I found the cause is redirect request (303) of HTTP and fixed.

> wget https://link.springer.com/content/pdf/10.1007/3-540-45937-5_6.pdf
--2023-01-25 21:12:55--  https://link.springer.com/content/pdf/10.1007/3-540-45937-5_6.pdf
Resolving link.springer.com (link.springer.com)... 146.75.112.95
Connecting to link.springer.com (link.springer.com)|146.75.112.95|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: https://idp.springer.com/authorize?response_type=cookie&client_id=springerlink&redirect_uri=https%3A%2F%2Flink.springer.com%2Fcontent%2Fpdf%2F10.1007%2F3-540-45937-5_6.pdf [following]
--2023-01-25 21:12:56--  https://idp.springer.com/authorize?response_type=cookie&client_id=springerlink&redirect_uri=https%3A%2F%2Flink.springer.com%2Fcontent%2Fpdf%2F10.1007%2F3-540-45937-5_6.pdf
Resolving idp.springer.com (idp.springer.com)... 146.75.112.95
Connecting to idp.springer.com (idp.springer.com)|146.75.112.95|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://link.springer.com/content/pdf/10.1007/3-540-45937-5_6.pdf [following]
--2023-01-25 21:12:56--  https://link.springer.com/content/pdf/10.1007/3-540-45937-5_6.pdf
Connecting to link.springer.com (link.springer.com)|146.75.112.95|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 470603 (460K) [application/pdf]
Saving to: ‘3-540-45937-5_6.pdf’

3-540-45937-5_6.pdf       100%[==================================>] 459.57K  --.-KB/s    in 0.05s   

2023-01-25 21:12:56 (9.57 MB/s) - ‘3-540-45937-5_6.pdf’ saved [470603/470603]

Fixed in @a_kawashiro/jendeley@0.0.27.