Code Monkey home page Code Monkey logo

klettdownload's Introduction

LubaProject

Introduction

This is a project I'm currently working on for my english teacher. This project also owes its name to him. It's delivered with an interface which main focus was to provide ease-of-use and being expandable. To create your own Webscraping Book downloaders have a look here.

Installation

  1. Make sure you have python3.11 or newer installed. If you don't have it installed you can download it from here and if you need help setting everything up I can highly recommend you this tutorial.
  2. When you're done setup up python and everything is working you should clone this repository from GitHub using
git clone https://github.com/DiscoveryFox/KlettDownload.git
  1. Now cd into that directory and create a new virtual environment.(You theoretically can skip the virtual environment, but I would highly encourage you to do not since it will make managing your python in the future a lot easier, and it's just good practice)
cd KlettDownload
python -m venv .venv
  1. Now you can install all requirements for the project:
python -m pip install -r requirements.txt
  1. And then to start the script you can simply run:
python ui.py

Usage

If you want to activate your virtual environment in the future its depending on your operating system. On Windows you type

# Windows
cd .venv/Scripts
.\activate.ps1
# Linux
source .venv/bin/activate

Coding

The BookProvider class provides a common interface for accessing and downloading ebooks from various online stores. It provides a set of methods for interacting with an ebook store's API, such as getting authentication credentials, fetching book content, and downloading books.

To create your own BookProvider class, you need to create a new Python file and define a class that inherits from the BookProvider class. In this new class, you can override any of the methods defined in the BookProvider class to customize its behavior for the specific ebook store.

Here are the steps to create your own BookProvider class:

Step 1: Import the necessary packages

To create a new BookProvider class, start by importing the packages that are needed for your implementation. For example, if you need to use the Selenium package to interact with a web-based ebook store, you would import it at the beginning of your file:

coming soon...

klettdownload's People

Contributors

discovery-bit avatar discoveryfox avatar

Stargazers

 avatar

Watchers

 avatar

klettdownload's Issues

Bottleneck

Found huge bottleneck in download_page. There is always a check if the user ownes the book. That is unnecesary and adds huge delay. Rework the get_owned_book_ids() function to add some sort of cache to the function. Maybe start cache on every restart and add option to refresh it manually in the settings tab.

webdriver-manager

Integrate the module webdriver-manager into the script. So you won't be bothered with downloaded the latest version always.

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.