import urllib
import re
url = "http://ffc.coinz.pw/index.php?page=statistics&action=pool"
source = urllib.urlopen(url)
regexp = r">(\d+(?:\.\d*)?)<"
found = 0
for line in source.readlines():
if found:
match = re.search(regexp,line)
break
if "Current Difficulty" in line:
found = 1
print match.groups()
这花了大约15分钟的研究时间:
您可以自己查看解决此问题的页面:
所用正则表达式的解释:
这是一种方法。你知道吗
如zord所述,在StackOverflow中发布问题之前,请阅读以下内容:
相关问题 更多 >
编程相关推荐