mariorossi77/bookmenu

"no books found" no matter what I try

Closed this issue · 15 comments

Thanks for your work in this tool.

  1. Question1: Could you confirm that it is working as expected as of April 2022 ?

No matter what query I try, I always get the response "no books found".
I'm not sure if it's a missunderstanding on my side on what is this tool for, or is it a problem with the script, or any conectivity issue.

Here is what I tried to figure this out.

If I understand correctly, from the README:

....TUI for LibGen using the InterPlanetary File System....

So, as I read it, I could use bookmenu to do on the terminal exactly what I do when I visit the website libgen.is to download "non fiction" books.

  1. Question2: Am I correct in this thinking or am I missing something ?

I'm on Archlinux and I install bookmenu with this recipe, https://aur.archlinux.org/packages/bookmenu-git. It makes sure all the needed dependencies are met. It pulls whatever the latest thing you have on github. So it's always up to date.

I then get these files on my system,

bookmenu-git /usr/bin/bookmenu
bookmenu-git /usr/share/licenses/bookmenu/LICENSE


As I can see bookmenu is a bash script. I see reference to some URL's

URL1="https://it1lib.org/s"
URL2="http://library.lol/main"
URL3="https://ipfs.io/ipfs"

First of all, I make sure I have no network proble accessing these domains.

I used ping. I used a command line web browser, w3m. And I used Firefox.
I can reach them all. So nobody is "blocking" them for me.

But there are things I dont understand.

  1. Question3: Why "library.lol" ?

I would have expected something related to libgen.is
This is not a https domain. It is a http domain. and it just directs to a page, offering links to libgen.rs | libgen.is | libgen.st

$ curl -I http://library.lol

gives me this:

HTTP/1.1 200 OK
Server: nginx
Date: Mon, 25 Apr 2022 16:21:08 GMT
Content-Type: text/html
Content-Length: 309
Connection: keep-alive
Last-Modified: Sat, 03 Jul 2021 01:22:58 GMT
ETag: "60dfbbf2-135"
Accept-Ranges: bytes

I even used iftop to see behind the seens what network connections it is opening, when for example,

bookmenu history china

gigabyty:47878                     <=> hostedby.packetbunker.com:443           0B      0B    785B
gigabyty:45930                     <=> z-lib.org:443                           0B      0B    272B
gigabyty:39929                     <=> _gateway:53                             0B      0B     10B
gigabyty:53225                     <=> _gateway:53                             0B      0B      9B
gigabyty:53285                     <=> _gateway:53                             0B      0B      7B
gigabyty:34909                     <=> _gateway:53                             0B      0B      6B

So my pc is trying to get resolve domain names (port 53) and connetcting to some https domains (port 443) these, z-lib.org and this hostedby.packetbunker.com.

But in the end, no matter what the query is, the result is always "no books found".

Can you help me trouble shoot why I cant use bookmenu ? Thanks in advance

thanks for the very detailed issue.
you are not missing anything.
im pretty sure this is a networking issue related to the first two domains. it might depend on your ip geolocation and you should try with other proxies for url1.
it is currently working fine for me on arch linux even with the default config if i search "history china".
You should try to open $URL2/8579ba9568df26e30021874e86430645
in firefox
you should see the book details

regarding question 3
library.lol is needed to scrape the ipfs link that will allow you to download the book

...You should try to open $URL2/8579ba9568df26e30021874e86430645
in firefox...

I guess you mean I should try to open http://library.lol/8579ba9568df26e30021874e86430645

I did in Firefox. And I did see the book "Linux Commands, Bash Scripting Tricks ...". It is the same kind of book page that I see when I go download books through libgen.is. I have no problem downloading books this way. Although it is a http URL. Not a https one. So Firefox always warns about insecure connection.

... is a networking issue related to the first two domains.

I can also open https://it1lib.org/s without any problem in Firefox

....you should try with other proxies for url1....

I dont understand these instructions. What do you mean "other proxies" ? Do you mean editing the script itself and changing some variables ? Is it substituting URL1="https://it1lib.org/s" for something else ? Or is it some kind of flag or command line option ? I cant find information on the README

...it is currently working fine for me on arch linux even with the default config...

What do you mean the "default config" ? Is there any configuration file ? Are there any options or flags to pass on the command line ? Or do you just mean changing the script itself ?

PS:

