LocationIdentifiers.parse_note_page

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

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, defaults to False

Returns

parsed texts

Return type

list

Example:

>>> from pyrcs.line_data import LocationIdentifiers

>>> lid = LocationIdentifiers()

>>> url = lid.Catalogue[lid.MscENKey]
>>> parsed_note_dat = lid.parse_note_page(url, parser='lxml')

>>> print(parsed_note_dat[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