Viaducts.collect_viaduct_codes_by_page¶
-
Viaducts.
collect_viaduct_codes_by_page
(page_no, update=False, verbose=False)[source]¶ Collect data of railway viaducts for a given page number from source web page.
- Parameters
page_no (int, str) – page number; valid values include
1
,2
,3
,4
,5
, and6
update (bool) – whether to check on update and proceed to update the package data, defaults to
False
verbose (bool) – whether to print relevant information in console as the function runs, defaults to
False
- Returns
railway viaducts data of the given
page_no
and date of when the data was last updated- Return type
dict
Example:
>>> from pyrcs.other_assets import Viaducts >>> viaducts = Viaducts() >>> viaducts_1 = viaducts.collect_viaduct_codes_by_page(page_no=1) >>> type(viaducts_1) <class 'dict'> >>> print(list(viaducts_1.keys())) ['Page 1 (A-C)', 'Last updated date']