News for hackers. Stuff that matters.
Re:Sci Hub Injector by hobofan on Sunday January 16, 2022 @05:12AM (#29954752)
Small suggestion: instead of hardcoding the .se domain, you might want to send a request to Wikidata to get the currently ised domains. That's how similar sci-hub tools do it to stay up-to-date.
Re:Sci Hub Injector by sigmar on Sunday January 16, 2022 @08:58AM (#29956008)
I had never heard of wikidata, but might steal this idea for a similar app I have on F-Droid that pulls PDFs from Sci-Hub when a doi link is clicked using android's intent system https://f-droid.org/en/packages/com.sigmarelax.doitoscihub/
Re:Sci Hub Injector by tsol on Sunday January 16, 2022 @11:05AM (#29957068)
Cool idea. I'm gonna give this a try, thanks for sharing
Re:Sci Hub Injector by smasher164 on Sunday January 16, 2022 @11:02AM (#29957032)
Is Wikidata the proper way to get the currently functioning mirror? I was under the impression that you had to get it from Elbakyan's VK or the SciHub Telegram. I've been assuming that the subreddit would update with accurate links, so I've just been scraping it from there: https://github.com/smasher164/search/blob/53ae11b52f158d1986...
Re:Sci Hub Injector by hassancf on Sunday January 16, 2022 @11:28AM (#29957312)
I found that source code extremely familiar and was wondering what it was.

I saw the shebang and still didn’t understand what the heck roku was.

Until I searched it:

“Raku is a member of the Perl family of programming languages. Formerly known as Perl 6, it was renamed in October 2019.”

Re:Sci Hub Injector by nefitty on Sunday January 16, 2022 @11:42AM (#29957445)
My god, why did you mention wikidata? SPARQL is the most obscure fucking thing I've ever encountered. I've been sitting here for an hour trying to find how to get the data of a specific page!

I guess the rest API will do, ugh.

Related discussion: https://news.ycombinator.com/item?id=28277749

Re:Sci Hub Injector by nefitty on Sunday January 16, 2022 @02:35PM (#29959136)
Ok, I'm not just here to bitch. Here's the code for my implementation of Sci-Hub mirror checking: https://observablehq.com/@iz/sci-hub

I made an iOS Shortcut based on the same code. To use it after installing, access it from the iOS Share screen when you're on a relevant site. It will look for preferred mirrors from Wikidata before running.

https://www.icloud.com/shortcuts/080b9f68c96a4491898b804547e...

Always review a Shortcut's actions before running it.

Re:Sci Hub Injector by rickdeveloper on Sunday January 16, 2022 @05:36AM (#29954874)
Thanks for the suggestion! I'll add that in a future version.