Add files via upload

pull/11/head
Siddharth Dushantha 6 years ago committed by GitHub
parent 318237a0f5
commit f9dd54df2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,183 @@
{
"Instagram": {
"url": "https://www.instagram.com/{}",
"errorType": "message",
"errorMsg": "The link you followed may be broken"
},
"Twitter": {
"url": "https://www.twitter.com/{}",
"errorType": "message",
"errorMsg": "page doesnt exist"
},
"Facebook": {
"url": "https://www.facebook.com/{}",
"errorType": "message",
"errorMsg": "not found"
},
"YouTube": {
"url": "https://www.youtube.com/{}",
"errorType": "message",
"errorMsg": "Not Found"
},
"Blogger": {
"url": "https://{}.blogspot.com",
"errorType": "status_code"
},
"Google Plus": {
"url": "https://plus.google.com/+{}",
"errorType": "status_code"
},
"Reddit": {
"url": "https://www.reddit.com/user/{}",
"errorType": "message",
"errorMsg":"page not found"
},
"Pinterest": {
"url": "https://www.pinterest.com/{}",
"errorType": "response_url",
"errorMsgInUrl": "?show_error"
},
"GitHub": {
"url": "https://www.github.com/{}",
"errorType": "message",
"errorMsg": "404 Not Found"
},
"Steam": {
"url": "https://steamcommunity.com/id/{}",
"errorType": "message",
"errorMsg": "The specified profile could not be found"
},
"Vimeo": {
"url": "https://vimeo.com/{}",
"errorType": "message",
"errorMsg": "404 Not Found"
},
"SoundCloud": {
"url": "https://soundcloud.com/{}",
"errorType": "message",
"errorMsg": "404 Not Found"
},
"Tumblr": {
"url": "https://{}.tumblr.com",
"errorType": "message",
"errorMsg": " There's nothing here"
},
"Disqus": {
"url": "https://disqus.com/{}",
"errorType": "message",
"errorMsg": "404 NOT FOUND"
},
"Medium": {
"url": "https://medium.com/@{}",
"errorType": "status_code"
},
"DeviantART": {
"url": "https://{}.deviantart.com",
"errorType": "status_code"
},
"VK": {
"url": "https://vk.com/{}",
"errorType": "status_code"
},
"About.me": {
"url": "https://about.me/{}",
"errorType": "status_code"
},
"Imgur": {
"url": "https://imgur.com/user/{}",
"errorType": "status_code"
},
"Flipboard": {
"url": "https://flipboard.com/@{}",
"errorType": "status_code"
},
"SlideShare": {
"url": "https://slideshare.net/{}",
"errorType": "status_code"
},
"Fotolog": {
"url": "https://fotolog.com/{}",
"errorType": "status_code"
},
"Spotify": {
"url": "https://open.spotify.com/user/{}",
"errorType": "status_code"
},
"MixCloud": {
"url": "https://www.mixcloud.com/{}",
"errorType": "message",
"errorMsg": "Page Not Found"
},
"Scribd": {
"url": "https://www.scribd.com/{}",
"errorType": "message",
"errorMsg": "Page not found"
},
"Patreon": {
"url": "https://www.patreon.com/{}",
"errorType": "status_code"
},
"BitBucket": {
"url": "https://bitbucket.org/{}",
"errorType": "status_code"
},
"Roblox": {
"url": "https://www.roblox.com/user.aspx?username={}",
"errorType": "message",
"errorMsg": "Page cannot be found or no longer exists"
},
"Gravatar": {
"url": "http://en.gravatar.com/{}",
"errorType": "message",
"errorMsg": "Were sorry, we couldn't find that profile"
},
"iMGSRC.RU": {
"url": "https://imgsrc.ru/main/user.php?user={}",
"errorType": "message",
"errorMsg": "Rapidly growing community of over a million users, dedicated to sharing."
},
"DailyMotion": {
"url": "https://www.dailymotion.com/{}",
"errorType": "message",
"errorMsg": "Page not found"
},
"Etsy": {
"url": "https://www.etsy.com/shop/{}",
"errorType": "status_code"
},
"CashMe": {
"url": "https://cash.me/{}",
"errorType": "message",
"errorMsg": "Oh no"
},
"Behance": {
"url": "https://www.behance.net/{}",
"errorType": "message",
"errorMsg": "Oops! We cant find that page."
},
"GoodReads": {
"url": "https://www.goodreads.com/{}",
"errorType": "message",
"errorMsg": "Sorry you lost your way."
},
"Instructables": {
"url": "https://www.instructables.com/member/{}",
"errorType": "message",
"errorMsg": "404: We're sorry, things break sometimes"
},
"Keybase": {
"url": "https://keybase.io/{}",
"errorType": "message",
"errorMsg": "Sorry, what you are looking for...it does not exist."
},
"Kongregate": {
"url": "https://www.kongregate.com/accounts/{}",
"errorType": "message",
"errorMsg": "Sorry, no account with that name was found."
},
"LiveJournal": {
"url": "https://{}.livejournal.com",
"errorType": "message",
"errorMsg": "Unknown Journal"
}
}

