GithubHelp home page GithubHelp logo

felixfrog / pdfgrabber Goto Github PK

View Code? Open in Web Editor NEW
81.0 5.0 13.0 224 KB

Download PDF books from bSmart, Pearson, Oxford, and many more!

License: GNU Affero General Public License v3.0

Python 100.00%
downloader ebook-downloader macmillanlearning oxford pdf pearson-downloader cambridge-downloader

pdfgrabber's People

Contributors

bbalduzz avatar felixfrog avatar gabboxl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pdfgrabber's Issues

Oxford Learner's Bookshelf - list index out of range

Ho molti libri oxford e nello scaricare la lista lo script ha restituito l'errore

Choose a service [bsm/ees/hby/mcm/myl/prn/sbk/znc/dbk/olb]: olb
Do you have a token for Oxford Learner’s Bookshelf? [y/n] (n): n
Oxford Learner’s Bookshelf username: (redacted email)
Oxford Learner’s Bookshelf password:
Logged in, your token is
(redacted token)
Traceback (most recent call last):
File "/Users/luigi/Documents/pdfgrabber-master/main.py", line 173, in
main()
File "/Users/luigi/Documents/pdfgrabber-master/main.py", line 159, in main
downloadbook()
File "/Users/luigi/Documents/pdfgrabber-master/main.py", line 99, in downloadbook
coverpath = utils.cover(service, token, bid, book)
File "/Users/luigi/Documents/pdfgrabber-master/utils.py", line 52, in cover
open(coverpath, "wb").write(service.cover(token, bookid, data))
File "/Users/luigi/Documents/pdfgrabber-master/services/olb.py", line 125, in cover
book = bookinfo["msg"]["content_list"][0]
IndexError: list index out of range
luigi@George pdfgrabber-master %

Problema Pearson Etext

Ciao, per prima cosa ti ringrazio per ciò che fai, io ho un problema con un solo libro della Pearson (Engage 2 PLUS)

Ti lascio lo screen del cmd/powershell
io ho anche la zip che contiene l'epub ma è protetta da password se ti può essere utile te la posso dare
image

Supporto per Digimparo

Ciao,
Mi chiedevo se ci fosse la possibilità di aggiungere il supporto anche per Digimparo, la piattaforma di il Capitello, vorrei scaricare dei libri ma non riesco a farlo.
Grazie

libri pearson

Dopo aver eseguito main.py, fatto accesso, scelto libri pearson, immesso le credenziali di Pearson, ricevo questo errore

