@@ -63,9 +63,6 @@ def getLabel(label, label_type="account", input_type='single'):
63
63
try :
64
64
# Select relevant table from multiple tables in the page, based on current table index
65
65
curTable = pd .read_html (driver .page_source )[table_index ]
66
- if label_type == "account" :
67
- # Remove last item which is just sum
68
- curTable = curTable [:- 1 ]
69
66
print (curTable )
70
67
71
68
# Retrieve all addresses from table
@@ -88,6 +85,7 @@ def getLabel(label, label_type="account", input_type='single'):
88
85
89
86
# If table is less than 100, then we have reached the end
90
87
if (len (curTable .index ) == 100 ):
88
+ # TODO: Standardize index incrementation
91
89
if label_type == "account" :
92
90
index += 100
93
91
driver .get (baseUrl .format (
@@ -143,10 +141,9 @@ def getLabelOldFormat(label, label_type="account", input_type='single'):
143
141
print (e )
144
142
print (label , "Skipping label due to error" )
145
143
return
146
- # Remove last item which is just sum
147
- table_list .append (newTable [:- 1 ])
144
+
148
145
index += 100
149
- if (len (newTable .index ) != 101 ):
146
+ if (len (newTable .index ) != 100 ):
150
147
break
151
148
152
149
df = pd .concat (table_list ) # Combine all dataframes
0 commit comments