Skip to content
View StudySnatcher's full-sized avatar

Block or report StudySnatcher

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
StudySnatcher/README.md


Logo

StudySnatcher

Download files from StudyDrive courses

Table of Contents
  1. About The Project
  2. Features
  3. Installation
  4. Usage
  5. Usage
  6. How it works
  7. Roadmap
  8. Contributing
  9. Acknowledgments

About The Project

Screenshot

This project provides a tool to automate downloading documents from StudyDrive. It is divided into two main components: a backend connecting to the StudyDrive-API and a graphical user interface (GUI). The backend handles authentication, fetching course documents, and downloading files, while the GUI allows users to interact with the tool in an intuitive way.

Built With

Python

Tkinter

Features

  1. Backend API:

    • Authenticate users on StudyDrive.
    • Fetch course document metadata.
    • Download course documents to a local directory.
    • Handle rate-limiting and retry logic for smooth operation.
  2. GUI:

    • Simple, user-friendly interface built using Tkinter.
    • Allows users to input credentials, course URL, and other preferences.
    • Displays real-time logs and status updates.
  3. Reusability:

    • The backend API can be used independently in other Python projects to interact with StudyDrive programmatically.

Installation

Prerequisites

  • Python 3.8 or later
  • Required Python packages (install via pip):
    pip install -r requirements.txt

Build executable with pyinstaller

  • Install pyinstaller (via pip)
    pip install pyinstaller
  • Build executable
    pyinstaller "StudyDrive Scraper.spec"
  • The executable is in the dist folder

Usage

1. Run the GUI

The GUI is designed for non-technical users who want to interact with the tool visually.

  1. Launch the GUI:
    python studydrive_scraper.py
  2. Enter:
    • Username and Password: Your StudyDrive login credentials.
    • Course URL: The URL of the StudyDrive course from which you want to download documents.
    • Convert to PDF: Check this option if you want files to be converted to PDF format (if supported).
  3. Click Download. The application will:
    • Authenticate your credentials.
    • Fetch the list of documents available in the course.
    • Download the files into a folder named after the course.
  4. Monitor progress and logs in the on-screen message area.

2. Use the Backend

The backend can be integrated into other Python scripts for programmatic use.

Example:

from scraper_backend import run

username = "your-email@example.com"
password = "yourpassword"
course_url = "https://www.studydrive.net/de/course/sample-course/12345"
converted_to_pdf = False

run(username, password, course_url, converted_to_pdf)

How It Works

  1. Authentication:

    • The user logs in with their credentials.
    • A session is initialized, including client secret generation and authentication headers.
  2. Course Parsing:

    • The course URL is parsed to extract the course name and ID.
  3. Document Retrieval:

    • The backend fetches metadata about all documents in the course.
  4. File Download:

    • Each document's download link is fetched.
    • The file is saved to a local folder named after the course.
  5. Rate-Limit Handling:

    • If the API returns a 429 (rate-limit exceeded), the backend automatically retries after the specified wait time.

Roadmap

  • Display a progress bar, based on the rate limit (30 requests before waiting 57 sec) and the number of pages (~50 documents per page)
  • Add support for parallel downloads in a single session.
  • Improve error handling and display user-friendly error messages in the GUI.
  • Add a stop button for ongoing downloads

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Acknowledgments

Pinned Loading

  1. StudySnatcher StudySnatcher Public

    Download whole courses from StudyDrive

    Python