Python script that notifies me when there's an available train seat

46
June 25, 2021, at 11:30 AM

I am trying to write a python script that allows me to see if any of the sold-out train tickets are back available (that is when someone decides to return their ticket.). I am planning to take a similar approach to this solution: https://itnext.io/how-i-got-tickets-to-a-quickly-sold-out-brandon-sanderson-lecture-with-40-lines-of-python-code-64c672f6e000.

In this tutorial, the guy notes that the website is "static" which makes it easier for him to track any change in the website. However, the site I am trying to access apparently hides the "true" URL when I search for a trip, which makes my case a bit more complex: https://ebilet.tcddtasimacilik.gov.tr/view/eybis/tnmGenel/tcddWebContent.jsf. And the URL I am redirected to when I search for a trip: https://ebilet.tcddtasimacilik.gov.tr/view/eybis/tnmGenel/int_sat_001.jsf does not send me to the intended page.

My question is how can I obtain the actual URL for these pages and track, for instance, changes in the trip at June 28, 10:20 AM from Izmit to Ankara so I get notified whenever the number of available seats is updated? I'd like to note that the website I am trying to track is a government website. Should I approach my problem similar to the tutorial, or is this not possible in the first place? Does it make sense to attempt to do this with Python? Do you have any recommendations to a fellow beginner on where to get started? Thank you.

READ ALSO
Dynamically finding TypeScript object values through passed in parameters

Dynamically finding TypeScript object values through passed in parameters

not sure if the title is misleading or actually is asking what I want: I am trying to get an Object's element value, but the tricky thing is that the element's name is being passed in through a function

69
How to calculate the SINR of the LTE in android programmatically?

How to calculate the SINR of the LTE in android programmatically?

I have browsed regrading the calculation of SINR in LTE in android documentationbut I haven't found any resources regrading that

73
Importing a file to a web page [SELENIUM]

Importing a file to a web page [SELENIUM]

I am creating a selenium script to automatically log in to a webpage, and then import axls file

32
Merging Pandas duplicate columns with the same name to a new row within dataframe

Merging Pandas duplicate columns with the same name to a new row within dataframe

I am trying to combine columns with the same name and make a new row within the dataframeHere's an example

59