....Many ISPs have started blacklisting the domains...
... update your /etc/resolv.conf...

This messing with /etc/resolv.conf seems to drastic to me

In many years of using the Internet I never experienced anything like this. I could always reach and get whatever I want. I can currently reach and get whatever I want from Pirate Bay, Libgen, Sci-hub, etc, as I stated above,

In any case just for reference this is what my ISP or 1.1.1.1 currently tells me about these domains

library.lol. 2206 IN A 193.218.118.42
library.lol. 2206 IN A 194.32.107.204
1lib.domains. 247 IN A 5.182.211.203

$ dig library.lol  1lib.domains
; <<>> DiG 9.18.2 <<>> library.lol 1lib.domains
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26275
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;library.lol.                   IN      A

;; ANSWER SECTION:
library.lol.            2206    IN      A       193.218.118.42
library.lol.            2206    IN      A       194.32.107.204

;; Query time: 0 msec
;; SERVER: 192.168.1.1#53(192.168.1.1) (UDP)
;; WHEN: Tue Apr 26 15:10:13 WEST 2022
;; MSG SIZE  rcvd: 72

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21764
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;1lib.domains.                  IN      A

;; ANSWER SECTION:
1lib.domains.           247     IN      A       5.182.211.203

;; Query time: 0 msec
;; SERVER: 192.168.1.1#53(192.168.1.1) (UDP)
;; WHEN: Tue Apr 26 15:10:13 WEST 2022
;; MSG SIZE  rcvd: 57

give me the content of /dev/shm/bookmenu*
and i will compare it to mine
by looking at the diff i should be able to find the issue

This messing with /etc/resolv.conf seems to drastic to me

my isp dns blocks those domains so however you like but changing dns server is needed sometimes

by default config i mean that the script is unchanged after installation from aur. (configuration is done by tweaking the first variables)

there are many proxies for zlibrary so i was wondering if you tried any other

I guess you mean I should try to open http://library.lol/8579ba9568df26e30021874e86430645

yes, also /main/
if you see the book then it's ok
i'll wait for the /dev/shm stuff if you can

yes, also /main/

In Firefox:

http://library.lol/main gets a warning for not being secure (https). If you accept and proceed it then goes to show this:

404 Not Found
nginx

http://library.lol/8579ba9568df26e30021874e86430645, works and shows the book, as I have already said before.

i'll wait for the /dev/shm stuff if you can

https://aur.archlinux.org/packages/bookmenu-git

Last Updated: | 2022-01-14 21:36 (UTC)
Maintainer: | BachoSeven
Last Packager: | BachoSeven
$ date

Wed Apr 27 01:13:16 AM WEST 2022

$ pacman -Qi bookmenu-git
Name            : bookmenu-git
Version         : r169.8008d44-1
Description     : Command line utility to browse and download ebooks from LibGen, using
                  the InterPlanetary File System.
Architecture    : any
URL             : https://github.com/kusky3/bookmenu
Licenses        : GPL3
Groups          : None
Provides        : bookmenu
Depends On      : chafa  wget
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : bookmenu
Replaces        : None
Installed Size  : 38.85 KiB
Packager        : Unknown Packager
Build Date      : Wed 27 Apr 2022 01:12:57 AM WEST
Install Date    : Wed 27 Apr 2022 01:13:05 AM WEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None
$ pacman -Ql bookmenu-git
bookmenu-git /usr/
bookmenu-git /usr/bin/
bookmenu-git /usr/bin/bookmenu
bookmenu-git /usr/share/
bookmenu-git /usr/share/licenses/
bookmenu-git /usr/share/licenses/bookmenu/
bookmenu-git /usr/share/licenses/bookmenu/LICENSE

cat /usr/bin/bookmenu

#!/usr/bin/env bash

FORMAT="" # e.g. epub, mobi
OUT="$HOME/.bookmenu" # path to save books
URL1="https://it1lib.org/s"
URL2="http://library.lol/main"
URL3="https://ipfs.io/ipfs"
TMPDIR="/dev/shm/${0##*/}" # /tmp is also viable if {tmpfs,ramfs} is on
INDEX="$TMPDIR/bookmenu_index"
LIST="$TMPDIR/bookmenu_list"
TITLE="$TMPDIR/bookmenu_title"
INFO="$TMPDIR/bookmenu_info"
COVER="$TMPDIR/bookmenu_cover"
IMAGE="$TMPDIR/bookmenu_image"
TEXT="$TMPDIR/bookmenu_text"
QUERY=$@