Traceback (most recent call last):
File "C:\Users\david\Downloads\pdfgrabber-master (1)\rebuilt.pdfgrabber-master (1)\pdfgrabber-master\main.py", line 194, in
main()
File "C:\Users\david\Downloads\pdfgrabber-master (1)\rebuilt.pdfgrabber-master (1)\pdfgrabber-master\main.py", line 178, in main
downloadbook()
File "C:\Users\david\Downloads\pdfgrabber-master (1)\rebuilt.pdfgrabber-master (1)\pdfgrabber-master\main.py", line 78, in downloadbook
token = utils.login(service, username, password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\david\Downloads\pdfgrabber-master (1)\rebuilt.pdfgrabber-master (1)\pdfgrabber-master\utils.py", line 20, in login
service = getservice(servicename)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\david\Downloads\pdfgrabber-master (1)\rebuilt.pdfgrabber-master (1)\pdfgrabber-master\utils.py", line 16, in getservice
service = importlib.import_module("services." + name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1206, in _gcd_import
File "", line 1178, in _find_and_load
File "", line 1142, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'services.prn'

Come risolvo? Non sono molto esperto

bSmart doesn't work.

With every bSmart download, I have:

``
Traceback (most recent call last):
File "/home/jacula/Temp/pdfgrabber/main.py", line 235, in
main()

File "/home/jacula/Temp/pdfgrabber/main.py", line 217, in main
downloadbook()

File "/home/jacula/Temp/pdfgrabber/main.py", line 144, in downloadbook
pdfpath = utils.downloadbook(service, token, bookid, books[bookid], progressfun)

File "/home/jacula/Temp/pdfgrabber/utils.py", line 41, in downloadbook
pdf = service.downloadbook(token, bookid, data, progress)

File "/home/jacula/Temp/pdfgrabber/services/bsm.py", line 103, in downloadbook
output, md5 = decryptfile(file)

File "/home/jacula/Temp/pdfgrabber/services/bsm.py", line 51, in decryptfile
dec = obj.decrypt(file.read(header[b"start"] - 256 - 16))
``

Error "page number out of range"

Ho scaricato un paio di libri da Scuolabook, ma quando provo a scaricare un determinato libro (storia), ottengo questo errore:

Traceback (most recent call last):
  File "C:\Users\Tabià\Downloads\pdfgrabber-master\main.py", line 235, in <module>
    main()
  File "C:\Users\Tabià\Downloads\pdfgrabber-master\main.py", line 217, in main
    downloadbook()
  File "C:\Users\Tabià\Downloads\pdfgrabber-master\main.py", line 144, in downloadbook
    pdfpath = utils.downloadbook(service, token, bookid, books[bookid], progressfun)
  File "C:\Users\Tabià\Downloads\pdfgrabber-master\utils.py", line 41, in downloadbook
    pdf = service.downloadbook(token, bookid, data, progress)
  File "C:\Users\Tabià\Downloads\pdfgrabber-master\services\sbk.py", line 189, in downloadbook
    pdf.set_toc(toc)
  File "C:\Users\Tabià\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\fitz\utils.py", line 1330, in set_toc
    raise ValueError("row %i: page number out of range" % i)
ValueError: row 4: page number out of range

problema username & password

buongiorno, sono riuscita ad avviare il programma, ma non mi fa inserire la password (ho provato a digitare più volte, ma non mi inserisce niente). Come potrei "sboccare" questo problema?

Scuolabook ends its service

Informazione per chi riscontrera' problemi con Scuolabook

image

Transcript:

GENTILE UTENTE,
Scuolabook cessa la sua decennale attività al servizio delle scuole, dei docenti, degli studenti e delle famiglie.

  • Dallo scorso 15 luglio non è più possibile effettuare nuovi acquisti di libri in formato digitale o procedere a nuove iscrizioni a >corsi di formazione
  • Dal prossimo 30 settembre non si potranno più utilizzare codici coupon per scaricare gratuitamente copie di libri cartacei in >formato digitale
  • Fino al 31.12.2023 resta comunque disponibile la consultazione dei testi già presenti sulla tua libreria

Per rendere la transizione il più agevole possibile, ti indichiamo di seguito, il link su cui potrai reperire, a partire dal 1° ottobre, i testi scolastici delle case editrici che hanno provveduto a comunicarlo:

Tutte le sovracitate case editrici adotteranno bsmart

Syntax error

Ciao Francesco, ho appena scaricato il tuo script su consiglio di un altro sviluppatore github, ma lanciandolo ottengo un syntax error e il programma si blocca. Uso piattaforma macOS 12.6.

luigi@George pdfgrabber-master % python3 main.py
File "/Users/luigi/Documents/pdfgrabber-master/main.py", line 151
match action:
^
SyntaxError: invalid syntax
luigi@George pdfgrabber-master %

Grazie per l'aiuto.

FileNotFoundError when reaching 1/3 of the book on Zanichelli Reader

I don't know why it stops at exactly the 175th page of the book everytime i try to download it, no errors while downloading other books but this one that i recently added to my library give the same error everytime, here's python traceback:

Traceback (most recent call last):
File "C:\Users\riccw\Desktop\pdfgrabber-master\main.py", line 245, in
main()
File "C:\Users\riccw\Desktop\pdfgrabber-master\main.py", line 227, in main
downloadbook()
File "C:\Users\riccw\Desktop\pdfgrabber-master\main.py", line 153, in downloadbook
pdfpath = utils.downloadbook(service, token, bookid, books[bookid], progressfun)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\riccw\Desktop\pdfgrabber-master\utils.py", line 41, in downloadbook
pdf = service.downloadbook(token, bookid, data, progress)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\riccw\Desktop\pdfgrabber-master\services\znc.py", line 366, in downloadbook
pdf, toc, labels = downloadkitaboo(token, bookid, pdf, toc, labels, progress, skipfirst)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\riccw\Desktop\pdfgrabber-master\services\znc.py", line 296, in downloadkitaboo
sizematch = re.search('content.+?width\s?=\s?([0-9]+).+?height\s?=\s?([0-9]+)', open(fullpath, encoding="utf-8").read())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\riccw\AppData\Local\Temp\kitaboo.5oxgllyy\OPS\page0175.xhtml'

Errore da Zanichelli

Traceback (most recent call last):dfgrabber-master\main.py", line 235, in <module>
  File "C:\Users\Tabià\Downloads\pdfgrabber-master\main.py", line 235, in <module>
    main()\Users\Tabià\Downloads\pdfgrabber-master\main.py", line 217, in main
  File "C:\Users\Tabià\Downloads\pdfgrabber-master\main.py", line 217, in main
    downloadbook()abià\Downloads\pdfgrabber-master\main.py", line 144, in downloadbook
  File "C:\Users\Tabià\Downloads\pdfgrabber-master\main.py", line 144, in downloadbook
    pdfpath = utils.downloadbook(service, token, bookid, books[bookid], progressfun)ok
  File "C:\Users\Tabià\Downloads\pdfgrabber-master\utils.py", line 41, in downloadbook
    pdf = service.downloadbook(token, bookid, data, progress)nc.py", line 358, in downloadbook
  File "C:\Users\Tabià\Downloads\pdfgrabber-master\services\znc.py", line 358, in downloadbook
    pdf, toc, labels = downloadkitaboo(token, bookid, pdf, toc, labels, progress, skipfirst)taboo
  File "C:\Users\Tabià\Downloads\pdfgrabber-master\services\znc.py", line 257, in downloadkitaboo
    browser = p.chromium.launch()cal\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packag
  File "C:\Users\Tabià\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\sync_api\_generated.py", line 14083, in launch
    self._sync(s\Tabià\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packag
  File "C:\Users\Tabià\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_sync_base.py", line 104, in _sync
    return task.result()ppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packag
  File "C:\Users\Tabià\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_browser_type.py", line 93, in launch
    Browser, from_channel(await self._channel.send("launch", params))n.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packag
  File "C:\Users\Tabià\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_connection.py", line 44, in send
    return await self._connection.wrap_api_call(thonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packag
  File "C:\Users\Tabià\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_connection.py", line 419, in wrap_api_call
    return await cb()à\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packag
  File "C:\Users\Tabià\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_connection.py", line 79, in inner_send
    result = next(iter(done)).result()cutable doesn't exist at C:\Users\Tabià\AppData\Local\ms-playwright\chromium-1041\
playwright._impl._api_types.Error: Executable doesn't exist at C:\Users\Tabià\AppData\Local\ms-playwright\chromium-1041\chrome-win\chrome.exe════════════════════════════════════════╗
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated.       ║
║ Please run the following command to download new browsers: ║
║                                                            ║
║     playwright install                                     ║
║                                                            ║
║ <3 Playwright Team                                         ║
╚════════════════════════════════════════════════════════════╝

Ho rieseguito il comando pip install -r requirements.txt, e sono riuscito ad entrare, ma ora quando provo a scaricare un libro ho questo errore.

Pearson download

Quando accedo con il mio account e password, mi restituisce questi errori:

Traceback (most recent call last):
File "C:\Users\Gabriele\Downloads\pdfgrabber-master\main.py", line 235, in
main()
File "C:\Users\Gabriele\Downloads\pdfgrabber-master\main.py", line 217, in main
downloadbook()
File "C:\Users\Gabriele\Downloads\pdfgrabber-master\main.py", line 86, in downloadbook
token = utils.login(service, username, password)
File "C:\Users\Gabriele\Downloads\pdfgrabber-master\utils.py", line 29, in login
service = getservice(servicename)
File "C:\Users\Gabriele\Downloads\pdfgrabber-master\utils.py", line 25, in getservice
service = importlib.import_module("services." + name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'services.prn'

Cosa posso fare?

Bsmart Issue

Traceback (most recent call last):
File "/home/panda/pdfgrabber/main.py", line 194, in
main()
File "/home/panda/pdfgrabber/main.py", line 178, in main
downloadbook()
File "/home/panda/pdfgrabber/main.py", line 134, in downloadbook
pdfpath = utils.downloadbook(service, token, bookid, books[bookid], progressfun)
File "/home/panda/pdfgrabber/utils.py", line 34, in downloadbook
pdf = service.downloadbook(token, bookid, data, progress)
File "/home/panda/pdfgrabber/services/bsm.py", line 80, in downloadbook
if i["resource_type_id"] != 14:
TypeError: string indices must be integers

Penso che sia per via del fatto che l'anteprima è scaduta..per caso c'è un modo per aggirare questo blocco? Grazie in anticipo!
Ne approfitto anche per elogiare il creatore questo mini-programmino a dir poco fantastico, per easyeschool non c'era quasi nulla :)

Download tramite Pearson non funzionante - Login a Reader+ restituisce 401

Ciao! Intanto ti ringrazio per aver portato avanti questo progetto che sono sicuro mi sarà molto utile e comodo.

Stavo provando ad utilizzare la funzione di download tramite Pearson: l'account è attivato, un libro collegato e se provo a visitare dal visualizzatore web di Reader+ il libro funziona tutto correttamente. Ho anche installato l'app mobile di Reader+ per vedere se fosse colpa dei termini e condizioni ma purtroppo nulla.

Il problema è il seguente: durante la chiamata a getrplustoken(username, firstname, lastname), Reader+ restituisce un 401 con il seguente messaggio: User not found in the pulse database.

L'utente, però, esiste: la chiamata alle API di etext infatti funzionano correttamente restituendo le informazioni su di me.

Questo chiaramente non mi permette di loggare in Pearson perchè il token non è valorizzato nella risposta alla chiamata che ho descritto sopra.

Ho provato a loggare sia con l'username che con l'indirizzo e-mail.

Sto sbagliando qualcosa? O c'è qualcosa che in generale posso fare per aiutare a debuggare?

Grazie mille ancora per il progetto!

errore iniziale

Premetto che non sono molto esperto in programmazione, ma quando eseguo "python main.py", mi restituisce il seguente errore:

Traceback (most recent call last):
  File "C:\Users\Downloads\pdfgrabber-master\main.py", line 1, in <module>
    import utils
  File "C:\Users\Downloads\pdfgrabber-master\utils.py", line 2, in <module>
    import fitz
ModuleNotFoundError: No module named 'fitz'

Ho la versione 3.10 di Python.
Qualcuno può aiutarmi? Grazie in anticipo

Zanichelli link changes

Mi pare di capire che Zanichelli ha appena modificato la codifica del link, ora è:

https://webmy.zanichelli.it/ebook/XXXXXXXXXXXXX?origPlatform=https://my.zanichelli.it&origSection=bookmarks&_gl=1*1mehjuz*_ga*NjM5NzczNDA1LjE2ODEzNzE3MTI.*_ga_FL8QBN8HHQ*MTY4MTQ5MzU0MS43LjEuMTY4MTQ5Njk3MS4wLjAuMA..

Questa diventa la nuova interfaccia web di lettura:

https://webreader.zanichelli.it/6.0/zanichelli/#/reader?mode=online

E le (immagini delle) pagine mi sembrano queste:

https://.../page0010.svgz

Lo script attualmente salva il file pdf, ma solo la prima pagina risulta visibile...

Supporto per Raffaello Player

Ciao,
Mi chiedevo se ci fosse la possibilità di aggiungere il supporto anche per Raffaello, ho dei libri che vorrei salvare in PDF ma non riesco in modo autonomo.
Grazie.

Supporto a MyPearsonPlace

Salve, volevo sapere se in futuro prossimo verrà aggiunto il supporto al download per MyPearsonPlace dato che esso non ha nemmeno un'app per rendere disponibili i libri Offline è molto scomodo, grazie in anticipo.

bSmart error

Traceback (most recent call last):────┘
File "C:\Users\Edo\Desktop\Cuji\pdfgrabber-master\main.py", line 235, in
main()
File "C:\Users\Edo\Desktop\Cuji\pdfgrabber-master\main.py", line 217, in main
downloadbook()
File "C:\Users\Edo\Desktop\Cuji\pdfgrabber-master\main.py", line 144, in downloadbook
pdfpath = utils.downloadbook(service, token, bookid, books[bookid], progressfun)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Edo\Desktop\Cuji\pdfgrabber-master\utils.py", line 41, in downloadbook
pdf = service.downloadbook(token, bookid, data, progress)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Edo\Desktop\Cuji\pdfgrabber-master\services\bsm.py", line 103, in downloadbook
output, md5 = decryptfile(file)
^^^^^^^^^^^^^^^^^
File "C:\Users\Edo\Desktop\Cuji\pdfgrabber-master\services\bsm.py", line 47, in decryptfile
header = msgpack.unpackb(file.read(256).rstrip(b"\x00"))
^^^^^^^
NameError: name 'msgpack' is not defined. Did you mean: 'umsgpack'?

Start problem

When i run "python3 main.py", there are this error:

File "C:\Users\User\Downloads\pdfgrabber-master\main.py", line 213
match action:
^
SyntaxError: invalid syntax
PS C:\Users\User\Downloads\pdfgrabber-master>

Someone can help me?
Thanks :)

Add VitalSource support

Ciao, innanzitutto vorrei ringraziarti per aver sviluppato questo programma, mi sta semplificando di molto lo studio :)

Volevo chiederti se ci fosse la possibilità di aggiungere la biblioteca di VitalSource alle opzioni di download.

Se sì, fammi sapere come posso esserti utile in fase di testing, mi farebbe piacere dare una mano!

errore playwright Timeout 30000ms exceeded.

ciao sto usando grazie anche alle dritte di un amico questo tuo utilissimo script . ho riscontrato difficoltà per ora solo da zanichelli nel rendering in pdf dei libri ti allego file log ;

└────┴───────────────┴───────────────────────────────────────────────┘
Select a book or a comma-separated list of books: 7
Rendering page 43/46 ━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━ 35% 0:05:39
Traceback (most recent call last):
File "c:\Users\Novelli\Desktop\pdfgrabber\pdfgrabber-master\main.py", line 235, in
main()
File "c:\Users\Novelli\Desktop\pdfgrabber\pdfgrabber-master\main.py", line 217, in main
downloadbook()
File "c:\Users\Novelli\Desktop\pdfgrabber\pdfgrabber-master\main.py", line 144, in downloadbook
pdfpath = utils.downloadbook(service, token, bookid, books[bookid], progressfun)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\Novelli\Desktop\pdfgrabber\pdfgrabber-master\utils.py", line 41, in downloadbook
pdf = service.downloadbook(token, bookid, data, progress)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\Novelli\Desktop\pdfgrabber\pdfgrabber-master\services\znc.py", line 324, in downloadbook
pdf, toc, labels = downloadkitaboo(token, bookid, pdf, toc, labels, progress, skipfirst)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\Novelli\Desktop\pdfgrabber\pdfgrabber-master\services\znc.py", line 261, in downloadkitaboo
bpage.goto(fullpath.as_uri())
File "C:\Users\Novelli\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright\sync_api_generated.py", line 8200, in
goto
self._sync(
File "C:\Users\Novelli\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright_impl_sync_base.py", line 104, in _sync
return task.result()
^^^^^^^^^^^^^
File "C:\Users\Novelli\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright_impl_page.py", line 491, in goto
return await self._main_frame.goto(**locals_to_params(locals()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Novelli\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright_impl_frame.py", line 147, in goto
await self._channel.send("goto", locals_to_params(locals()))
File "C:\Users\Novelli\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright_impl_connection.py", line 44, in send return await self._connection.wrap_api_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Novelli\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright_impl_connection.py", line 419, in wrap_api_call
return await cb()
^^^^^^^^^^
File "C:\Users\Novelli\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright_impl_connection.py", line 79, in inner_send
result = next(iter(done)).result()
^^^^^^^^^^^^^^^^^^^^^^^^^
playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
navigating to "file:///C:/Users/Novelli/AppData/Local/Temp/kitaboo.0n8o21r1/OPS/page0239.xhtml", waiting until "load"

PS C:\Users\Novelli>

raise ValueError("row %i: page number out of range" % i)

Ciao,
nello scaricaricare un libro da Mondadori hub scuola lo script ritorna il seguente codice di errore:

Applying toc/labels --------------------------------------- 98% 0:00:01 Traceback (most recent call last): File "G:\Path\pdfgrabber\pdfgrabber-master\main.py", line 235, in <module> main()Avaliable services File "G:\Path\pdfgrabber\pdfgrabber-master\main.py", line 217, in main downloadbook() │ File "G:\Path\pdfgrabber\pdfgrabber-master\main.py", line 144, in downloadbook pdfpath = utils.downloadbook(service, token, bookid, books[bookid], progressfun) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\Path\pdfgrabber\pdfgrabber-master\utils.py", line 41, in downloadbook pdf = service.downloadbook(token, bookid, data, progress) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\Path\pdfgrabber\pdfgrabber-master\services\hbs.py", line 167, in downloadbook pdf = downloadbook_new(token, bookid, data, progress) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\Path\pdfgrabber\pdfgrabber-master\services\hbs.py", line 160, in downloadbook_new pdf.set_toc(toc)ner’s Bookshelf │ File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\fitz\utils.py", line 1330, in set_toc raise ValueError("row %i: page number out of range" % i) ValueError: row 30: page number out of rangek/znc/dbk/olb/rfl]: hbs

NOTA: Tutto OK con altri 4 libri

Cosa posso fare?

main.py

Premetto che non sono molto esperto. Una volta eseguito main.py si apre una pagina tutta nera di cmd che si chiude subito dopo. Successivamente si crea una cartella (dentro la cartella pdf grabber) chiamata pycache, con all'interno un file chiamato utils.cpython-311.pyc. Come posso risolvere il fatto che non esegue main.py? Ringrazio in anticipo

Python

Nonostante abbia python installato, mi dice sempre "Python non trovato; Esegui senza argomenti per installare da Microsoft Store o disabilitare il collegamento da impostazioni > Gestisci app Alias di esecuzione."

KeyError: b'start' su bSmart

Nel download di libri bSmart ottengo questo error
Traceback (most recent call last):
File "C:\Users\franc\reBooks\pdfgrabber\main.py", line 235, in
main()
File "C:\Users\franc\reBooks\pdfgrabber\main.py", line 217, in main
downloadbook()
File "C:\Users\franc\reBooks\pdfgrabber\main.py", line 144, in downloadbook
pdfpath = utils.downloadbook(service, token, bookid, books[bookid], progressfun)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\franc\reBooks\pdfgrabber\utils.py", line 41, in downloadbook
pdf = service.downloadbook(token, bookid, data, progress)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\franc\reBooks\pdfgrabber\services\bsm.py", line 103, in downloadbook
output, md5 = decryptfile(file)
^^^^^^^^^^^^^^^^^
File "C:\Users\franc\reBooks\pdfgrabber\services\bsm.py", line 51, in decryptfile
dec = obj.decrypt(file.read(header[b"start"] - 256 - 16))
~~~~~~^^^^^^^^^^
KeyError: b'start'
durante il "Decrypting pages"

Feature Request -- Allow for download of Pearson/Sanoma Libri Liquidi Digitali.

Title! It should be pretty easy, given that the infrastructure for authentication management is basically the same as for eTexts etc.
Books are in links like this:https://mediaserver.pearsonitalia.it/2021/read/PR0395001789VA_filesist1A/090_05_chapter.xhtml
with the name of the file incrementing.
The files could then be ported over to markdown with the python equivalent of Readability.js. I currently set up a macro that uses the MarkDownload extension and it works ok.

Nessun libro rilevato su Pearson

Salve, lo script non riesce a rilevare i libri registrati su Pearson. Il libro sulla piattaforma Pearson è consultabile dal sito "hemoodle", immagino sia questo il "problema", non so se è legato solo al libro in se. É possibile aggiornare il bot a riguardo?

Visualizzare più di 10 libri

ciao, sul mio account booktab avendo tutti i libri che ho usato(quindi anche quelli delle medie), in totale sono più di 10. C'è un modo di visualizzarne più di 10?

kitaboo oneshot

ciao, innanzitutto grazie mille per questo tool!

Ho un problema con kitaboo., una volta incollato il link nel formato https://my.zanichelli.it/kitaboo/8de675b4d3b9a9ba1cd08eac93f65530 ad esempio, ottengo questo errore

Kitaboo url: https://my.zanichelli.it/kitaboo/8de675b4d3b9a9ba1cd08eac93f65530
Starting... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:--
Traceback (most recent call last):
File "/Users/dani/Desktop/pdfgrabber-master/main.py", line 222, in
main()
File "/Users/dani/Desktop/pdfgrabber-master/main.py", line 206, in main
downloadoneshot()
File "/Users/dani/Desktop/pdfgrabber-master/main.py", line 160, in downloadoneshot
pdfpath = utils.downloadoneshot(service, url, progressfun)
File "/Users/dani/Desktop/pdfgrabber-master/utils.py", line 53, in downloadoneshot
result = service.downloadbook(url, progress)
File "/Users/dani/Desktop/pdfgrabber-master/services/oneshot/ktb.py", line 25, in downloadbook
usertoken = tokenvalidation["userToken"]
KeyError: 'userToken'

ho letto che il file ktb.py è ancora in via di sviluppo ma, perlomeno con il mio libro, il formato delle pagine è in xhtml non in svg
lo schema dell'url è il seguente
"https://webreader.zanichelli.it/ContentServer/mvc/s3view/1568472/fixed_epub_image/1568472/OEBPS/Text/Parte01.xhtml"
e le immagini qui presenti sono a loro volta contenute a loro volta in pagine xhtml.

ho provato per lo stesso libro un altro script su github (in cui avevo aperto una segnalazione) https://github.com/Leone25/kitaboo-downloader che svolge lo stesso compito ma purtroppo non ha funzionato

Pearson Token Error When trying to download

Choose a service [bsm/ees/hbs/mcm/myl/prs/sbk/znc/dbk/olb/rfl]: prs Do you have a token for Pearson eText / Reader+? [y/n] (n):

Traceback (most recent call last):
File "/Users/j/Downloads/pdfgrabber-master/main.py", line 235, in
main()
File "/Users/j/Downloads/pdfgrabber-master/main.py", line 217, in main
downloadbook()
File "/Users/j/Downloads/pdfgrabber-master/main.py", line 86, in downloadbook
token = utils.login(service, username, password)
File "/Users/j/Downloads/pdfgrabber-master/utils.py", line 30, in login
token = service.login(username, password)
File "/Users/j/Downloads/pdfgrabber-master/services/prs.py", line 187, in login
rplususerinfo = getrplususerinfo(rplustoken["token"])
KeyError: 'token'

Pearson token error

Traceback (most recent call last):
File "/home/xxxxxx/Scaricati/pdfgrabber-master/main.py", line 235, in
main()
File "/home/xxxxxx/Scaricati/pdfgrabber-master/main.py", line 217, in main
downloadbook()
File "/home/xxxxxx/Scaricati/pdfgrabber-master/main.py", line 86, in downloadbook
token = utils.login(service, username, password)
File "/home/xxxxxx/Scaricati/pdfgrabber-master/utils.py", line 30, in login
token = service.login(username, password)
File "/home/xxxxxx/Scaricati/pdfgrabber-master/services/prs.py", line 187, in login
rplususerinfo = getrplususerinfo(rplustoken["token"])
KeyError: 'token'

dubbio scuolabook

ciao se uso lo script per scuolabook mi vale come nuova installazione ? visto che è molto restrittivo nell'uso della app solo due cioè su due dispositivi , con il cambio di due device all'anno, non vorrei giocarmi quelle. grazie

Libri Pearson errori

Alcuni testi della Pearson non vengono scaricati generando un errore dopo il 20/30%.
Questo è un esempio di codice che viene visualizzato:
Traceback (most recent call last):
File "/Users/utente/Downloads/pdfgrabber-master/main.py", line 187, in
main()
File "/Users/utente/Downloads/pdfgrabber-master/main.py", line 171, in main
downloadbook()
File "/Users/utente/Downloads/pdfgrabber-master/main.py", line 129, in downloadbook
pdfpath = utils.downloadbook(service, token, bookid, books[bookid], progressfun)
File "/Users/utente/Downloads/pdfgrabber-master/utils.py", line 34, in downloadbook
pdf = service.downloadbook(token, bookid, data, progress)
File "/Users/utente/Downloads/pdfgrabber-master/services/prn.py", line 322, in downloadbook
pdf = downloadrplusepub(data["url"], data["pwd"], progress)
File "/Users/utente/Downloads/pdfgrabber-master/services/prn.py", line 294, in downloadrplusepub
toc.extend(gentoc(tocitem.find("xhtml:ol", ns), 1, pages))
File "/Users/utente/Downloads/pdfgrabber-master/services/prn.py", line 247, in gentoc
toc.append([level, text, pages.index(href.split("#")[0]) + 1])
ValueError: 'https://link.pearson.it/216DBE8' is not in list

se ebook multimediale, crea un pdf funzionante, ma non riempie l'intera pagina

Salve, questo script è uno spettacolo , ancora davvero grazie!

Una cosa da niente, una piccolezza, ma che non rende la lettura da tablet proprio comoda: quando scarico da znc un libro taggato come ebook multimediale, il pdf risulta funzionante e completo, ma ogni pagina è ridimensionata per riempire solo circa 3/4 in alto a sx della pagina intera. è possibile ridimensionarli a tutta pagina?

Grazie in anticipo, e ancora davvero grazie

bsmart e booktab errore download

Ho provato a scaricare dei libri da booktab e bsmart (stesso libro della zanichelli), ma il download non parte.
Ecco l'errore:
Schermata 2022-10-18 alle 19 50 24
Schermata 2022-10-18 alle 19 49 57

Problema installazione

Buongiorno @FelixFrog @Bbalduzz , sono un neofita di Python e non so veramente come installare pdfgrabber in Python. Vorrei che qualcuno mi spiegasse come fare perché ho bisogno di consultare un libro di Pearson. Tra l'altro poi vorrei capire come fare per scaricarlo. Grazie mille della disponibilità.

Palumbo editore

ciao felix , ti avevo contattato anche su Telegram a proposito di Palumbo editore , poi non ho più avuto notizie :) è successo qualcosa ciao grazie in ogni caso

Pearson

dopo aver scaricato lo script nuovo continua a darmi lo stesso errore su pearson

[SOLVED] Playwright Error - Ubuntu 22.04

Trying downloading Kitaboo's books, i was getting this error:
playwright._impl._api_types.Error: Executable doesn't exist at [...]

I solved in this way:

  1. pip install playwright --upgrade
  2. playwright install

Errors in ZNC

There wan an error when downloading from znc for some books
Screenshot 2023-09-17 at 08 51 09

problemi nell'avvio dell'app

Buongiorno , scusami se ti disturbo, ma non riesco ad avviare l'applicazione tramite python (e di conseguenza non riesco a scaricare i pdf). Non sono molto pratica con python, ma anche seguendo i passaggi che ci sono mi si blocca tutto.

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.