This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
76 lines (70 loc) · 2.88 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
from follow_bot import spotify
import threading, os, time
from colors import green, red, reset
lock = threading.Lock()
counter = 0
proxies = []
proxy_counter = 0
logo = ''' ,----------------, ,---------,
,-----------------------, ," ,"|
," ,"| ," ," |
+-----------------------+ | ," ," |
| .-----------------. | | +---------+ |
| | | | | | -==----'| |
| | Made by | | | | | |
| | cosmohacker | | |/----|`---= | |
| | C:\>_ | | | ,/|==== ooo | ;
| | | | | // |(((( [33]| ,"
| `-----------------' |," .;'| |(((( | ,"
+-----------------------+ ;; | | |," -github.com/cosmohacker-
/_)______________(_/ //' | +---------+
___________________________/___ `,
/ oooooooooooooooo .o. oooo /, \,"-----------
/ ==ooooooooooooooo==.o. ooo= // ,`\--{)B ,"
/_==__==========__==_ooo__ooo=_/' /___________,"
`-----------------------------'''
print('%s%s' % (green(), logo))
spotify_profile = str(input("Spotify Link or Username: "))
threads = int(input("\nThreads: "))
def load_proxies():
if not os.path.exists("proxies.txt"):
print("\nFile proxies.txt not found")
time.sleep(10)
os._exit(0)
with open("proxies.txt", "r", encoding = "UTF-8") as f:
for line in f.readlines():
line = line.replace("\n", "")
proxies.append(line)
if not len(proxies):
print("\nNo proxies loaded in proxies.txt")
time.sleep(10)
os._exit(0)
print("\n[1] Proxies\n[2] Proxyless")
option = int(input("\n> "))
if option == 1:
load_proxies()
def safe_print(arg):
lock.acquire()
print(arg)
lock.release()
def thread_starter():
global counter
if option == 1:
obj = spotify(spotify_profile, proxies[proxy_counter])
else:
obj = spotify(spotify_profile)
result, error = obj.follow()
if result == True:
counter += 1
safe_print("Followed {}".format(counter))
else:
safe_print(f"Error {error}")
while True:
if threading.active_count() <= threads:
try:
threading.Thread(target = thread_starter).start()
proxy_counter += 1
except:
pass
if len(proxies) <= proxy_counter: #Loops through proxy file
proxy_counter = 0