LocationIdentifiers.parse_note_page

static LocationIdentifiers.parse_note_page(note_url, parser='lxml', verbose=False)[source]

Parse addition note page.

Parameters
  • note_url (str) – URL link of the target web page

  • parser (str) – the parser to use for bs4.BeautifulSoup, defaults to 'lxml'

  • verbose (bool or int) – whether to print relevant information in console as the function runs, defaults to False

Returns

parsed texts

Return type

list

Example:

>>> from pyrcs.line_data import LocationIdentifiers

>>> lid = LocationIdentifiers()

>>> url = lid.HomeURL + '/crs/CRS2.shtm'

>>> parsed_note_ = lid.parse_note_page(url, parser='lxml')

>>> print(parsed_note_[3].head())
                  Location  CRS CRS_alt1 CRS_alt2
0  Glasgow Queen Street     GLQ      GQL
1  Glasgow Central          GLC      GCL
2  Heworth                  HEW      HEZ
3  Highbury & Islington     HHY      HII      XHZ
4  Lichfield Trent Valley   LTV      LIF