@ -0,0 +1,80 @@
import requests
import json
import os
def write_to_file(url, fname):
with open(fname, "a") as f:
f.write(url+"\n")
def main():
# Not sure why, but the banner messes up if i put into one print function
print(" .\"\"\"-.")
print(" / \\")
print("\033[37;1m ____ _ _ _ | _..--'-.")
print("\033[37;1m/ ___|| |__ ___ _ __| | ___ ___| |__ >.`__.-\"\"\;\"`")
print("\033[37;1m\___ \| '_ \ / _ \ '__| |/ _ \ / __| |/ / / /( ^\\")
print("\033[37;1m ___) | | | | __/ | | | (_) | (__| < '-`) =|-.")
print("\033[37;1m|____/|_| |_|\___|_| |_|\___/ \___|_|\_\ /`--.'--' \ .-.")
print("\033[37;1m .'`-._ `.\ | J /")
print("\033[37;1m / `--.| \__/\033[0m")
username = input("\033[92;1m[\033[37;1m?\033[92;1m]\033[92;1m Input Username: \033[0m")
print()
fname = username+".txt"
if os.path.isfile(fname):
os.remove(fname)
print("\033[1;92m[\033[0m\033[1;77m*\033[0m\033[1;92m] Removing previous file:\033[1;37m {}\033[0m".format(fname))
print("\033[1;92m[\033[0m\033[1;77m*\033[0m\033[1;92m] Checking username\033[0m\033[1;37m {}\033[0m\033[1;92m on: \033[0m".format(username))
raw = open("data.json", "r")
data = json.load(raw)
# User agent is needed because some sites does not
# return the correct information because it thinks that
# we are bot
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0'
}
for social_network in data:
url = data.get(social_network).get("url").format(username)
error_type = data.get(social_network).get("errorType")
r = requests.get(url, headers=headers)
if error_type == "message":
error = data.get(social_network).get("errorMsg")
if not error in r.text:
print("\033[37;1m[\033[92;1m+\033[37;1m]\033[92;1m {}:\033[0m".format(social_network), url)
write_to_file(url, fname)
else:
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Not Found!".format(social_network))
elif error_type == "status_code":
if not r.status_code == 404:
print("\033[37;1m[\033[92;1m+\033[37;1m]\033[92;1m {}:\033[0m".format(social_network), url)
write_to_file(url, fname)
else:
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Not Found!".format(social_network))
elif error_type == "response_url":
error = data.get(social_network).get("errorMsgInUrl")
if not error in r.url:
print("\033[37;1m[\033[92;1m+\033[37;1m]\033[92;1m {}:\033[0m".format(social_network), url)
write_to_file(url, fname)
else:
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Not Found!".format(social_network))
print("\033[1;92m[\033[0m\033[1;77m*\033[0m\033[1;92m] Saved: \033[37;1m{}\033[0m".format(username+".txt"))
main()
Loading…
Cancel
Save