-4

这是我管理的最多的:

import urllib.request

page = urllib.request.urlopen("http://www.samair.ru/proxy/ip-address-01.htm")

page('\d+\.\d+\.\d+\.\d+')
4

1 回答 1

3
In [1]: import urllib2
In [2]: import re
In [3]: page = urllib2.urlopen("http://www.samair.ru/proxy/ip-address-01.htm").read()
In [4]: re.findall('\d+\.\d+\.\d+\.\d+', page)
Out[4]:
['101.226.74.168',
 '101.255.60.162',
 '101.50.17.123',
 '103.247.16.2',
 '103.247.16.97',
 '103.28.227.78',
 '103.7.248.161',
 '106.120.98.166',
 '107.16.66.225',
 '108.166.87.24',
 '109.123.111.99',
 '109.127.37.117',
 '109.175.8.45',
 '109.175.8.53',
 '109.207.61.160',
 '109.207.61.172',
 '109.207.61.173',
 '109.207.61.194',
 '109.207.61.210',
 '109.230.66.7']
于 2013-04-24T23:36:14.960 回答