[[ ! -d "$TMPDIR" ]] && { mkdir -p $TMPDIR; }
[[ ! -d "$OUT" ]] && { mkdir -p $OUT; }
[[ -z "$QUERY" ]] && { echo "usage: ${0##*/} {query}"; exit 2; }

get_index() { wget -q "${URL1}/${QUERY}/?extensions[0]=$FORMAT" -O $INDEX; }
get_list() { grep "data-src" $INDEX | cut -d'"' -f8 | sed '/^\//d' > $LIST; max=$(wc -l $LIST | cut -d' ' -f1); }
get_title() { grep "text-decoration" $INDEX | cut -d'>' -f2 | tail -n +4 | sed -e "s/...$//" > $TITLE; }
get_info() { grep 'MB\|KB' $INDEX | cut -d">" -f2 | cut -d"<" -f1 > $INFO; }
termset() { [[ $1 == "reset" ]] && { tput cnorm; stty echo; trap 2; } || { tput civis; stty -echo; trap '' 2; }; }
load() { clear; wget "$1" -O "$2"; clear; }
prompt() { echo -ne "\n[${count}/${max}] ${1}[d]ownload [q]uit\n"; }

save() { hashsum=$(cut -d'/' -f9 <<< $link | cut -d '.' -f1);
        upstream=$(grep $URL3 <<< "$(curl -s $URL2/"${hashsum^^}")" | cut -d'"' -f2)
        [[ -z $upstream ]] && { fail=$count; down=0; return 1; }
        [[ -z $1 ]] && name=$hashsum || name=$1
        clear; load "$upstream" "$OUT/$name.${extension,,}"; }

main() {
        next=1; count=1; max=0; down=0; fail=0; size=0; rterm=$TERM
        rm $INDEX $LIST $TITLE $INFO $COVER $IMAGE $TEXT 2>/dev/null
        get_index; get_list; get_title; get_info
        if [[ -s $LIST ]]; then
                while :; do
                        let limit=$max+1
                        [[ $count == "$limit" ]] && break
                        width=$((($(tput cols)*10)/25))
                        #height=$(($(tput lines)-5))
                        link=$(sed -n "${count}p" $LIST)
                        data=$(sed -n "${count}p" $INFO)
                        author=$(grep 'author' $INDEX | cut -d">" -f3 | cut -d "<" -f1 | sed -r '/^\s*$/d' | sed -n "${count}p")
                        extension=$(cut -d"," -f1 <<< $data)
                        size=$(cut -d"," -f2- <<< $data)
                        echo -e "\n\n" > $TEXT
                        sed -n "${count}p" $TITLE | sed -e "s/.\{${width}\}/&\n/g" >> $TEXT
                        echo -e "\nAuthor: $author\nFormat: $extension\nSize:$size" >> $TEXT
                        load $link $COVER
                        #TERM="book" viu -w "$width" -h "$height" $COVER > $IMAGE
                        chafa $COVER > $IMAGE
                        #TERM=$rterm termset
                        paste $IMAGE $TEXT
                        [[ $max == 1 ]] && prompt || { [[ $count == 1 ]] && prompt "[n]ext ";
                        [[ $max == "$count" ]] && [[ $down != "$count" ]] && prompt "[p]revious ";
                        [[ $count != 1 ]] && [[ $max != "$count" ]] && prompt "[p]revious [n]ext "; }
                        [[ $fail == "$count" ]] && echo "ipfs download unavailable for this book"
                        [[ $down == "$count" ]] && echo "saved to: \"$OUT/$name.${extension,,}\""
                        while :; do
                                read -N 1 -s choice
                                case $choice in
                                        n)
                                        [[ $max != $count ]] && break;;
                                        p)
                                        [[ $count != 1 ]] && { next=0; let count--; break; }
                                        ;;
                                        d)
                                        termset reset
                                        read -p "filename: " filename
                                        save "$filename"
                                        termset
                                        [[ $fail == 0 ]] && down=$count; next=0; break;;
                                        q)
                                        end=1; break;;
                                        *)
                                        ;;
                                esac
                        done
                [[ $end == 1 ]] && break; [[ $next == 1 ]] && let count++
                next=1; clear; done
        fi
        termset reset
        [[ $end != 1 ]] && [[ $count == 1 ]] && { echo "no books found"; exit 1; }
}
main

