Я думаю, что это хороший способ сделать это. Затем просто переберите список и возьмите значения, следующие за 'ExitAddress'
import requests
url = 'https://check.torproject.org/exit-addresses'
r = requests.get(url)
split_text = r.text.split()
exit_address = []
for idx, val in enumerate(split_text):
if split_text[idx-1] == 'ExitAddress':
exit_address.append(val)
ИЛИ может заменить это в цикле с пониманием списка
exit_address = [ val for idx, val in enumerate(split_text) if split_text[idx-1] == 'ExitAddress' ]
Выход:
print (exit_address)
['162.247.74.201', '104.218.63.73', '188.165.61.244', '128.199.38.115', '89.236.112.99', '66.175.211.27', '176.10.104.240', '95.143.193.125', '178.17.170.135', '93.174.93.133', '193.90.12.116', '223.26.48.248', '185.100.85.61', '79.232.120.62', '46.182.106.190', '46.98.208.195', '96.66.15.147', '72.210.252.137', '78.142.175.70', '216.218.134.12', '199.249.230.79', '45.32.116.97', '192.42.116.17', '54.39.148.233', '209.141.51.150', '176.10.99.200', '103.109.100.148', '195.254.134.194', '87.66.83.22', '193.201.225.45', '40.69.62.87', '160.119.249.24', '85.93.218.204', '49.50.107.221', '185.165.168.168', '109.70.100.23', '45.76.115.159', '66.70.217.179', '185.56.171.94', '195.189.96.147', '195.176.3.20', '178.17.170.194', '54.37.16.241', '46.36.40.21', '62.210.116.220', '45.32.63.183', '114.24.211.45', '95.165.133.22', '162.247.74.216', '82.221.141.96', '87.118.116.90', '114.149.38.36', '216.158.98.38', '195.176.3.20', '194.71.109.44', '65.19.167.131', '62.102.148.68', '74.115.25.12', '185.100.86.100', '185.222.202.12', '144.217.161.119', '31.31.74.47', '185.94.190.211', '185.220.101.5', '185.227.68.78', '157.230.56.64', '31.131.4.171', '80.127.116.96', '65.19.167.132', '92.222.180.10', '193.56.29.101', '37.9.231.195', '185.220.101.9', '217.182.78.177', '77.81.247.72', '193.169.145.194', '91.146.121.3', '185.234.217.232', '188.65.144.2', '171.25.193.25', '204.11.50.131', '31.220.0.225', '78.142.19.43', '87.118.122.51', '209.141.61.45', '185.234.217.233', '178.17.170.196', '185.169.197.106', '128.199.213.157', '199.249.230.85', '160.119.253.114', '91.203.146.126', '193.169.145.202', '87.120.36.157', '82.94.251.227', '94.230.208.148', '104.244.76.13', '185.220.102.4', '192.42.116.28', '195.123.216.32', '217.100.113.174', '199.249.230.66', '160.202.162.186', '122.116.50.42', '51.15.234.90', '198.73.50.71', '104.218.63.75', '51.77.177.194', '79.143.186.17', '45.32.12.225', '62.210.71.205', '66.146.193.33', '77.247.181.162', '87.120.254.223', '85.25.44.141', '210.3.102.152', '194.88.143.66', '81.17.27.140', '163.172.221.204', '178.175.148.227', '195.123.217.153', '51.15.59.9', '89.31.96.168', '178.17.170.164', '200.98.161.148', '67.215.255.140', '37.228.129.2', '70.168.93.214', '46.182.19.15', '185.220.101.8', '185.220.101.46', '66.155.4.213', '141.136.44.18', '31.31.72.24', '82.221.139.190', '50.116.37.141', '185.234.217.243', '176.122.25.181', '185.62.188.88', '173.14.173.227', '103.3.61.114', '51.15.64.212', '185.220.101.1', '173.79.165.247', '46.182.18.29', '176.152.45.213', '163.172.41.228', '178.17.171.102', '185.113.128.30', '185.165.168.229', '37.128.222.30', '189.84.21.44', '51.38.69.128', '184.105.220.24', '160.119.249.240', '185.165.168.77', '195.123.237.251', '178.17.170.81', '176.10.99.200', '77.8.66.123', '199.249.230.80', '178.18.83.215', '46.182.19.219', '97.74.237.196', '200.98.137.240', '195.154.251.25', '64.113.32.29', '94.230.208.147', '91.153.76.138', '95.179.150.158', '46.182.19.219', '209.141.45.212', '144.217.60.211', '54.37.68.143', '51.15.107.1', '151.80.167.64', '51.15.124.1', '162.247.74.74', '37.134.164.64', '185.147.237.8', '185.220.101.21', '185.234.217.235', '82.118.242.113', '178.17.174.196', '118.163.74.160', '185.234.217.245', '205.168.84.133', '144.217.164.104', '199.249.230.89', '204.17.56.42', '71.33.65.182', '178.175.135.100', '156.54.213.67', '46.226.108.26', '193.90.12.117', '31.132.36.172', '178.165.72.177', '185.10.68.180', '198.50.191.95', '62.210.116.201', '91.219.236.171', '51.15.64.212', '157.230.111.173', '155.4.73.10', '192.195.80.10', '92.222.22.113', '84.200.50.18', '185.10.68.225', '178.175.148.5', '104.218.63.76', '176.10.99.200', '199.249.230.83', '87.118.110.27', '51.15.224.0', '178.17.166.150', '50.247.195.124', '188.132.176.2', '185.220.102.7', '210.140.10.24', '51.15.240.100', '185.104.120.5', '145.239.59.252', '195.206.105.217', '178.175.148.15', '200.98.146.219', '153.120.129.100', '91.219.236.189', '185.220.101.10', '185.100.85.101', '178.175.129.91', '46.98.202.216', '217.112.131.20', '128.208.4.198', '71.19.148.20', '209.126.101.29', '5.34.183.105', '188.165.59.43', '176.10.99.200', '185.234.217.244', '185.107.83.71', '185.112.146.138', '185.104.120.7', '95.216.145.1', '95.130.11.170', '185.163.45.38', '37.187.180.18', '5.39.217.14', '45.33.48.204', '185.165.169.71', '176.10.99.200', '178.175.135.99', '71.19.144.106', '94.248.0.153', '185.220.101.34', '162.247.74.202', '162.213.0.243', '46.98.206.182', '31.31.74.131', '87.122.202.161', '95.130.10.69', '178.175.148.45', '62.102.148.67', '87.118.116.12', '54.39.151.167', '89.40.2.91', '87.118.122.50', '212.21.66.6', '207.180.224.17', '141.136.44.19', '193.150.121.70', '158.255.7.61', '109.70.100.20', '51.15.34.214', '199.127.226.150', '37.220.36.240', '51.38.134.189', '212.19.17.213', '51.15.123.230', '51.15.112.94', '95.130.12.33', '80.79.23.7', '162.247.74.204', '178.175.148.224', '103.234.220.195', '104.244.78.163', '212.81.199.159', '31.132.36.239', '51.15.233.253', '46.38.235.14', '185.107.47.215', '185.104.120.2', '51.38.64.136', '54.36.222.37', '144.217.90.68', '66.222.153.25', '130.204.161.3', '86.102.20.137', '185.112.254.195', '192.160.102.166', '82.221.139.25', '199.249.230.75', '89.238.77.5', '173.212.244.116', '80.233.134.249', '192.160.102.170', '103.84.172.38', '179.48.248.17', '91.92.109.43', '185.127.25.192', '89.234.157.254', '92.88.238.196', '23.239.23.104', '185.227.82.9', '145.239.82.204', '77.247.181.163', '198.98.56.149', '37.200.98.117', '35.0.127.52', '158.69.217.87', '46.182.18.40', '193.90.12.119', '193.107.85.62', '37.187.129.166', '31.185.27.201', '164.77.133.220', '185.220.101.54', '158.69.192.200', '71.19.144.219', '141.136.44.22', '207.244.70.35', '213.252.140.118', '190.162.198.98', '178.32.147.150', '172.98.193.43', '46.36.40.193', '37.187.99.161', '193.90.12.118', '51.75.206.27', '46.182.18.29', '190.216.2.136', '185.220.101.28', '5.135.158.101', '95.128.43.164', '185.220.101.20', '176.10.99.200', '185.248.160.65', '103.250.73.13', '51.15.113.84', '192.42.116.15', '81.17.27.141', '104.131.206.23', '185.222.202.125', '212.16.104.33', '176.10.99.200', '197.206.196.18', '37.187.129.166', '198.98.58.135', '37.187.129.166', '193.107.85.60', '199.249.230.86', '185.220.101.15', '178.254.31.209', '103.8.79.229', '85.202.163.127', '195.123.228.161', '103.236.201.27', '193.19.118.171', '192.155.95.222', '94.23.201.80', '213.108.105.71', '5.189.146.133', '94.100.6.27', '51.15.37.97', '178.17.170.13', '192.162.244.18', '128.199.47.160', '94.156.77.134', '185.220.100.252', '89.238.77.4', '198.167.223.38', '176.31.180.157', '192.42.116.14', '85.202.163.127', '185.220.102.8', '46.194.61.156', '162.247.74.27', '51.15.125.181', '185.220.101.50', '89.187.143.31', '94.102.51.78', '195.123.246.50', '185.100.85.147', '217.12.221.196', '185.220.101.0', '178.239.176.73', '162.247.74.206', '46.98.204.58', '104.244.78.10', '45.62.249.130', '185.100.87.129', '185.104.120.3', '37.139.8.104', '192.42.116.22', '185.220.100.252', '185.220.101.13', '185.220.101.30', '217.170.197.89', '163.172.215.253', '158.69.193.32', '92.63.173.28', '45.125.65.45', '185.220.100.255', '199.87.154.255', '51.254.208.245', '178.17.170.23', '192.42.116.26', '46.29.248.238', '109.69.66.98', '46.165.245.154', '62.210.105.116', '5.79.86.15', '144.217.60.211', '87.118.115.176', '37.134.164.64', '213.95.149.22', '199.249.230.68', '144.217.166.65', '171.6.153.200', '65.181.122.24', '77.247.181.162', '178.17.166.149', '162.247.74.217', '144.217.60.239', '80.68.92.225', '79.134.234.247', '204.194.29.4', '104.200.20.46', '164.132.51.91', '213.160.32.233', '139.162.10.72', '176.31.208.193', '199.249.230.88', '81.171.29.146', '51.15.209.128', '185.125.33.242', '81.17.27.139', '46.194.61.156', '77.247.181.162', '204.85.191.30', '91.92.109.119', '185.220.101.31', '46.98.206.91', '89.31.57.5', '176.10.99.200', '185.220.101.48', '199.249.230.71', '50.7.151.127', '195.254.135.76', '192.42.116.16', '192.160.102.164', '193.138.52.161', '185.16.85.171', '18.85.22.239', '192.99.247.1', '91.121.251.65', '185.147.80.155', '185.4.132.183', '51.254.48.93', '162.247.74.213', '104.244.74.78', '195.254.134.242', '188.166.9.235', '74.82.47.194', '31.220.41.162', '193.169.145.66', '80.241.60.207', '71.19.144.148', '98.142.132.32', '95.216.107.148', '137.74.169.241', '178.17.171.55', '163.172.215.253', '78.130.128.106', '62.102.148.68', '195.123.221.122', '204.17.56.42', '167.99.42.89', '84.48.199.78', '199.249.230.84', '193.107.85.56', '64.44.141.153', '94.168.35.70', '195.176.3.24', '178.17.174.198', '109.70.100.22', '176.10.99.200', '80.67.172.162', '51.15.13.245', '185.220.101.26', '77.247.181.163', '217.147.169.55', '212.92.219.15', '5.79.68.161', '185.220.101.33', '178.238.237.44', '89.234.157.254', '46.101.61.36', '185.72.244.24', '185.66.200.10', '194.99.106.148', '51.77.0.81', '185.234.217.241', '18.85.22.239', '185.220.101.27', '51.15.106.67', '51.75.253.147', '103.28.53.138', '91.219.237.244', '199.249.230.73', '185.220.100.253', '45.79.73.22', '142.93.168.48', '185.100.87.206', '185.10.68.30', '204.8.156.142', '185.36.75.108', '93.115.241.194', '45.77.236.186', '87.118.92.43', '178.17.170.149', '109.70.100.21', '145.239.91.37', '185.100.86.154', '109.201.133.100', '46.182.19.15', '190.10.8.50', '198.50.200.131', '173.255.229.8', '185.220.100.255', '185.65.205.10', '46.167.245.51', '185.220.100.254', '185.220.100.253', '185.220.101.53', '192.42.116.23', '94.230.208.147', '185.86.149.254', '185.100.86.128', '185.222.202.104', '95.42.126.41', '51.15.92.212', '185.220.101.49', '95.142.161.63', '37.48.120.196', '193.110.157.151', '199.249.230.74', '82.223.14.245', '195.176.3.23', '98.174.90.43', '192.42.116.14', '199.249.230.70', '86.104.15.15', '192.42.116.27', '72.14.179.10', '54.36.189.105', '31.185.104.19', '31.131.2.19', '104.248.166.242', '77.81.104.124', '193.90.12.115', '185.100.85.190', '66.175.208.248', '185.165.169.165', '91.121.192.154', '185.223.163.29', '199.249.230.82', '46.165.230.5', '171.25.193.77', '81.17.27.138', '51.15.59.9', '141.98.136.19', '185.220.102.6', '95.143.23.46', '185.220.102.6', '173.255.226.142', '185.129.62.63', '171.25.193.78', '199.249.230.67', '128.31.0.13', '104.233.106.224', '144.217.80.80', '185.107.47.171', '192.42.116.25', '178.17.174.232', '176.67.168.210', '162.247.74.200', '84.53.192.243', '85.159.237.210', '94.142.242.84', '195.123.212.75', '51.15.82.2', '125.212.241.182', '23.129.64.101', '192.42.116.18', '151.80.167.67', '176.10.107.180', '137.74.167.96', '84.209.51.186', '5.34.181.34', '185.129.62.62', '51.15.49.134', '198.50.200.129', '104.200.67.120', '24.3.109.151', '54.39.148.234', '185.35.138.92', '176.10.104.240', '217.12.223.56', '31.185.104.20', '198.40.54.178', '149.202.238.204', '104.218.63.74', '91.203.5.165', '83.136.106.153', '185.191.204.254', '46.173.214.3', '185.227.68.250', '5.196.66.162', '176.53.90.26', '95.79.168.164', '178.17.174.14', '103.208.220.226', '176.10.99.200', '87.118.112.63', '145.239.210.106', '199.249.230.64', '139.99.98.191', '89.34.237.151', '62.210.105.86', '37.218.245.25', '109.70.100.18', '148.103.217.144', '162.247.74.199', '54.39.148.232', '51.255.106.85', '103.208.220.122', '103.236.201.110', '23.129.64.106', '178.175.131.194', '154.127.60.92', '45.79.144.222', '158.69.192.239', '144.217.60.239', '178.17.174.10', '195.176.3.19', '51.15.128.3', '179.43.146.230', '88.76.70.239', '178.63.97.34', '185.220.101.3', '54.38.57.158', '185.220.101.32', '91.121.112.181', '5.79.68.161', '51.77.201.37', '84.53.225.118', '85.248.227.164', '51.75.66.250', '103.234.220.197', '198.211.122.191', '185.100.85.132', '199.19.224.70', '163.172.190.234', '84.19.181.25', '185.127.25.68', '37.187.96.78', '137.132.80.110', '197.231.221.211', '192.42.116.19', '185.220.101.52', '198.96.155.3', '195.176.3.23', '176.107.179.147', '95.141.35.15', '80.169.241.76', '71.19.148.20', '195.176.3.19', '103.76.180.54', '46.17.46.199', '192.160.102.169', '187.178.75.109', '82.223.27.82', '62.210.157.133', '185.220.101.6', '178.17.171.39', '5.196.1.129', '89.187.143.81', '217.170.197.83', '37.59.112.7', '178.17.170.194', '109.70.100.19', '31.185.104.21', '185.175.208.180', '23.129.64.105', '166.70.15.14', '58.153.198.85', '24.3.111.83', '185.32.124.147', '204.85.191.31', '91.209.70.133', '103.28.52.93', '210.141.245.114', '178.20.55.18', '216.239.90.19', '185.175.208.179', '24.20.43.120', '186.214.72.37', '84.0.40.53', '78.41.115.145', '95.211.118.194', '199.249.230.69', '107.155.96.90', '5.254.146.3', '45.62.247.210', '107.181.161.182', '185.100.87.207', '60.157.81.1', '192.160.102.165', '144.217.164.213', '79.137.79.167', '185.220.101.22', '185.220.102.8', '51.38.162.232', '157.230.30.37', '212.47.229.60', '173.212.205.67', '138.197.177.62', '163.172.160.182', '54.37.234.66', '199.249.230.78', '51.15.74.143', '79.172.193.32', '5.34.181.35', '199.249.230.87', '195.123.213.211', '124.109.1.207', '95.130.9.90', '193.30.34.35', '107.181.174.66', '185.86.148.90', '46.246.38.78', '104.194.228.240', '5.45.79.179', '185.220.101.7', '192.34.80.176', '176.126.83.211', '51.15.43.205', '51.15.13.245', '5.135.65.145', '185.14.29.189', '185.10.68.105', '191.101.31.118', '82.118.242.128', '185.104.120.60', '31.132.37.19', '77.68.42.132', '185.125.33.114', '198.98.49.141', '213.95.21.59', '176.10.99.200', '69.164.207.234', '199.68.196.124', '188.214.104.146', '158.255.6.242', '217.115.10.131', '158.174.122.218', '144.217.7.33', '144.217.64.46', '160.119.249.239', '198.71.81.66', '185.220.102.8', '199.249.230.81', '185.34.33.2', '139.99.96.114', '192.42.116.20', '45.76.179.27', '91.203.5.146', '158.69.37.14', '151.80.167.68', '96.70.31.155', '66.110.216.10', '37.187.239.8', '51.15.53.83', '104.196.43.128', '85.248.227.165', '158.69.201.47', '84.200.12.61', '109.236.90.209', '87.118.122.30', '107.155.49.114', '109.169.33.163', '185.193.125.168', '78.109.23.2', '171.25.193.20', '173.244.209.5', '185.222.209.87', '167.114.34.150', '92.222.38.67', '94.242.57.2', '139.162.226.245', '178.17.166.146', '195.176.3.24', '195.123.214.138', '153.132.13.58', '216.249.104.239', '185.234.217.234', '178.175.135.101', '192.42.116.13', '111.69.49.124', '204.27.60.147', '51.15.53.83', '185.25.50.151', '185.86.151.21', '166.70.207.2', '94.32.66.15', '185.220.102.7', '116.108.201.209', '162.247.74.7', '185.100.86.182', '54.38.120.209', '185.121.168.254', '147.135.153.120', '178.17.166.147', '38.75.136.93', '185.10.68.76', '185.220.101.44', '51.38.113.64', '176.31.180.157', '176.58.100.98', '185.10.68.52', '94.199.213.135', '59.127.163.155', '83.136.106.136', '185.220.100.254', '130.149.80.199', '5.199.130.127', '31.220.1.98', '185.242.113.224', '199.249.230.72', '141.136.44.21', '178.175.135.102', '176.121.81.51', '82.247.198.227', '185.220.101.12', '46.246.49.163', '171.25.193.235', '178.17.170.196', '37.157.194.22', '46.98.197.43', '89.248.162.130', '64.71.145.124', '167.114.108.152', '95.215.44.194', '178.17.166.148', '198.167.223.38', '109.69.67.17', '178.20.55.16', '205.185.127.219', '185.61.149.193', '149.202.238.204', '198.98.52.93', '199.249.230.76', '185.169.43.195', '51.75.71.123', '141.136.44.23', '91.250.241.241', '5.2.64.194', '188.68.45.180', '185.233.100.23', '46.98.201.125', '82.228.252.20', '139.162.144.133', '192.160.102.168', '192.42.116.24', '192.99.151.112', '5.150.254.67', '178.32.53.53', '51.15.3.40', '46.165.254.166', '139.99.173.172', '185.234.217.242', '185.104.120.4', '185.32.124.226', '51.15.48.204', '49.50.66.209', '51.15.80.14', '50.7.176.2', '37.218.245.25', '185.220.101.45', '5.2.77.146', '51.15.235.211', '104.218.63.72', '75.72.71.124', '45.56.103.80', '89.236.34.117', '103.27.124.82', '51.15.68.66', '185.248.160.21', '185.220.101.27', '185.220.102.4', '199.249.230.77', '199.249.230.65', '77.250.227.202', '45.64.186.102', '46.36.38.57', '45.62.233.160', '66.42.224.235', '195.123.224.108', '89.34.237.111']