36 lines
876 B
Python
36 lines
876 B
Python
import os
|
|
from dotenv import load_dotenv
|
|
import requests
|
|
import json
|
|
from requests_tor import RequestsTor
|
|
|
|
|
|
load_dotenv()
|
|
|
|
torpass = os.getenv('TORSPWD')
|
|
|
|
rt = RequestsTor(tor_ports=(9001, 9002, 9003, 9004, 9005), tor_cport=9051, password=torpass, autochange_id=1)
|
|
# check your ip
|
|
rt.check_ip()
|
|
|
|
url = 'https://httpbin.org/anything'
|
|
r = rt.get(url)
|
|
print(r.text)
|
|
|
|
|
|
with open('./ktvmanager/lib/DNS_list.txt') as f:
|
|
lines = [line.rstrip('\n') for line in f]
|
|
print(lines)
|
|
|
|
hard_url = '/player_api.php?password=gkuEDWzxHD&username=Karl061122&action=user&sub=info'
|
|
|
|
complete_list_of_urls = []
|
|
|
|
for url in lines:
|
|
data = requests.get(url)
|
|
content = json.loads(data.text)
|
|
list_of_urls = content['su'].split(',')
|
|
for url in list_of_urls:
|
|
complete_list_of_urls.append(url)
|
|
complete_list_of_urls = list(set(complete_list_of_urls))
|
|
print(complete_list_of_urls) |