@ -35,7 +35,7 @@ STATION_DEPARR_STATUS_REGEX = re.compile(r'^(?:(la timp)|(?:((?:\+|-)[0-9]+) min
# endregion
def scrape(train_no: int, use_yesterday=False, date_override=None):
def scrape(train_no: str, use_yesterday=False, date_override=None):
# Start scrapping session
s = requests.Session()
@ -38,8 +38,8 @@ train_data_cache = {}
def get_train_info_schema():
return jsonify(TRAIN_INFO_SCHEMA['v2'])
@bp.route('/train/<int:train_no>')
def get_train_info(train_no: int):
@bp.route('/train/<train_no>')
def get_train_info(train_no: str):
use_yesterday = check_yes_no(request.args.get('use_yesterday', ''), default=False)
@filtered_data
def get_data():