Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Created April 14, 2016 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurozumi/42f26d67e89294914a3695de5cd6a9d4 to your computer and use it in GitHub Desktop.
Save kurozumi/42f26d67e89294914a3695de5cd6a9d4 to your computer and use it in GitHub Desktop.
【Python】URLかどうか調べる方法
# coding: utf-8
from urlparse import urlparse
url = "http://www.yahoo.co.jp"
o = urlparse(url)
assert len(o.scheme) > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment