mak-alex / litres-backup Goto Github PK
View Code? Open in Web Editor NEWlitres-backup- Assistant for backing up your books from a book resource litres.ru
litres-backup- Assistant for backing up your books from a book resource litres.ru
Добрый день, прошу прощения, но я не нашёл другого способа связи с вами, кроме как здесь. Подскажите, пожалуйста, где и как вы искали документацию по API LitRes? Дело в том, что я выполняю студенческий проект и хотел бы взять в качестве источника данных Litres. Однако, нигде не могу найти нормальной документации по использованию его API. Единственная +- официальная ссылка в гугле ведёт вот на такой документ, который предлагает использовать эндпоинты "/catalitv2" сервера "catalit.litres.ru". Однако, все репозитории на гитхаб, использующие АПИ литреса, в том числе и ваш, используют сервер "api.litres.ru" и эндопинты "/foundation/api/*". Даже исследование вкладки network инструментов разработчика браузера показывает, что сайт литреса тоже использует этот API, однако я нигде не могу найти хоть какую-то документацию по нему. Было бы очень здорово, если бы вы смогли подсказать, хотя бы куда смотреть
Creates the book_path:
variable at config instead the library
variable
Look a like wrong name used at this line.
The backup cycle is interrupted when an error occurs during the download.
First tool checks whether the file can be downloaded, and only then whether the file has been downloaded or not.
2021-04-07T04:02:07.154+0500 INFO litres/books.go:126 [litres.download] not possible {"filePath": "/home/carrol/Library/Litres/Максим Дорофеев - Путь джедая.epub"}
ref string here
У меня в библиотеке 30 книг, которые можно скачать в fb2.
Что я делаю:
egrep -o '/download_book/.{0,255}fb2.zip' /tmp/litres-books.html > books.list
cat books.list | xargs -I { -L1 curl -O ... -H 'Cookie: SID=...' https://www.litres.ru{
Затем запускаю litres-backup book
и получаю 25 кинг. Ничаниаю искать какие 5 потерялись. Вытаскиваю все ID из своего списка ссылок и сравниваю с выводом litres-backup book -a
:
cat books.list | cut -d'/' -f 3 | xargs -L1 -I{ sh -c 'echo "{" ; $GOPATH/bin/litres-backup book -a | grep {'
Первые 5 книг отсуствуют:
9815607
43195024
127781
119029
35245440
P.S. Вижу, что в проекте принято писать на английском, но так как и автор и пользователи, все русскоговорящие, осознанно описываю проблему именно по-русски.
Valid username and password, but invalid API response
Command litres-backup book -a -v
Result
FATAL [email protected]/command.go:856 [litres.GetBooks] {"error": "expected element type <catalit-fb2-books> but have <catalit-bad-request>"}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.