Giter VIP home page Giter VIP logo

bsmart-downloader's Introduction

bSmart-downloader

Download your books from bSmart as offline pdf

How to use

Installation

(NOTE: this assumes you already have node.js)

  1. Download and extract the repo
  2. Open a terminal window in the folder where you extracted the repo
  3. Run npm i to install all the required dependencies

Usage

  1. Open a terminal window in the folder where you extracted the repo
  2. Run node index.js
  3. Open bSmart in your browser, then open the dev tools (F12) and go to the storage(Firefox) or application(Chromium) tab, there click on Cookie, then https://my.bsmart.it, then copy in the terminal the cookie called _bsw_session_v1_production (without any quotation marks)
  4. Input the id of the book you'd like to download, either from the list or from the url, after /books/. It's ususally a 4 digit number
  5. Press enter and the script will start working, a file will be saved in the same folder as the one with the index.js with the name of the book, containing the full book downloaded.

NOTE: some times this doesn't work flawlessly and/or the script crashes saying that _this.catalog.Pages is not a function , I've tryed to fix all the issues I've had but in some cases you might need to do a manual download and merge, for this please download pdftk and run node index.js --pdftk

Further options are available, run node index.js --help for more info.

Enjoy

Remember that you are sesponsible for what you are doing on the internet and even tho this script exists it might not be legal in your country to create personal backups of books.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MIT licence

I may or may not update it depending on my needs tho I'm open to pullup requests ecc.

bsmart-downloader's People

Contributors

chengadev avatar emikodes avatar leone25 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

Watchers

 avatar  avatar  avatar  avatar

bsmart-downloader's Issues

Ordine pagine errato

Ciao, dopo aver scaricato alcuni libri con successo, mi sono accorto che un libro specifico non viene scaricato correttamente. Non viene riportato alcun errore ma le prime pagine, quelle fino all'inizio del primo capitola vengono scaricate per ultime. Cover ed indice, vengono per tanto incollati alla fine del pdf.

Ho tentato di scaricare nuovamente con la flag che permette di scaricare le singole pagine nella cartella temp eseguendo $ node index.js --download-only le pagine nell'ordine spagliato sono quelle numerate da 341-0.pdf in su.

Grazie per questa ottima utility ;)

Questo il report del download:

