Watch this talk. It'll probably the best 20 minutes you invested ever. "I have nothing to hide"
I do stuff on the internet. You may also read some smart comments about VPNs.
Imagine a README with more content than this ✨
API für die in Deutschland verbreitete DSBmobile App für Vertretungspläne an Bildungseinrichtungen
License: GNU General Public License v3.0
I do stuff on the internet. You may also read some smart comments about VPNs.
Imagine a README with more content than this ✨
Hi mal wieder,
In fetch_api() nimmst du den String aus den JSON-Daten des Servers und returnst ihn. Konkret: daten["ResultMenuItems"][0]["Childs"][0]["Root"]["Childs"][0]["Childs"][0]["Detail"]
Das Problem ist, dass die JSON-Daten, die der Server mir zurückgibt, anders aufgebaut sind (pastebin], sodass es einen list index out of range
Error gibt.
In meinem Fall ist der richtige String an dieser Stelle ["ResultMenuItems"][0]["Childs"][2]["Root"]["Childs"][0]["Childs"][0]["Detail"]
Offensichtlich ist die JSON bei jeder Schule anders aufgebaut, deswegen denke ich, es wäre besser, direkt die JSON aus der Funktion zurückzugeben (nichts extrahieren).
Ich hatte heute morgen hier vorbeigeschaut, und mir den Commit zur Version 0.0.2 angeschaut. Jetzt sind die alten Commits plötzlich nicht mehr da. Könntest du die irgendwie wiederherstellen?
Bei dem 0.0.2 Commit hatte jemand einen interessanten Kommentar gemacht den ich mir eig. noch mal anschauen wollte
Der Versuch die Version 0.0.14 über pip zu installieren schlägt leider fehl.
Auf https://pypi.org/project/dsbapipy/ gibt es auch nur Version 0.0.13
pip install --upgrade --force-reinstall "dsbapipy>=0.0.14"
ERROR: Could not find a version that satisfies the requirement dsbapipy>=0.0.14 (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.13)
ERROR: No matching distribution found for dsbapipy>=0.0.14
Ich habe keinen DSB Zugang mehr und benutze die App und zugehörige Software nicht mehr.
Ich würde jemanden gerne Rechte in dieser Repo geben, der das ganze dann weiter führt.
Dein GitHub Account sollte nicht 10 Minuten alt sein: Sprich das sollte nicht dein erstes Open Source Projekt sein, idealerweise.
Gerne hier melden 👇🏻
Das Beispiel funktioniert nicht ich bekomme diesen Fehler:
Traceback (most recent call last): File ".\dsbmobile.py", line 4, in <module> entries = dsbclient.fetch_entries() # Rückgabe einer JSON Liste an Arrays File "C:\Python38\lib\site-packages\dsbapi\__init__.py", line 62, in fetch_entries output.append(self.fetch_timetable(entry)) File "C:\Python38\lib\site-packages\dsbapi\__init__.py", line 96, in fetch_timetable "teacher": infos[7].text if infos[7].text != "\xa0" and infos[7].text != "+" else "---", IndexError: list index out of range
Hi,
Bei folgendem Code
import dsbapi
dsbapi.DSBApi("213061", "dsbgak").fetch_api()
gibt es einen Error.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/kangalioo/.local/lib/python3.7/site-packages/dsbapi/__init__.py", line 26, in fetch_entries
timetable = self.fetch_api()
File "/home/kangalioo/.local/lib/python3.7/site-packages/dsbapi/__init__.py", line 23, in fetch_api
return json.loads(gzip.decompress(base64.b64decode(json.loads(timetable_data.text)["d"])))["ResultMenuItems"][0]["Childs"][0]["Root"]["Childs"][0]["Childs"][0]["Detail"]
IndexError: list index out of range
Ich habe herausgefunden, dass der Server als Antwort an die POST Request folgendes sendet:
{
"Resultcode": 1,
"ResultStatusInfo": "Login fehlgeschlagen",
"StartIndex": -1,
"ResultMenuItems": [],
"ChannelType": 0,
"MandantId": ""
}
Das heißt, der Login schlägt fehl. Die Nutzerdaten (Benutzername 213061, Passwort dsbgak) sind jedoch richtig.
Ich bekomme bei der Ausführung leider den folgenden Fehler:
python3 dsb2.py
Traceback (most recent call last):
File "dsb2.py", line 4, in
entries = dsbclient.fetch_entries() # Rückgabe einer JSON Liste an Arrays
File "/home/pi/.local/lib/python3.5/site-packages/dsbapi/init.py", line 45, in fetch_entries
data_compressed = json.loads(timetable_data.content)["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'
Bei mir steht immer der Error code: "Index out of range"
Im dsbMobile tag ist ein rechtschreibfehler
Hi,
I am now absoultely sure Heinekenmedia tries to "disable" DSB APIs and implementations. 3rd party DSB-Apps in Play store got took down by Heinekenmedia, they obfuscated their configuration.js, they used Debugger breakpoints to "prevent" browser Debugging, they look at APIs and modify their to make 3rd pary ones defunct.
As Maintainer I think we should just continue as before, they have no legal basis to sue us or to take things down. However I am pretty sure Heinekenmedia reads this, feel free to create a GitHub Account and comment here.
Moin,
habe die Frage, ob ich auch mit der API die Daten von dem Vertretungsoplan meiner Schule ziehen kann, und sie woanders anzeigen lassen?
The compression of the request is different as done in the App, therefore the Server rejects requests made by the API.
Hi,
aktuell bin ich am implementieren Eurer Bibliothek und mir ist dabei aufgefallen, dass bei uns in der Schule die Felder eine andere Reihenfolge haben.
Da ich das Ergebnis in einen Pandas DataFrame lutsche, habe ich als Workaround einfach die Spaltennamen getauscht.
Wenn die Tabellen Überschriften einheitlich sind, könnte man evtl. ein dynamisches Feldnamen mapping einbauen. Leider fehlt mir hier die Vergleichsmöglichkeit.
Viele Grüße,
Micha
Tach meine Freunde!
Wollte kurz auf nen kleinen Fehler aufmerksam machen. In Beispiel 1 und 2 muss der Import anders sein, um richtig zu funktionieren :p
import dsbapi
-> import dsbapi as dsbapipy
PS: Bin darüber am nachdenken auch hier mit einzusteigen, allerdings ist das was für bald vllt.
Schönen Tag noch
Bei:
Beispiel 3: Nützliches Beispiel
Ein real-world Beispiel:
entries dsbclient.fetch_entries()
fehlt ein =
entries = dsbclient.fetch_entries()
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.