fixed issue #9

pull/12/head
Siddharth Dushantha 6 years ago
parent ad23efc785
commit 41a44be6cd

2
.gitignore vendored

@ -1,3 +1,3 @@
# Jupyter Notebook # Jupyter Notebook
.ipynb_checkpoints .ipynb_checkpoints
.ipynb *.ipynb

@ -20,7 +20,8 @@
}, },
"Blogger": { "Blogger": {
"url": "https://{}.blogspot.com", "url": "https://{}.blogspot.com",
"errorType": "status_code" "errorType": "status_code",
"noPeriod": "True"
}, },
"Google Plus": { "Google Plus": {
"url": "https://plus.google.com/+{}", "url": "https://plus.google.com/+{}",
@ -38,7 +39,8 @@
}, },
"GitHub": { "GitHub": {
"url": "https://www.github.com/{}", "url": "https://www.github.com/{}",
"errorType": "status_code" "errorType": "status_code",
"noPeriod": "True"
}, },
"Steam": { "Steam": {
"url": "https://steamcommunity.com/id/{}", "url": "https://steamcommunity.com/id/{}",
@ -64,7 +66,8 @@
}, },
"DeviantART": { "DeviantART": {
"url": "https://{}.deviantart.com", "url": "https://{}.deviantart.com",
"errorType": "status_code" "errorType": "status_code",
"noPeriod": "True"
}, },
"VK": { "VK": {
"url": "https://vk.com/{}", "url": "https://vk.com/{}",
@ -161,12 +164,14 @@
"Kongregate": { "Kongregate": {
"url": "https://www.kongregate.com/accounts/{}", "url": "https://www.kongregate.com/accounts/{}",
"errorType": "message", "errorType": "message",
"errorMsg": "Sorry, no account with that name was found." "errorMsg": "Sorry, no account with that name was found.",
"noPeriod": "True"
}, },
"LiveJournal": { "LiveJournal": {
"url": "https://{}.livejournal.com", "url": "https://{}.livejournal.com",
"errorType": "message", "errorType": "message",
"errorMsg": "Unknown Journal" "errorMsg": "Unknown Journal",
"noPeriod": "True"
}, },
"VSCO": { "VSCO": {
"url": "https://vsco.co/{}", "url": "https://vsco.co/{}",
@ -185,7 +190,8 @@
"Dribbble": { "Dribbble": {
"url": "https://dribbble.com/{}", "url": "https://dribbble.com/{}",
"errorType": "message", "errorType": "message",
"errorMsg": "Whoops, that page is gone." "errorMsg": "Whoops, that page is gone.",
"noPeriod": "True"
}, },
"Codecademy": { "Codecademy": {
"url": "https://www.codecademy.com/{}", "url": "https://www.codecademy.com/{}",
@ -208,7 +214,8 @@
}, },
"Newgrounds": { "Newgrounds": {
"url": "https://{}.newgrounds.com", "url": "https://{}.newgrounds.com",
"errorType": "status_code" "errorType": "status_code",
"noPeriod": "True"
}, },
"Wattpad": { "Wattpad": {
"url": "https://www.wattpad.com/user/{}", "url": "https://www.wattpad.com/user/{}",
@ -243,7 +250,8 @@
"Contently": { "Contently": {
"url": "https://{}.contently.com/", "url": "https://{}.contently.com/",
"errorType": "message", "errorType": "message",
"errorMsg": "We can't find that page!" "errorMsg": "We can't find that page!",
"noPeriod": "True"
}, },
"Houzz": { "Houzz": {
"url": "https://houzz.com/user/{}", "url": "https://houzz.com/user/{}",
@ -302,7 +310,8 @@
}, },
"Slack": { "Slack": {
"url": "https://{}.slack.com", "url": "https://{}.slack.com",
"errorType": "status_code" "errorType": "status_code",
"noPeriod": "True"
}, },
"Trip": { "Trip": {
"url": "https://www.trip.skyscanner.com/user/{}", "url": "https://www.trip.skyscanner.com/user/{}",
@ -336,7 +345,8 @@
"WordPress": { "WordPress": {
"url": "https://{}.wordpress.com", "url": "https://{}.wordpress.com",
"errorType": "response_url", "errorType": "response_url",
"errorUrl": "wordpress.com/typo/?subdomain=" "errorUrl": "wordpress.com/typo/?subdomain=",
"noPeriod": "True"
}, },
"Unsplash": { "Unsplash": {
"url": "https://unsplash.com/@{}", "url": "https://unsplash.com/@{}",

@ -46,6 +46,11 @@ def main():
url = data.get(social_network).get("url").format(username) url = data.get(social_network).get("url").format(username)
error_type = data.get(social_network).get("errorType") error_type = data.get(social_network).get("errorType")
cant_have_period = data.get(social_network).get("noPeriod")
if cant_have_period == "True":
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Not Found!".format(social_network))
continue
r = requests.get(url, headers=headers) r = requests.get(url, headers=headers)

Loading…
Cancel
Save