Giter Site home page Giter Site logo

Filter canceled trains about vvspy HOT 2 OPEN

libelle13 avatar libelle13 commented on May 18, 2024
Filter canceled trains

from vvspy.

Comments (2)

zaanposni avatar zaanposni commented on May 18, 2024

Hi Ralf,

Thanks for your kind words. If you want to get your project mentioned in vvspy's readme, simply create a Pull Request :)

I made some checks and could not find any information regarding the strike in the API response either.
Btw, you can access the raw response on nearly all objects; It's called raw.

from datetime import datetime

from vvspy import get_departures


last_thursday = datetime(2023, 11, 16, 5, 0, 0)

deps = get_departures("de:08111:6008", check_time=last_thursday)

print(deps[0].raw)

Using lineInfos I have found some information about the ongoing nightly "Instandhaltungsarbeiten". I think this is the place the DB would post strike information as well.

"lineInfos": {
        "lineInfo": {
            "infoLinkText": "Hauptbahnhof - Vaihingen: Fahrplanänderungen in 26 Nächten Montag/Dienstag wegen der Instandhaltungsarbeiten",
            "infoLinkURL": "http://noHost",
            "infoText": {
                "content": "Auch im Jahr 2023 müssen wieder planmäßige Instandhaltungsarbeiten an der Stammstrecke zwischen Hauptbahnhof (tief) und Vaihingen durchgeführt werden.\n \nIn 26 Nächten von Montag auf Dienstag kommt es jeweils zwischen 22:30 und 04:30 zu folgenden Fahrplanänderungen bei der S-Bahn:\n \nDie Linie S1 wird zwischen Hauptbahnhof (oben) und Vaihingen ohne Halt umgeleitet. Die S3 fährt nur zwischen Backnang und Hauptbahnhof (oben), die S4 zwischen Backnang bzw. Marbach und Hauptbahnhof (oben) und die S6 zwischen Weil der Stadt und Hauptbahnhof (oben). Die S2 und S5 fahren durch den S-Bahn-Tunnel zu geänderten Fahrzeiten.",
                "subtitle": "Hauptbahnhof - Vaihingen: Fahrplanänderungen in 26 Nächten Montag/Dienstag wegen der Instandhaltungsarbeiten",
                "subject": "Linien S1, S2, S3, S4, S5, S6",
                "additionalText": "",
                "htmlText": "<div>Auch im Jahr 2023 m&uuml;ssen wieder planm&auml;&szlig;ige Instandhaltungsarbeiten an der Stammstrecke zwischen Hauptbahnhof (tief) und Vaihingen durchgef&uuml;hrt werden.</div>\n<div>&nbsp;</div>\n<div>In 26 N&auml;chten von Montag auf Dienstag kommt es jeweils zwischen 22:30 und 04:30 zu folgenden Fahrplan&auml;nderungen bei der S-Bahn:</div>\n<div>&nbsp;</div>\n<div>Die Linie S1 wird zwischen Hauptbahnhof (oben) und Vaihingen ohne Halt umgeleitet. Die S3 f&auml;hrt nur zwischen Backnang und Hauptbahnhof (oben), die S4 zwischen Backnang bzw. Marbach und Hauptbahnhof (oben) und die S6 zwischen Weil der Stadt und Hauptbahnhof (oben). Die S2 und S5 fahren durch den S-Bahn-Tunnel zu ge&auml;nderten Fahrzeiten.</div>",
                "wmlText": "",
                "smsText": "Linien S1, S2, S3, S4, S5, S6",
                "speechText": ""
            },
        }
   }

As far your comment regarding the official VVS website, maybe they have updated it since I created vvspy a few years ago ;)

I currently do not have the free time to rework vvspy or research if the API received any updates, so I cannot help you with your request :(

from vvspy.

zaanposni avatar zaanposni commented on May 18, 2024

@libelle13 Nice to know:

This won't help you regarding the strikes, but the API responses for trips and departures/arrivals are different.
Sometimes you will find additional information in one type that is missing in the other.

Maybe this will help you to improve your project.

from vvspy.

Related Issues (20)

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.