This is ugly, but works. It extracts bitcoin addresses from the page that has been downloaded. I could do better and add curl to the python script to make faster.
Code:
import sys
searchstring = "https://bitinfocharts.com/bitcoin/address/"
searchfile = open("bitcoin.html", "r")
for line in searchfile:
if searchstring in line:
# bitaddress = line.split('"')
htmlsplit = line.split(searchstring)
counter = 1
trimfile = open('trimfile.txt', 'w')
while counter < 101:
left_text = htmlsplit[counter].partition("\"")[0]
print left_text
trimfile.write(left_text.strip()+'\n')
counter = counter + 1
# print bitaddress
trimfile.close()
searchfile.close