Please input book id:10549 Downloading pages Progress 0.00% Progress 0.00% Progress 8.33% Progress 8.33% Progress 8.33% Progress 8.60% Progress 8.60% Progress 8.60% Progress 8.87% Progress 8.87% Progress 8.87% Progress 9.14% Progress 9.14% Progress 9.14% Progress 9.41% Progress 9.41% Progress 9.41% Progress 9.68% Progress 9.68% Progress 9.68% Progress 9.95% Progress 9.95% Progress 9.95% Progress 10.22% Progress 10.22% Progress 10.22% Progress 10.48% Progress 10.48% Progress 10.48% Progress 10.75% Progress 10.75% Progress 10.75% Progress 11.02% Progress 11.02% Progress 11.02% Progress 11.29% Progress 11.29% Progress 11.29% Progress 11.56% Progress 11.56% Progress 11.56% Progress 11.83% Progress 11.83% Progress 11.83% Progress 12.10% Progress 12.10% Progress 12.10% Progress 12.37% Progress 12.37% Progress 12.37% Progress 12.63% Progress 12.63% Progress 12.63% Progress 12.90% Progress 12.90% Progress 12.90% Progress 13.17% Progress 13.17% Progress 13.17% Progress 13.44% Progress 13.44% Progress 13.44% Progress 13.71% Progress 13.71% Progress 13.71% Progress 13.98% Progress 13.98% Progress 13.98% Progress 14.25% Progress 14.25% Progress 14.25% Progress 14.52% Progress 14.52% Progress 14.52% Progress 14.78% Progress 14.78% Progress 14.78% Progress 15.05% Progress 15.05% Progress 15.05% Progress 15.32% Progress 15.32% Progress 15.32% Progress 15.59% Progress 15.59% Progress 15.59% Progress 15.86% Progress 15.86% Progress 15.86% Progress 16.13% Progress 16.13% Progress 16.13% Progress 16.40% Progress 16.40% Progress 16.40% Progress 16.67% Progress 16.67% Progress 16.67% Progress 16.94% Progress 16.94% Progress 16.94% Progress 17.20% Progress 17.20% Progress 17.20% Progress 17.47% Progress 17.47% Progress 17.47% Progress 17.74% Progress 17.74% Progress 17.74% Progress 18.01% Progress 18.01% Progress 18.01% Progress 18.28% Progress 18.28% Progress 18.28% Progress 18.55% Progress 18.55% Progress 18.55% Progress 18.82% Progress 18.82% Progress 18.82% Progress 19.09% Progress 19.09% Progress 19.09% Progress 19.35% Progress 19.35% Progress 19.35% Progress 19.62% Progress 19.62% Progress 19.62% Progress 19.89% Progress 19.89% Progress 19.89% Progress 20.16% Progress 20.16% Progress 20.16% Progress 20.43% Progress 20.43% Progress 20.43% Progress 20.70% Progress 20.70% Progress 20.70% Progress 20.97% Progress 20.97% Progress 20.97% Progress 21.24% Progress 21.24% Progress 21.24% Progress 21.51% Progress 21.51% Progress 21.51% Progress 21.77% Progress 21.77% Progress 21.77% Progress 22.04% Progress 22.04% Progress 22.04% Progress 22.31% Progress 22.31% Progress 22.31% Progress 22.58% Progress 22.58% Progress 22.58% Progress 22.85% Progress 22.85% Progress 22.85% Progress 23.12% Progress 23.12% Progress 23.12% Progress 23.39% Progress 23.39% Progress 23.39% Progress 23.66% Progress 23.66% Progress 23.66% Progress 23.92% Progress 23.92% Progress 23.92% Progress 24.19% Progress 24.19% Progress 24.19% Progress 24.46% Progress 24.46% Progress 24.46% Progress 24.73% Progress 24.73% Progress 24.73% Progress 25.00% Progress 25.00% Progress 25.00% Progress 25.27% Progress 25.27% Progress 25.27% Progress 25.54% Progress 25.54% Progress 25.54% Progress 25.81% Progress 25.81% Progress 25.81% Progress 26.08% Progress 26.08% Progress 26.08% Progress 26.34% Progress 26.34% Progress 26.34% Progress 26.61% Progress 26.61% Progress 26.61% Progress 26.88% Progress 26.88% Progress 26.88% Progress 27.15% Progress 27.15% Progress 27.15% Progress 27.42% Progress 27.42% Progress 27.42% Progress 27.69% Progress 27.69% Progress 27.69% Progress 27.96% Progress 27.96% Progress 27.96% Progress 28.23% Progress 28.23% Progress 28.23% Progress 28.49% Progress 28.49% Progress 28.49% Progress 28.76% Progress 28.76% Progress 28.76% Progress 29.03% Progress 29.03% Progress 29.03% Progress 29.30% Progress 29.30% Progress 29.30% Progress 29.57% Progress 29.57% Progress 29.57% Progress 29.84% Progress 29.84% Progress 29.84% Progress 30.11% Progress 30.11% Progress 30.11% Progress 30.38% Progress 30.38% Progress 30.38% Progress 30.65% Progress 30.65% Progress 30.65% Progress 30.91% Progress 30.91% Progress 30.91% Progress 31.18% Progress 31.18% Progress 31.18% Progress 31.45% Progress 31.45% Progress 31.45% Progress 31.72% Progress 31.72% Progress 31.72% Progress 31.99% Progress 31.99% Progress 31.99% Progress 32.26% Progress 32.26% Progress 32.26% Progress 32.53% Progress 32.53% Progress 32.53% Progress 32.80% Progress 32.80% Progress 32.80% Progress 33.06% Progress 33.06% Progress 33.06% Progress 33.33% Progress 33.33% Progress 33.33% Progress 33.60% Progress 33.60% Progress 33.60% Progress 33.87% Progress 33.87% Progress 33.87% Progress 34.14% Progress 34.14% Progress 34.14% Progress 34.41% Progress 34.41% Progress 34.41% Progress 34.68% Progress 34.68% Progress 34.68% Progress 34.95% Progress 34.95% Progress 34.95% Progress 35.22% Progress 35.22% Progress 35.22% Progress 35.48% Progress 35.48% Progress 35.48% Progress 35.75% Progress 35.75% Progress 35.75% Progress 36.02% Progress 36.02% Progress 36.02% Progress 36.29% Progress 36.29% Progress 36.29% Progress 36.56% Progress 36.56% Progress 36.56% Progress 36.83% Progress 36.83% Progress 36.83% Progress 37.10% Progress 37.10% Progress 37.10% Progress 37.37% Progress 37.37% Progress 37.37% Progress 37.63% Progress 37.63% Progress 37.63% Progress 37.90% Progress 37.90% Progress 37.90% Progress 38.17% Progress 38.17% Progress 38.17% Progress 38.44% Progress 38.44% Progress 38.44% Progress 38.71% Progress 38.71% Progress 38.71% Progress 38.98% Progress 38.98% Progress 38.98% Progress 39.25% Progress 39.25% Progress 39.25% Progress 39.52% Progress 39.52% Progress 39.52% Progress 39.78% Progress 39.78% Progress 39.78% Progress 40.05% Progress 40.05% Progress 40.05% Progress 40.32% Progress 40.32% Progress 40.32% Progress 40.59% Progress 40.59% Progress 40.59% Progress 40.86% Progress 40.86% Progress 40.86% Progress 41.13% Progress 41.13% Progress 41.13% Progress 41.40% Progress 41.40% Progress 41.40% Progress 41.67% Progress 41.67% Progress 41.67% Progress 41.94% Progress 41.94% Progress 41.94% Progress 42.20% Progress 42.20% Progress 42.20% Progress 42.47% Progress 42.47% Progress 42.47% Progress 42.74% Progress 42.74% Progress 42.74% Progress 43.01% Progress 43.01% Progress 43.01% Progress 43.28% Progress 43.28% Progress 43.28% Progress 43.55% Progress 43.55% Progress 43.55% Progress 43.82% Progress 43.82% Progress 43.82% Progress 44.09% Progress 44.09% Progress 44.09% Progress 44.35% Progress 44.35% Progress 44.35% Progress 44.62% Progress 44.62% Progress 44.62% Progress 44.89% Progress 44.89% Progress 44.89% Progress 45.16% Progress 45.16% Progress 45.16% Progress 45.43% Progress 45.43% Progress 45.43% Progress 45.70% Progress 45.70% Progress 45.70% Progress 45.97% Progress 45.97% Progress 45.97% Progress 46.24% Progress 46.24% Progress 46.24% Progress 46.51% Progress 46.51% Progress 46.51% Progress 46.77% Progress 46.77% Progress 46.77% Progress 47.04% Progress 47.04% Progress 47.04% Progress 47.31% Progress 47.31% Progress 47.31% Progress 47.58% Progress 47.58% Progress 47.58% Progress 47.85% Progress 47.85% Progress 47.85% Progress 48.12% Progress 48.12% Progress 48.12% Progress 48.39% Progress 48.39% Progress 48.39% Progress 48.66% Progress 48.66% Progress 48.66% Progress 48.92% Progress 48.92% Progress 48.92% Progress 49.19% Progress 49.19% Progress 49.19% Progress 49.46% Progress 49.46% Progress 49.46% Progress 49.73% Progress 49.73% Progress 49.73% Progress 50.00% Progress 50.00% Progress 50.00% Progress 50.27% Progress 50.27% Progress 50.27% Progress 50.54% Progress 50.54% Progress 50.54% Progress 50.81% Progress 50.81% Progress 50.81% Progress 51.08% Progress 51.08% Progress 51.08% Progress 51.34% Progress 51.34% Progress 51.34% Progress 51.61% Progress 51.61% Progress 51.61% Progress 51.88% Progress 51.88% Progress 51.88% Progress 52.15% Progress 52.15% Progress 52.15% Progress 52.42% Progress 52.42% Progress 52.42% Progress 52.69% Progress 52.69% Progress 52.69% Progress 52.96% Progress 52.96% Progress 52.96% Progress 53.23% Progress 53.23% Progress 53.23% Progress 53.49% Progress 53.49% Progress 53.49% Progress 53.76% Progress 53.76% Progress 53.76% Progress 54.03% Progress 54.03% Progress 54.03% Progress 54.30% Progress 54.30% Progress 54.30% Progress 54.57% Progress 54.57% Progress 54.57% Progress 54.84% Progress 54.84% Progress 54.84% Progress 55.11% Progress 55.11% Progress 55.11% Progress 55.38% Progress 55.38% Progress 55.38% Progress 55.65% Progress 55.65% Progress 55.65% Progress 55.91% Progress 55.91% Progress 55.91% Progress 56.18% Progress 56.18% Progress 56.18% Progress 56.45% Progress 56.45% Progress 56.45% Progress 56.72% Progress 56.72% Progress 56.72% Progress 56.99% Progress 56.99% Progress 56.99% Progress 57.26% Progress 57.26% Progress 57.26% Progress 57.53% Progress 57.53% Progress 57.53% Progress 57.80% Progress 57.80% Progress 57.80% Progress 58.06% Progress 58.06% Progress 58.06% Progress 58.33% Progress 58.33% Progress 58.33% Progress 58.60% Progress 58.60% Progress 58.60% Progress 58.87% Progress 58.87% Progress 58.87% Progress 59.14% Progress 59.14% Progress 59.14% Progress 59.41% Progress 59.41% Progress 59.41% Progress 59.68% Progress 59.68% Progress 59.68% Progress 59.95% Progress 59.95% Progress 59.95% Progress 60.22% Progress 60.22% Progress 60.22% Progress 60.48% Progress 60.48% Progress 60.48% Progress 60.75% Progress 60.75% Progress 60.75% Progress 61.02% Progress 61.02% Progress 61.02% Progress 61.29% Progress 61.29% Progress 61.29% Progress 61.56% Progress 61.56% Progress 61.56% Progress 61.83% Progress 61.83% Progress 61.83% Progress 62.10% Progress 62.10% Progress 62.10% Progress 62.37% Progress 62.37% Progress 62.37% Progress 62.63% Progress 62.63% Progress 62.63% Progress 62.90% Progress 62.90% Progress 62.90% Progress 63.17% Progress 63.17% Progress 63.17% Progress 63.44% Progress 63.44% Progress 63.44% Progress 63.71% Progress 63.71% Progress 63.71% Progress 63.98% Progress 63.98% Progress 63.98% Progress 64.25% Progress 64.25% Progress 64.25% Progress 64.52% Progress 64.52% Progress 64.52% Progress 64.78% Progress 64.78% Progress 64.78% Progress 65.05% Progress 65.05% Progress 65.05% Progress 65.32% Progress 65.32% Progress 65.32% Progress 65.59% Progress 65.59% Progress 65.59% Progress 65.86% Progress 65.86% Progress 65.86% Progress 66.13% Progress 66.13% Progress 66.13% Progress 66.40% Progress 66.40% Progress 66.40% Progress 66.67% Progress 66.67% Progress 66.67% Progress 66.94% Progress 66.94% Progress 66.94% Progress 67.20% Progress 67.20% Progress 67.20% Progress 67.47% Progress 67.47% Progress 67.47% Progress 67.74% Progress 67.74% Progress 67.74% Progress 68.01% Progress 68.01% Progress 68.01% Progress 68.28% Progress 68.28% Progress 68.28% Progress 68.55% Progress 68.55% Progress 68.55% Progress 68.82% Progress 68.82% Progress 68.82% Progress 69.09% Progress 69.09% Progress 69.09% Progress 69.35% Progress 69.35% Progress 69.35% Progress 69.62% Progress 69.62% Progress 69.62% Progress 69.89% Progress 69.89% Progress 69.89% Progress 70.16% Progress 70.16% Progress 70.16% Progress 70.43% Progress 70.43% Progress 70.43% Progress 70.70% Progress 70.70% Progress 70.70% Progress 70.97% Progress 70.97% Progress 70.97% Progress 71.24% Progress 71.24% Progress 71.24% Progress 71.51% Progress 71.51% Progress 71.51% Progress 71.77% Progress 71.77% Progress 71.77% Progress 72.04% Progress 72.04% Progress 72.04% Progress 72.31% Progress 72.31% Progress 72.31% Progress 72.58% Progress 72.58% Progress 72.58% Progress 72.85% Progress 72.85% Progress 72.85% Progress 73.12% Progress 73.12% Progress 73.12% Progress 73.39% Progress 73.39% Progress 73.39% Progress 73.66% Progress 73.66% Progress 73.66% Progress 73.92% Progress 73.92% Progress 73.92% Progress 74.19% Progress 74.19% Progress 74.19% Progress 74.46% Progress 74.46% Progress 74.46% Progress 74.73% Progress 74.73% Progress 74.73% Progress 75.00% Progress 75.00% Progress 75.00% Progress 75.27% Progress 75.27% Progress 75.27% Progress 75.54% Progress 75.54% Progress 75.54% Progress 75.81% Progress 75.81% Progress 75.81% Progress 76.08% Progress 76.08% Progress 76.08% Progress 76.34% Progress 76.34% Progress 76.34% Progress 76.61% Progress 76.61% Progress 76.61% Progress 76.88% Progress 76.88% Progress 76.88% Progress 77.15% Progress 77.15% Progress 77.15% Progress 77.42% Progress 77.42% Progress 77.42% Progress 77.69% Progress 77.69% Progress 77.69% Progress 77.96% Progress 77.96% Progress 77.96% Progress 78.23% Progress 78.49% Progress 78.76% Progress 79.03% Progress 79.30% Progress 79.57% Progress 91.67% Progress 91.67% Progress 91.67% Progress 91.94% Progress 91.94% Progress 91.94% Progress 92.20% Progress 92.20% Progress 92.20% Progress 92.47% Progress 92.47% Progress 92.47% Progress 92.74% Progress 92.74% Progress 92.74% Progress 93.01% Progress 93.01% Progress 93.01% Progress 93.28% Progress 93.28% Progress 93.28% Progress 93.55% Progress 93.55% Progress 93.55% Progress 93.82% Progress 93.82% Progress 93.82% Progress 94.09% Progress 94.09% Progress 94.09% Progress 94.35% Progress 94.35% Progress 94.35% Progress 94.62% Progress 94.62% Progress 94.62% Progress 94.89% Progress 94.89% Progress 94.89% Progress 95.16% Progress 95.16% Progress 95.16% Progress 95.43% Progress 95.70% Progress 95.97% Progress 96.24% Progress 96.51% Progress 96.77% Progress 97.04% Progress 97.31% Progress 97.58% Progress 97.58% Progress 97.58% Progress 97.58% Progress 97.58% Progress 97.85% Progress 98.12% Progress 98.39% Progress 98.66% Progress 98.92% Progress 99.19% Progress 99.46% Progress 99.73% Run this command to merge the pages with pdftk: pdftk temp/31-0.pdf temp/32-0.pdf temp/33-0.pdf temp/34-0.pdf temp/35-0.pdf temp/36-0.pdf temp/37-0.pdf temp/38-0.pdf temp/39-0.pdf temp/40-0.pdf temp/41-0.pdf temp/42-0.pdf temp/43-0.pdf temp/44-0.pdf temp/45-0.pdf temp/46-0.pdf temp/47-0.pdf temp/48-0.pdf temp/49-0.pdf temp/50-0.pdf temp/51-0.pdf temp/52-0.pdf temp/53-0.pdf temp/54-0.pdf temp/55-0.pdf temp/56-0.pdf temp/57-0.pdf temp/58-0.pdf temp/59-0.pdf temp/60-0.pdf temp/61-0.pdf temp/62-0.pdf temp/63-0.pdf temp/64-0.pdf temp/65-0.pdf temp/66-0.pdf temp/67-0.pdf temp/68-0.pdf temp/69-0.pdf temp/70-0.pdf temp/71-0.pdf temp/72-0.pdf temp/73-0.pdf temp/74-0.pdf temp/75-0.pdf temp/76-0.pdf temp/77-0.pdf temp/78-0.pdf temp/79-0.pdf temp/80-0.pdf temp/81-0.pdf temp/82-0.pdf temp/83-0.pdf temp/84-0.pdf temp/85-0.pdf temp/86-0.pdf temp/87-0.pdf temp/88-0.pdf temp/89-0.pdf temp/90-0.pdf temp/91-0.pdf temp/92-0.pdf temp/93-0.pdf temp/94-0.pdf temp/95-0.pdf temp/96-0.pdf temp/97-0.pdf temp/98-0.pdf temp/99-0.pdf temp/100-0.pdf temp/101-0.pdf temp/102-0.pdf temp/103-0.pdf temp/104-0.pdf temp/105-0.pdf temp/106-0.pdf temp/107-0.pdf temp/108-0.pdf temp/109-0.pdf temp/110-0.pdf temp/111-0.pdf temp/112-0.pdf temp/113-0.pdf temp/114-0.pdf temp/115-0.pdf temp/116-0.pdf temp/117-0.pdf temp/118-0.pdf temp/119-0.pdf temp/120-0.pdf temp/121-0.pdf temp/122-0.pdf temp/123-0.pdf temp/124-0.pdf temp/125-0.pdf temp/126-0.pdf temp/127-0.pdf temp/128-0.pdf temp/129-0.pdf temp/130-0.pdf temp/131-0.pdf temp/132-0.pdf temp/133-0.pdf temp/134-0.pdf temp/135-0.pdf temp/136-0.pdf temp/137-0.pdf temp/138-0.pdf temp/139-0.pdf temp/140-0.pdf temp/141-0.pdf temp/142-0.pdf temp/143-0.pdf temp/144-0.pdf temp/145-0.pdf temp/146-0.pdf temp/147-0.pdf temp/148-0.pdf temp/149-0.pdf temp/150-0.pdf temp/151-0.pdf temp/152-0.pdf temp/153-0.pdf temp/154-0.pdf temp/155-0.pdf temp/156-0.pdf temp/157-0.pdf temp/158-0.pdf temp/159-0.pdf temp/160-0.pdf temp/161-0.pdf temp/162-0.pdf temp/163-0.pdf temp/164-0.pdf temp/165-0.pdf temp/166-0.pdf temp/167-0.pdf temp/168-0.pdf temp/169-0.pdf temp/170-0.pdf temp/171-0.pdf temp/172-0.pdf temp/173-0.pdf temp/174-0.pdf temp/175-0.pdf temp/176-0.pdf temp/177-0.pdf temp/178-0.pdf temp/179-0.pdf temp/180-0.pdf temp/181-0.pdf temp/182-0.pdf temp/183-0.pdf temp/184-0.pdf temp/185-0.pdf temp/186-0.pdf temp/187-0.pdf temp/188-0.pdf temp/189-0.pdf temp/190-0.pdf temp/191-0.pdf temp/192-0.pdf temp/193-0.pdf temp/194-0.pdf temp/195-0.pdf temp/196-0.pdf temp/197-0.pdf temp/198-0.pdf temp/199-0.pdf temp/200-0.pdf temp/201-0.pdf temp/202-0.pdf temp/203-0.pdf temp/204-0.pdf temp/205-0.pdf temp/206-0.pdf temp/207-0.pdf temp/208-0.pdf temp/209-0.pdf temp/210-0.pdf temp/211-0.pdf temp/212-0.pdf temp/213-0.pdf temp/214-0.pdf temp/215-0.pdf temp/216-0.pdf temp/217-0.pdf temp/218-0.pdf temp/219-0.pdf temp/220-0.pdf temp/221-0.pdf temp/222-0.pdf temp/223-0.pdf temp/224-0.pdf temp/225-0.pdf temp/226-0.pdf temp/227-0.pdf temp/228-0.pdf temp/229-0.pdf temp/230-0.pdf temp/231-0.pdf temp/232-0.pdf temp/233-0.pdf temp/234-0.pdf temp/235-0.pdf temp/236-0.pdf temp/237-0.pdf temp/238-0.pdf temp/239-0.pdf temp/240-0.pdf temp/241-0.pdf temp/242-0.pdf temp/243-0.pdf temp/244-0.pdf temp/245-0.pdf temp/246-0.pdf temp/247-0.pdf temp/248-0.pdf temp/249-0.pdf temp/250-0.pdf temp/251-0.pdf temp/252-0.pdf temp/253-0.pdf temp/254-0.pdf temp/255-0.pdf temp/256-0.pdf temp/257-0.pdf temp/258-0.pdf temp/259-0.pdf temp/260-0.pdf temp/261-0.pdf temp/262-0.pdf temp/263-0.pdf temp/264-0.pdf temp/265-0.pdf temp/266-0.pdf temp/267-0.pdf temp/268-0.pdf temp/269-0.pdf temp/270-0.pdf temp/271-0.pdf temp/272-0.pdf temp/273-0.pdf temp/274-0.pdf temp/275-0.pdf temp/276-0.pdf temp/277-0.pdf temp/278-0.pdf temp/279-0.pdf temp/280-0.pdf temp/281-0.pdf temp/282-0.pdf temp/283-0.pdf temp/284-0.pdf temp/285-0.pdf temp/286-0.pdf temp/287-0.pdf temp/288-0.pdf temp/289-0.pdf temp/290-0.pdf temp/341-0.pdf temp/342-0.pdf temp/343-0.pdf temp/344-0.pdf temp/345-0.pdf temp/346-0.pdf temp/347-0.pdf temp/348-0.pdf temp/349-0.pdf temp/350-0.pdf temp/351-0.pdf temp/352-0.pdf temp/353-0.pdf temp/354-0.pdf cat output "10549 - Corso di Tecnologie elettrico-elettroniche e applicazioni. Vol. 1.pdf" Done

