-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support for urls without http/s #160
base: master
Are you sure you want to change the base?
Conversation
7e6a69a
to
fdf62ef
Compare
fdf62ef
to
37e5590
Compare
validate_code = validate_url.status_code | ||
if url.startswith(("http://", "https://")): | ||
validate_code = requests.get(url).status_code | ||
elif requests.get("http://" + url).status_code == 200: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above 2 line code is sufficient. Don't need this.
validate_code = validate_url.status_code | ||
if url.startswith(("http://", "https://")): | ||
validate_code = requests.get(url).status_code | ||
elif requests.get("http://" + url).status_code == 200: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
validate_code = validate_url.status_code | ||
if url.startswith(("http://", "https://")): | ||
validate_code = requests.get(url).status_code | ||
elif requests.get("http://" + url).status_code == 200: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
Fixed #155
User will be able to add urls without url scheme (http/s).
Support for urls with ftp, mailto, telnet is not added yet.