Tunnels.collect_lengths_by_page¶
-
Tunnels.
collect_lengths_by_page
(page_no, update=False, verbose=False)¶ Collect data of railway tunnel lengths for a page number from source web page.
- Parameters
page_no (int or str) – page number; valid values include
1
,2
,3
and4
update (bool) – whether to do an update check (for the package data), defaults to
False
verbose (bool or int) – whether to print relevant information in console, defaults to
False
- Returns
data of tunnel lengths on page
page_no
and date of when the data was last updated- Return type
dict
Examples:
>>> from pyrcs.other_assets import Tunnels >>> tunl = Tunnels() >>> tunl_len_1 = tunl.collect_lengths_by_page(page_no=1) >>> type(tunl_len_1) dict >>> list(tunl_len_1.keys()) ['Page 1 (A-F)', 'Last updated date'] >>> tunl_len_4 = tunl.collect_lengths_by_page(page_no=4) >>> type(tunl_len_4) dict >>> list(tunl_len_4.keys()) ['Page 4 (others)', 'Last updated date']