Giter Club home page Giter Club logo

dvbgo's Introduction

dvbgo's People

Contributors

kiliankoe avatar lutzthies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dvbgo's Issues

DVB short names for stops are misinterpreted sometimes

For instance HHZ should return results for Helmholtzstraße but instead we get the ones for Pulsnitzer Straße.

curl -X "GET" "http://widgets.vvo-online.de/abfahrtsmonitor/Haltestelle.do?ort=Dresden&hst=HHZ"
[[["Dresden"]],[["Pulsnitzer Straße","Dresden","33000290"]]]

Removing ort=Dresden from the request seems to fix the mixup.

curl -X "GET" "http://widgets.vvo-online.de/abfahrtsmonitor/Haltestelle.do?&hst=HHZ" [[["Dresden"]],[["Helmholzstraße","Dresden","33000742"]]]

Stop queries of length 1 deliver an HTML response body containing an error message

<div style="border: 3px solid #4991C5; font:1.5em; font-family:tahoma,calibri,arial; font-weight:bold; color:#1A4369; padding:5px; margin:10px; text-align:center"> The specified URL cannot be found. </div><!--0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234-->

HTTP GET requests always return an empty array

While investigating the issue of no results being shown in alfred_dvb I discovered that the bug actually originates from some changes on the server side in the expected arguments of HTTP GET requests made by dvbgo.

The paramter lim=0 in a request like http://widgets.vvo-online.de/abfahrtsmonitor/Abfahrten.do?hst=Helmholtzstraße&lim=0&ort=Dresden&vz=0 causes the response to always be []. Simply removing it by commenting out line 24 params.Set("lim", "0") in dvb.go fixes this.

However, new strange behavior can then be observed:

  • Stop queries of length 1 will deliver an HTML response body containing an error message
    see issue #5
  • Some DVB short names for stops get misinterpreted and therefore results for the wrong stop are shown
    see issue #6

Migrate to WebAPI

Since EFA is going to be shut down at some point in the rather near future, it seems like a good idea to use the chance to migrate to use the WebAPI instead and also replace the widgets endpoint while at it.

Big upside is a whole bunch of new data being supplied by the WebAPI.

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.