Sorry I just missed this:

... give me the content of /dev/shm/bookmenu* ...

$ pwd

/dev/shm/

$ rm -rf bookmenu/

$ bookmenu history china

no books found

$ ls -lR bookmenu/
bookmenu/:
total 12
-rw-r--r-- 1 a1 a1 10860 Apr 27 01:33 bookmenu_index
-rw-r--r-- 1 a1 a1     0 Apr 27 01:33 bookmenu_info
-rw-r--r-- 1 a1 a1     0 Apr 27 01:33 bookmenu_list
-rw-r--r-- 1 a1 a1     0 Apr 27 01:33 bookmenu_title

$ cat bookmenu/bookmenu_index
<!DOCTYPE html>
<html>
    <head>
        <script type="text/javascript">
            navigator.sayswho = (function(){
                var ua= navigator.userAgent, tem,
                M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
                if(/trident/i.test(M[1])){
                    tem=  /\brv[ :]+(\d+)/g.exec(ua) || [];
                    return 'IE '+(tem[1] || '');
                }
                if(M[1]=== 'Chrome'){
                    tem= ua.match(/\b(OPR|Edge)\/(\d+)/);
                    if(tem!= null) return tem.slice(1).join(' ').replace('OPR', 'Opera');
                }
                M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];
                if((tem= ua.match(/version\/(\d+)/i))!= null) M.splice(1, 1, tem[1]);
                return M.join(' ');
            })();

                    </script>

        <title>Z-Library single sign on</title>
<base href="/">

                        <meta charset="utf-8">		                       
                        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
                        <meta http-equiv="X-UA-Compatible" content="IE=edge">
                        <meta name="viewport" content="width=device-width, initial-scale=1">
                        <meta name="title" content="Z-Library single sign on">
			<meta name="description" content="Z-Library single sign on | Z-Library. Download books for free. Find books">
			<meta name="robots" content="index,all">
			<meta name="distribution" content="global">
			<meta http-equiv="cache-control" content="no-cache">
			<meta http-equiv="pragma" content="no-cache">

                        <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=1">
                        <link rel="icon" href="favicon.svg">
                        <link rel="icon" type="image/svg+xml" href="/favicon-32x32.svg?v=2" sizes="32x32">
                        <link rel="icon" type="image/svg+xml" href="/favicon-16x16.svg?v=2" sizes="16x16">
                        <link rel="manifest" href="/manifest.json?v=1">
                        <link rel="mask-icon" href="/safari-pinned-tab.svg?v=1" color="#5bbad5">
                        <meta name="apple-mobile-web-app-title" content="Z-Library">
                        <meta name="application-name" content="Z-Library">
                        <meta name="theme-color" content="#ffffff">

                        <meta name="propeller" content="49c350d528ba144cace841cac74260ab">
                        <meta name="alfacoins-site-verification" content="5ef0e7b2483f15ef0e7b2484275ef0e7b24845d_ALFAcoins">
	
