-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usernames with "." #9
Comments
You are right, I tried a username with a period and I got some strange error when it tries AngleList. Its strange though, when I visit https://angel.co/siddharth.dushantha I get a user, but if I make Python do it, I get nothing. import requests
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0'
}
r = requests.get("https://angel.co/siddharth.dushantha")
r.status_code
# 404
r.text
# '' Edit: Do you know whats going on? |
possible missing import requests
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0'
}
r = requests.get("https://angel.co/siddharth.dushantha", headers=headers)
print('Siddharth Sivaraman' in r.text)
# True |
@hldh214 |
fixed it :) |
After this change, any site that has the "noPeriod" attribute set to "True" in the json incorrectly says that the user name is not supported. Even if they do not have a period set in their user name. The if statement needs to check if there could even be a problem before doing the continue. I will submit another pull request... |
test on ubuntu with Python 3.6.7 return:
here is the complete list: |
It breaks when I search for a username that has a dot/period
The text was updated successfully, but these errors were encountered: