Skip to content

Commit 48e6f91

Browse files
authored
Update download_etherscan.py
1 parent ed23b3e commit 48e6f91

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

utils/download_etherscan.py

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
DEBUG_RAISE = False
2121
DEBUG_PRINT_CONTRACTS = False
2222

23+
def fixEmail(data):
24+
pre = '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="'
25+
suf = '">[email&#160;protected]</a>'
26+
if pre not in data:
27+
return data
28+
return data.replace(pre, pre.replace('"',"")).replace(suf, suf.replace('"',""))
29+
2330
def main():
2431
description = ""
2532
examples = ""
@@ -86,6 +93,7 @@ def main():
8693

8794

8895
with open(fpath, "wb") as fw:
96+
source = fixEmail(source)
8997
fw.write(bytes(source, "utf8"))
9098

9199
print("[%d/%d] dumped --> %s (%-20s) -> %s" % (nr, amount, c["address"], c["name"], fpath))

0 commit comments

Comments
 (0)