forked from Vishnu-priyan/Icd10DataCollection
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfinal_links.py
More file actions
33 lines (29 loc) · 1.27 KB
/
final_links.py
File metadata and controls
33 lines (29 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#Getting from final_sub_page!
#This outputs links such as
"""
---------------------------------------------------------------------
http://www.icd10data.com//ICD10CM/Codes/V00-Y99/V10-V19/V10-/V10
http://www.icd10data.com//ICD10CM/Codes/V00-Y99/V10-V19/V10-/V10.0
http://www.icd10data.com//ICD10CM/Codes/V00-Y99/V10-V19/V10-/V10.0XXA
http://www.icd10data.com//ICD10CM/Codes/V00-Y99/V10-V19/V10-/V10.0XXD
http://www.icd10data.com//ICD10CM/Codes/V00-Y99/V10-V19/V10-/V10.0XXS
http://www.icd10data.com//ICD10CM/Codes/V00-Y99/V10-V19/V10-/V10.1
http://www.icd10data.com//ICD10CM/Codes/V00-Y99/V10-V19/V10-/V10.1XXA
...(All such links)
...
Till last one!
---------------------------------------------------------------------
Where input link is as
http://www.icd10data.com//ICD10CM/Codes/V00-Y99/V10-V19
(Such as those obtained from reqfile.py)
---------------------------------------------------------------------
"""
import requests
import bs4
from reqfile import print_in_order,main_link_finder
url = "http://www.icd10data.com/ICD10CM/Codes/A00-B99/A15-A19"
#text_class = body-content | link_class = 'identifierSpacing identifier'
texts,links = main_link_finder(url,'identifierSpacing identifier',"body-content")
print_in_order(links)
print("::::::::::::::::::::::::::")
print_in_order(texts[:-2])