get_category_menu
- pyrcs.parser.get_category_menu(url, update=False, confirmation_required=True, json_it=True, verbose=False)
Get a menu of the available classes.
- Parameters
url (str) – URL of the menu page
update (bool) – whether to do an update check (for the package data), defaults to
False
confirmation_required (bool) – whether to confirm before proceeding, defaults to
True
json_it (bool) – whether to save the catalogue as a .json file, defaults to
True
verbose (bool or int) – whether to print relevant information in console, defaults to
False
- Returns
a category menu
- Return type
dict or None
Example:
>>> from pyrcs.parser import get_category_menu >>> menu = get_category_menu('http://www.railwaycodes.org.uk/linedatamenu.shtm') >>> type(menu) dict >>> list(menu.keys()) ['Line data']