Giter VIP home page Giter VIP logo

pydsb's Introduction

pydsb 2.3.0

pydsb provides a Python API for DSBmobile.

Heinekingmedia (the creators of DSBmobile) shut down the API pydsb was previously using so I had to use the app-API. That required a complete rewrite so some features are currently not implemented yet. See below for the current featureset. I strongly recommend that users of version 1.0 upgrade to 2.0, because it doesn't work anymore. Some syntax has changed too, so be aware of that.

Features

  • Getting plans
  • Getting news (maybe not always working due to limited sample data)
  • Getting postings (Aushänge)

Installation

pip install pydsb

Usage

from pydsb import PyDSB

dsb = PyDSB("username", "password")

print(dsb.get_plans())
print(dsb.get_postings())
print(dsb.get_news())

pydsb's People

Contributors

mojansch avatar bastelpichi avatar

Stargazers

PrtmPhlp avatar arduinomaster avatar Klaas avatar  avatar Dominik Wajda avatar Marlon avatar  Deleted user  avatar pixie avatar Adrian Groh avatar  avatar

Watchers

 avatar

Forkers

bastelpichi

pydsb's Issues

TypeError: the JSON object must be str, not 'bytes'

Executing I get the following error:

pi@raspberrypifhem:/mnt/Share $ python3 dsb.py
Traceback (most recent call last):
File "dsb.py", line 7, in
print(dsb.get_plans())
File "/home/pi/.local/lib/python3.5/site-packages/pydsb/init.py", line 72, in get_plans
raw_plans = self.fetch_data()["plans"][0]["Root"]["Childs"]
File "/home/pi/.local/lib/python3.5/site-packages/pydsb/init.py", line 49, in fetch_data
gzip.decompress(base64.b64decode(json.loads(req.text)["d"]))
File "/usr/lib/python3.5/json/init.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'bytes'

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.