Errore nell'inserimento del valore cookie

Una volta chiesto di inserire il cookie appare questo errore:

TypeError: _bsw_session_v1_production=VTqgqa8qshaZ/Z5l
TgTEpZmIEJx8HmUUNHJqaUAUfFZpa598JYcU47U1+1jgjShYlnlXDqCxJDrXPXCZmJWyXdKSwJHW9pi+
iXGmPJjszWges3ts1jiwTgOew0qWBe0Row0PW909lR3GXgV1lNdRij9HcPnkP5XX8Tq6Z8GI88Bdwp0k
ikEgieyHsQWftsfTwweEGxGS8EHcGU/UeJO4HSlFkJYeaFN8JaeY4KRSmImAiAmzVL1LCfJIGlx9avfx
vUKebxrBeRVJZUmk7wGskW7Zlce8e8n6fz+nyrGwTndVwyFy3SIGxydSCxYRrxyljGzAKSWeCSxVY8yB
dCsZP43BJP7nr232V4CltCy8VGwyRrGtJyfdlh7fyYC6afSnhuld7UtAHSn4nlKl68uv5ALoRqKLcZqe
Ev67Vhrvr2y/clfnLXIGNGeD4/r6Xb/r-yhaMaN8BQibuNttac-Ybfnux3NZJNiUt66f5q6vQS= is n
ot a legal HTTP header value
at validateValue (C:\Users\Desktop\bSmart-downloader-main\node_modul
es\node-fetch\lib\index.js:684:9)
at Headers.append (C:\Users\Desktop\bSmart-downloader-main\node_modu
les\node-fetch\lib\index.js:836:3)
at new Headers (C:\Users\Desktop\bSmart-downloader-main\node_modules
\node-fetch\lib\index.js:761:11)
at new Request (C:\Users\Desktop\bSmart-downloader-main\node_modules
\node-fetch\lib\index.js:1231:19)
at C:\Users\Desktop\bSmart-downloader-main\node_modules\node-fetch\l
ib\index.js:1439:19
at new Promise ()
at fetch (C:\Users\Desktop\bSmart-downloader-main\node_modules\node-
fetch\lib\index.js:1437:9)
at C:\Users\Valerio\Desktop\bSmart-downloader-main\index.js:112:22
at Object. (C:\Users\Desktop\bSmart-downloader-main\index
.js:185:3)
at Module._compile (node:internal/modules/cjs/loader:1155:14)