<!-- CSS SET -->
<!-- JS SET --> 
<link REL="SHORTCUT ICON" HREF="/favicon.ico?v=1">
        <link rel="search" type="application/opensearchdescription+xml" href="/search.xml" title="Search for books in the library Z-Library" />

                    <link rel="stylesheet" type="text/css" href="/resources/build/global.css?0.395" />
            <script type="text/javascript" src="/resources/build/global.js?0.395"></script>
        <link rel="stylesheet" type="text/css" href="/resources/css/singlelogin.css?0.395" />

        
        <script>
            
            const Config = {"domainHost":"1lib.domains","BRegion":"europe","Country":"PT"};
            const CurrentUser = new User(null);
            const CurrentClientIP = "188.82.3.184";
            const proxiesToCheck = []; //for google verification
            const CurrentSiteMode = 'books';

            i18next
                .use(i18nextHttpBackend)
                .init({
                    lng: 'en',
                    fallbackLng: 'en',
                    backend: {
                        loadPath: '/resources/build/locales/{{lng}}?v=4'
                    }
                })

            $(document).ready(function() {
                $('.tooltip-init').tooltip({html: true})

                            })

            $(document).on('focus', '.form-email-field', function() {
                $(this).tooltip('hide')
            })

            $(document).on('change', '.form-email-field', function() {
                const $input = $(this)
                const email = $input.val()

                $input.parents('.form-group').find('.form-error').remove()
                $.each(["appzily.com","robhung.com","shackvine.com","robhung.com,","spruzme.com"], function(key, domain) {
                    if (email.indexOf(domain) !== -1) {
                        $input.tooltip({
                            placement: 'top',
                            trigger: 'manual',
                            title: $input.data('message'),
                        }).tooltip('show')
                    }
                })
            })

            $(document).on('focus', '.form-email-field', function() {
                $(this).tooltip('hide')
            })
        </script>
    </head>

    <body style="margin:0px;padding:0px;" class="subprojects/1lib singlelogin">
        <table class="super-puper-main-container" border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr style="height:10px;">
                    <td style="vertical-align: top;">
                        <div class="container-fluid">
                                                    </div>
                    </td>
                </tr>
                <tr>
                    <td class="g-page-content">
                        <div class="container" style="max-width: 1000px;padding-bottom: 40px;">
                            <div class="row">
                                <div class="col-md-12 itemFullText">
                                        <div id="redirectorMessage" class="row" style="margin: auto auto;">
        <div class="well">
            <a href="/"><img src="/img/logo.zlibrary.png" alt="Z-Library" style="width:100%;"></a>
            <div class="message">Checking available domains.<br> Please wait...</div>
            <div class="spinner"></div>
        </div>
    </div>

<div class="well no-available-domains">
    <i class="icon-error"></i>
    <div class="errorCode hidden" style="margin-top: 20px; color: red;"><span class="msg">Error code:</span>&nbsp;<span class="val"></span></div>
    <div class="title">No available domains were found</div>
    <div class="description">It seems the domains have been blocked by your Internet Provider. You can try to sign in using VPN or TOR browser</div>
            <a target="_blank" href="https://www.torproject.org" class="btn go-tor-btn"><i class="icon-tor"></i>Go to TOR browser</a>
        <a target="_blank" href="https://wikipedia.org/wiki/VPN_service" class="btn go-vpn-btn"><i class="icon-vpn"></i>Enable VPN</a>
    </div>

        <script>
        new ZLibrarySpinner($('.spinner')).color('#828282').start()
                    const domains = ["pt1lib.org","2lib.org","1lib.eu","1lib.org","3lib.net","4lib.org","b-ok.global","1lib.limited","1lib.education","bookshome.net","eu1lib.org","libsolutions.net","b-ok.xyz"];
            const Checker = DomainsChecker
        
        const success = (domain) => location.href = '//' + domain + '/s/history china/?extensions%5B0%5D='
        const error = (domainsStatuses, mode, code) => {
            $('.well').hide()
            if (typeof code === 'string') {
                $('.well.no-available-domains .errorCode').removeClass('hidden').find('.val').text(code)
            }
            $('.well.no-available-domains').show()
        }

        Checker(domains, success, error, 'books')
    </script>
                                                                    </div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr style="height:60px">
                    <td id="footer" valign="top">
                        <div class="container-fluid"></div>
                    </td>
                </tr>
            </tbody>
        </table>

        <!-- icons preload hack -->
        <i class="zlibicon-check" style="font-size: 1px; visibility: hidden; position: absolute; top: 0; left: 0;"></i>

        <div class="modal fade" id="zlibrary-modal" role="dialog">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header hidden">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title"></h4>
                    </div>
                    <div class="modal-body" style="position: relative; min-height: 80px;"></div>
                </div>
            </div>
        </div>

        <div class="modal fade" id="zlibrary-modal-styled" tabindex="-1" role="dialog">
            <div class="modal-dialog">
                <div class="modal-content">                    
                    <div class="modal-header hidden">
                        <h1 class="modal-title"></h1>
                    </div>
                    <div class="modal-body"></div>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>    
                </div>
            </div>
        </div>

        <div class="modal fade" id="zlibrary-modal-auth" tabindex="-1" role="dialog">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-body"></div>
                </div>
            </div>
        </div>
        
        <!-- ggAdditionalHtml -->
        <!--LiveInternet counter--><script type="text/javascript">
