Skip to content

Commit 4ba2492

Browse files
committed
[Fix] Etherscan drop last row if sum
1 parent 0eb5d32 commit 4ba2492

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ def getLabel(label, label_type="account", input_type='single'):
6666
curTable = pd.read_html(driver.page_source)[table_index]
6767
print(curTable)
6868

69+
# If last row contains NaN, then we remove it, problem only with etherscan
70+
if (curTable.iloc[-1].isnull().values.any()):
71+
curTable = curTable.iloc[:-1]
72+
6973
# Retrieve all addresses from table
7074
elems = driver.find_elements("xpath", "//tbody//a[@href]")
7175
addressList = []

0 commit comments

Comments
 (0)