Skip to content

Commit 393c9c3

Browse files
committed
Youtube & Twitch Support
1 parent cd70517 commit 393c9c3

3 files changed

Lines changed: 21 additions & 17 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ This is a script I made a while back to check the availability of OG words as ha
1111

1212
### Known Supported Services
1313
- Minecraft
14-
- Twitter (IMPROVED in 1.4)
15-
- Instagram* (IMPROVED in 1.4, sometimes doesn't work still)
14+
- Twitter (IMPROVED in 1.4, strict rate limit)
15+
- Instagram (IMPROVED in 1.4, strict rate limit)
1616
- Steam ID URLs
1717
- Steam Group URLs
1818
- Mixer (formerly Beam.pro)
19+
- Twitch.tv Passport
1920
- Soundcloud
2021
- Github
2122
- About.me
23+
- YouTube (/{username} url format)
2224

2325
### Known Unsupported Services
2426
- Snapchat

UsernameChecker.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@
3737
5:"https://steamcommunity.com/id/%word%",
3838
6:"https://steamcommunity.com/groups/%word%",
3939
7:"https://soundcloud.com/%word%",
40-
8:"https://twitch.tv/%word%",
40+
8:"https://passport.twitch.tv/usernames/%word%",
4141
9:"https://mixer.com/api/v1/channels/%word%",
4242
10:"https://github.com/%word%",
43-
11:"https://about.me/%word%"
43+
11:"https://about.me/%word%",
44+
12:"https://youtube.com/%word%"
4445
}
4546

4647
def generate_pw(size=16, chars=string.ascii_uppercase + string.digits + string.ascii_lowercase):
@@ -105,10 +106,17 @@ def log_result(response, word, link, matches=None):
105106
available(word, service, link)
106107
else:
107108
taken(word, service)
109+
elif int(SITE) == 8: # Twitch
110+
taken(word, service)
108111
else:
109112
taken(word, service)
110-
elif (int(SITE) == 2) and (response.status_code == 204):
111-
available(word, service, link)
113+
elif response.status_code == 204:
114+
if int(SITE) == 2:
115+
available(word, service, link)
116+
elif int(SITE) == 8:
117+
available(word, service, link)
118+
else:
119+
print("The username " + word + " requires manual verification on " + service + " (" + str(response.status_code) + ")")
112120
elif response.status_code == 404:
113121
available(word, service, link)
114122
else:
@@ -168,14 +176,6 @@ def parse_page(words):
168176
match2 = soup.body.findAll(text='Request To Join')
169177
match3 = soup.find('div', attrs={'class': 'grouppage_header'})
170178

171-
matches = [match1, match2, match3]
172-
elif int(SITE) == 8:
173-
# Available
174-
match1 = soup.body.findAll(text='Sorry. Unless you\’ve got a time machine, that content is unavailable.')
175-
# Taken
176-
match2 = soup.find('div', attrs={'id': 'player'})
177-
match3 = soup.body.findAll(text='The community has closed this channel due to terms of service violations.')
178-
179179
matches = [match1, match2, match3]
180180
else:
181181
print("Wrong site!")
@@ -196,7 +196,7 @@ def main():
196196
words = fx.read().split('\n')
197197
fx.close()
198198

199-
if (int(SITE) == 5) or (int(SITE) == 6) or (int(SITE) == 8): # Steam and Twitch
199+
if (int(SITE) == 5) or (int(SITE) == 6): # Steam
200200
parse_page(words)
201201
elif int(SITE) == 4: # Instagram
202202
send_post(words)
@@ -217,7 +217,7 @@ def main():
217217
elif ans == "N":
218218
confirm = input("Continue executing script? (y|N)")
219219
if confirm == "y":
220-
print("_________________________________\n| SERVICE | VALUE TO ENTER |\n_________________________________\n| CUSTOM | 1 |\n| MINECRAFT | 2 |\n| TWITTER | 3 |\n| INSTAGRAM | 4 |\n| STEAM ID | 5 |\n| STEAM GROUP | 6 |\n| SOUNDCLOUD | 7 |\n| MIXER | 9 |\n| GITHUB | 10 |\n| ABOUT.ME | 11 |\n_________________________________\nQuit? (y/N)\n")
220+
print("_________________________________\n| SERVICE | VALUE TO ENTER |\n_________________________________\n| CUSTOM | 1 |\n| MINECRAFT | 2 |\n| TWITTER | 3 |\n| INSTAGRAM | 4 |\n| STEAM ID | 5 |\n| STEAM GROUP | 6 |\n| SOUNDCLOUD | 7 |\n| TWITCH | 8 |\n| MIXER | 9 |\n| GITHUB | 10 |\n| ABOUT.ME | 11 |\n| YOUTUBE | 12 |\n_________________________________\nQuit? (y/N)\n")
221221
SITE = input("Enter the number from the table above with the site you want to check...")
222222

223223
if SITE.isdigit():

config.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@
1010
; | STEAM ID | 5 |
1111
; | STEAM GROUP | 6 |
1212
; | SOUNDCLOUD | 7 |
13+
; | TWITCH | 8 |
1314
; | MIXER | 9 |
1415
; | GITHUB | 10 |
1516
; | ABOUT.ME | 11 |
17+
; | YOUTUBE | 12 |
1618
; _________________________________
1719

1820
[site]
1921
; Place the number from the table above that corresponds
2022
; with the site you want to check available names for.
2123
; If your target site is not listed, put "1" for CUSTOM (without the quotes).
22-
siteNum = 3
24+
siteNum = 12
2325
; Fill in the option below with the profile URL of the service you want to check available names for.
2426
; Use %%word%% as the placeholder for the username to check.
2527
; customSite is only for sites not specifically listed in the chart above, but please be aware

0 commit comments

Comments
 (0)