new Image().src = "//counter.yadro.ru/hit;bookzz?r"+
escape(document.referrer)+((typeof(screen)=="undefined")?"":
";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
";"+Math.random();</script><!--/LiveInternet-->

<iframe name="uploader" id="uploader" style="border:0px solid #ddd; width:90%; display:none;"></iframe><script></script>        <!-- /ggAdditionalHtml -->
        
                
        <script>
            if (typeof pagerOptions !== "undefined" && pagerOptions) {
                $('div.paginator').paginator(pagerOptions);
                /* Если задана страница больше чем последняя - редирект на последнюю */
                let page = parseInt((new URL(document.location)).searchParams.get("page"));
                if (page > pagerOptions.pagesTotal) document.location.href = document.location.href.replace(/page=\d+/gi, "page="+pagerOptions.pagesTotal);
            }
        </script>
    </body>
</html>


cp bookmenu/bookmenu_index test.html

w3m test.html

Z-Library
Checking available domains.
Please wait...
Error code:
No available domains were found
It seems the domains have been blocked by your Internet Provider. You can try to sign in
using VPN or TOR browser
Go to TOR browser Enable VPN
×

No available domains were found
It seems the domains have been blocked ...

Hhhmmm ... But which domains are we talking about here ?
Could it be those that I mention previously that I got with "iftop" ?

Like

hostedby.packetbunker.com/

or now this

feature.youaredbest.com ?

gigabyty:52286                 <=> feature.youaredbest.com:443        0B   1.90KB   486B
gigabyty:55792                 <=> z-lib.org:443                      0B    688B    172B
gigabyty:52672                 <=> _gateway:53                        0B     25B      6B
gigab

$ ping hostedby.packetbunker.com

ping: hostedby.packetbunker.com: Name or service not known

$ ping feature.youaredbest.com

ping: feature.youaredbest.com: Name or service not known

So, I went to check them out with dig,

feature.youaredbest.com
hostedby.packetbunker.com

And in fact it appears so. They are not being resolved:

dig feature.youaredbest.com
dig @8.8.8.8 feature.youaredbest.com
dig @1.1.1.1 feature.youaredbest.com

Will always return something like:

; <<>> DiG 9.18.2 <<>> @8.8.8.8 feature.youaredbest.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 15186
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;feature.youaredbest.com.       IN      A

;; Query time: 0 msec
;; SERVER: 8.8.8.8#53(8.8.8.8) (UDP)
;; WHEN: Wed Apr 27 02:12:27 WEST 2022
;; MSG SIZE  rcvd: 52

NXDOMAIN. That means that neither the DNS of my ISP, Google(8.8.8.8), or Cloudflare(1.1.1.1) will resolve these domains.

The question is why can I use Libgen/Scihub/Z-lib etc without any problems with Firefox ?

I am no bash expert. But I love it and am a big fan of simple solutions and cli scripting without complicated libraries or python. And I am only now starting to understand the logic of bookmenu.

It first contacts thing like

URL1="https://it1lib.org/s"
URL2="http://library.lol/main"
URL3="https://ipfs.io/ipfs"

These are OK and not blocked. But from these it gets "unpredictevly" some other random domains where the "final" libgen content is. It will them try to scrape/grep/wget to get the final url of the book.

Couldnt the logic of "bookmenu" be changed so that it "scrapes" or uses the same domains that Firefox uses ? Is it impossible to make it work without accessing these heavly blocked domains ?

Or is this just not possible with simple bash parsing ? Would it only be possible with a command line headless Firefox or Chrome puppet that handle javascript ?

This is all very puzzling as I can perfectly use libgen.is also in w3m (command line text browser) without any javascript at all.

as i suspected this is a networking issue related to the first domain.
i'm currently unable to update the script and implement a better scraping method.
you should replace url1 with another proxy.
en.it1lib.org and it1lib.org both work for me.

Hhhmmm ... But which domains are we talking about here ?
Could it be those that I mention previously that I got with "iftop" ?

i think z-library tries to find the best domains based on your geolocation
i have no idea why loading the website with wget gets you that error page but opening it with firefox doesn't. it's probably javascript.

So, in summary, the workaround that I think was given here and worked for me is: first put URL1 without the suffix "/s" in your browser, then after it resolves and give you a different url, you put said url, with the suffix "/s", in URL1. In my case it ended up as URL1="https://b-ok.lat/s"

thanks @CarmeloMaitaO , so picking the right proxy fixes the problem