Scusa la formattazzione ma l'ho copiato direttamente dal cmd.

P.S.: Ho rimosso il mio Account-Name dei percorsi.

Merge request

Ho fatto un fork del progetto per creare un loop che consenta di scaricare più libri alla volta. Vorrei fare una Merge request, però mi sa che devi cambiare i permessi del repository

errore "bad cookie" una volta inserito il token

ogni volta che inserisco il valore del cookie, ricevo l'errore "bad cookie" senza poter arrivare alla lista dei libri. Ho dato un'occhiata negli issues risolti e ho utilizzato, come consigliato, un'estensione per estrarre il valore del cookie in modo che fosse corretto, ma non ha risolto il problema.

errore libri bSmart

            _this.catalog.Pages().traverse(function (node, ref) {
                          ^

TypeError: _this.catalog.Pages is not a function
    at PDFDocument.computePages [as populate] (C:\Users\franc\reBooks\bSmart-downloader\node_modules\pdf-lib\cjs\api\PDFDocument.js:28:27)
    at Cache.access (C:\Users\franc\reBooks\bSmart-downloader\node_modules\pdf-lib\cjs\utils\Cache.js:13:31)
    at PDFDocument.getPages (C:\Users\franc\reBooks\bSmart-downloader\node_modules\pdf-lib\cjs\api\PDFDocument.js:479:31)
    at PDFDocument.<anonymous> (C:\Users\franc\reBooks\bSmart-downloader\node_modules\pdf-lib\cjs\api\PDFDocument.js:648:43)
    at step (C:\Users\franc\reBooks\bSmart-downloader\node_modules\tslib\tslib.js:141:27)
    at Object.next (C:\Users\franc\reBooks\bSmart-downloader\node_modules\tslib\tslib.js:122:57)
    at fulfilled (C:\Users\franc\reBooks\bSmart-downloader\node_modules\tslib\tslib.js:112:62)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.10.0

Download fallito

Progress 66.86%
Error Downloading page {
e: Error: invalid initialation vector size (must be 16 bytes)
at new ModeOfOperationCBC (C:\Users*\Downloads\bSmart\node_modules\aes-js\index.js:439:19)
at C:\Users*
\Downloads\bSmart\index.js:65:26
at process.processTicksAndRejections (node:internal/process/task_queues:95:5),
file: <Buffer 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 46 2d 38 22 3f 3e 0a 3c 45 72 72 6f 72 3e 3c 43 6f 64 ... 193 more bytes>
} 341 0 https://s3-eu-west-1.amazonaws.com/atlas.bsmart.it/d/4/d41d8cd98f00b204e9800998ecf8427e
C:\Users*****\Downloads\bSmart\node_modules\pdf-lib\cjs\utils\validators.js:140
throw new TypeError(exports.createTypeErrorMsg(value, valueName, types));
^

TypeError: pdf must be of type string or Uint8Array or ArrayBuffer, but was actually of type undefined
at exports.assertIs (C:\Users*\Downloads\bSmart\node_modules\pdf-lib\cjs\utils\validators.js:140:11)
at Function. (C:\Users*
\Downloads\bSmart\node_modules\pdf-lib\cjs\api\PDFDocument.js:122:33)
at step (C:\Users*\Downloads\bSmart\node_modules\tslib\tslib.js:141:27)
at Object.next (C:\Users*
\Downloads\bSmart\node_modules\tslib\tslib.js:122:57)
at C:\Users*\Downloads\bSmart\node_modules\tslib\tslib.js:115:75
at new Promise ()
at Object.__awaiter (C:\Users*
\Downloads\bSmart\node_modules\tslib\tslib.js:111:16)
at PDFDocument.load (C:\Users*\Downloads\bSmart\node_modules\pdf-lib\cjs\api\PDFDocument.js:116:24)
at C:\Users*
\Downloads\bSmart\index.js:184:48
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Count to infinity

Ciao, ho dei problemi nel funzionamento del programma. Inserisco numero del libro ed auth_code corretti ma tutte le volte in output ho un conteggio che non termina mai. Solo una volta sono riuscito a scaricare un libro ed, in quel caso, veniva indicata correttamente la percentuale di download.
In tutti gli altri casi ho una stampa infinita di numeri (ben oltre il numero di pagine del libro stesso).
Hai idee su quale possa essere il problema?
Ho capito che vengono scaricati correttamente i libri che hanno come url qualcosa del tipo mybsmart.it/#/books/18554?revision=1 in quelli in cui manca la parte "revision=1" parte il conteggio infinito e nulla viene scaricato.

Mi auto rispondo: necessario sostituire, in quel caso, l'url
https://api.bsmart.it/api/v5/books/{bookId}/1/...
con
https://api.bsmart.it/api/v5/books/{bookId}/0/...

Grazie

Download fallito

Please input book id: 141934
Downloading pages
Progress 0.00%
Progress 0.00%
Progress 3.83%
...
Progress 41.39%
Error Downloading page {
e: Error: invalid initialation vector size (must be 16 bytes)
at new ModeOfOperationCBC (C:\Users\salva\Desktop\bSmart-downloader-main\node_modules\aes-js\index.js:439:19)
at C:\Users\salva\Desktop\bSmart-downloader-main\index.js:22:26
at processTicksAndRejections (node:internal/process/task_queues:96:5),
file: <Buffer 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 46 2d 38 22 3f 3e 0a 3c 45 72 72 6f 72 3e 3c 43 6f 64 ... 193 more bytes>
} 173 0 https://s3-eu-west-1.amazonaws.com/atlas.bsmart.it/d/4/d41d8cd98f00b204e9800998ecf8427e
C:\Users\salva\Desktop\bSmart-downloader-main\node_modules\pdf-lib\cjs\utils\validators.js:140
throw new TypeError(exports.createTypeErrorMsg(value, valueName, types));
^

TypeError: pdf must be of type string or Uint8Array or ArrayBuffer, but was actually of type undefined
at Object.exports.assertIs (C:\Users\salva\Desktop\bSmart-downloader-main\node_modules\pdf-lib\cjs\utils\validators.js:140:11)
at Function. (C:\Users\salva\Desktop\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:122:33)
at step (C:\Users\salva\Desktop\bSmart-downloader-main\node_modules\tslib\tslib.js:141:27)
at Object.next (C:\Users\salva\Desktop\bSmart-downloader-main\node_modules\tslib\tslib.js:122:57)
at C:\Users\salva\Desktop\bSmart-downloader-main\node_modules\tslib\tslib.js:115:75
at new Promise ()
at Object.__awaiter (C:\Users\salva\Desktop\bSmart-downloader-main\node_modules\tslib\tslib.js:111:16)
at Function.PDFDocument.load (C:\Users\salva\Desktop\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:116:24)
at C:\Users\salva\Desktop\bSmart-downloader-main\index.js:106:44
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Codice non trovato

Anche se nella lista compare un codice di un libro e lo provi a scaricare, non viene scaricato. Provedderò comunque a fare un loop per poter provare a scaricare un altro libro o a reinserire il codice, nel caso in cui si inserisca un codice sbagliato.

Aiuto!

Gentilmente, potresti inviarmi un video che mostra come estrarre libri da bsmart e booktab, non sono troppo ferrata in questo e sto riscontrando diverse difficoltà. Te ne sarei grata e chiedo scusa per il disturbo.

Errore durante il download di due libri

Please input book id:99763
Downloading pages
....
Progress 6.05%
C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:28
_this.catalog.Pages().traverse(function (node, ref) {
^

TypeError: _this.catalog.Pages is not a function
at PDFDocument.computePages [as populate] (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:28:27)
at Cache.access (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\utils\Cache.js:13:31)
at PDFDocument.getPages (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:479:31)
at PDFDocument. (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:648:43)
at step (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\tslib\tslib.js:141:27)
at Object.next (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\tslib\tslib.js:122:57)
at fulfilled (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\tslib\tslib.js:112:62)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.17.1


Please input book id:101081
Downloading pages
....
Progress 66.87%
C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:28
_this.catalog.Pages().traverse(function (node, ref) {
^

TypeError: _this.catalog.Pages is not a function
at PDFDocument.computePages [as populate] (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:28:27)
at Cache.access (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\utils\Cache.js:13:31)
at PDFDocument.getPages (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:479:31)
at PDFDocument. (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:648:43)
at step (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\tslib\tslib.js:141:27)
at Object.next (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\tslib\tslib.js:122:57)
at fulfilled (C:\Users\DJLeleX\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\tslib\tslib.js:112:62)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.17.1

Non so se eri a conoscenza di questo problema. Questi due libri non vengono scaricati neanche con altri downloader (ad esempio https://github.com/FelixFrog/pdfgrabber)

bSmart cookies problem

Hello thanks for your work.
I tried to follow the guide for download books from bsmart but I'm stuck at point 3.
I opened the dev tools and application (Chromium) tab, I click on Cookie, then https://my.bsmart.it, but I can't sede and copy the cookie called _bsw_session_v1_production to the terminal.
Could you show me where to retrieve the cookie and how to copy it to the terminal.

thank you so much!

Reperire auth_token

Ciao, scusa il disturbo sono sempre io. Come faccio ad ottenere il token se sul sito di bsmart quando visualizzo il libro non mi lascia fare tasto destro > ispeziona?

Help

Faccio tutto come descritto. Quando incollo (devo premere più volte per farlo) dopo aver premuto invio lo script si chiude senza fare nulla. Il cookie che copio lo trovo in un file .svg è corretto?

Auth Code

Ciao Enrico,
Ho un problema con il programmino
non riesco proprio a trovare l'auth code
non è che mi potresti dare un esempio
Grazie
Carlo

errore con libri contenenti pulsanti di "traduzione"

Ciao, con libri dove ci sono paggine con contenuti multimediali (tipo bottoni di lingua) succede che lo scaricamento si interrompe e si ottiene questo errore
{
filename: 'DEA17C_15052_1AP_036.pdf',
md5: '75fc1cb5717cfd2484f8b1f465dbab32',
orig_size: 230398,
start: 11808,
path: 'pagine'
}
C:\Users\Valerio\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:28
_this.catalog.Pages().traverse(function (node, ref) {
^

TypeError: _this.catalog.Pages is not a function
at PDFDocument.computePages [as populate] (C:\Users\Valerio\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:28:27)
at Cache.access (C:\Users\Valerio\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\utils\Cache.js:13:31)
at PDFDocument.getPages (C:\Users\Valerio\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:479:31)
at PDFDocument. (C:\Users\Valerio\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:648:43)
at step (C:\Users\Valerio\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\tslib\tslib.js:141:27)
at Object.next (C:\Users\Valerio\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\tslib\tslib.js:122:57)
at fulfilled (C:\Users\Valerio\Downloads\bSmart-downloader-main\bSmart-downloader-main\node_modules\tslib\tslib.js:112:62)

Node.js v18.15.0

Problema nel terminale

Scusate l'ignoranza, qualcuno sa dirmi perchè quando faccio click destro per incollare il cookie mi si incolla 50 volte?

image

Errore nel download di alcuni libri

Buongiorno, su alcuni libri oggi quando tento il download ricevo un msg di errore:
`Downloading pages
Progress 0.00%
Progress 0.00%
Progress 2.96%
Error Downloading page {
e: Error: invalid ciphertext size (must be multiple of 16 bytes)
at ModeOfOperationCBC.decrypt (C:\bSmart-downloader-main\node_modules\aes-js\index.js:475:19)
at C:\bSmart-downloader-main\index.js:29:45
at processTicksAndRejections (node:internal/process/task_queues:96:5),
file: <Buffer 3c 3f 78 6d 6c 6f 72 72 45 2f 3c 3e 64 49 74 73 6f 48 2f 3c 3d 63 44 6a 45 69 79 4e 36 34 56 45 41 67 6f 77 7a 49 67 30 72 32 6d 78 41 71 54 71 34 43 ... 257 more bytes>
} 41 0 https://s3-eu-west-1.amazonaws.com/cetem.bsmart.it/8/6/86c05b0766b9997674c562a69f5a94bd
C:\bSmart-downloader-main\node_modules\pdf-lib\cjs\utils\validators.js:140
throw new TypeError(exports.createTypeErrorMsg(value, valueName, types));
^

TypeError: pdf must be of type string or Uint8Array or ArrayBuffer, but was actually of type undefined
at Object.exports.assertIs (C:\bSmart-downloader-main\node_modules\pdf-lib\cjs\utils\validators.js:140:11)
at Function. (C:\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:122:33)
at step (C:\bSmart-downloader-main\node_modules\tslib\tslib.js:141:27)
at Object.next (C:\bSmart-downloader-main\node_modules\tslib\tslib.js:122:57)
at C:\bSmart-downloader-main\node_modules\tslib\tslib.js:115:75
at new Promise ()
at Object.__awaiter (C:\bSmart-downloader-main\node_modules\tslib\tslib.js:111:16)
at Function.PDFDocument.load (C:\bSmart-downloader-main\node_modules\pdf-lib\cjs\api\PDFDocument.js:116:24)
at C:\bSmart-downloader-main\index.js:172:44
at processTicksAndRejections (node:internal/process/task_queues:96:5)
PS C:\bSmart-downloader-main>`

Temo che il problema non sia legato specificatamente alla repo, ma dipenda proprio dalla piattaforma MyBsmart, perchè anche consultando i libri da web trovo qualche pagina bianca ogni tanto.. tuttavia ho pensato comunque di segnalarlo nel caso ci fosse già una soluzione nota.. Premetto che su PC tramite app MyBsmart ho già fatto il download del libro tempo addietro (che ora l'app mi chiede di aggiornare - ma che non ho aggiornato), si può in qualche modo usare questa copia in locale per salvarsi il pdf?

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.