add udp to is_url to allow udp trackers

This commit is contained in:
Marcos Pinto 2008-11-01 03:30:20 +00:00
parent 72aaef6191
commit 6d3acf6dca
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ def ftime(seconds):
def is_url(url): def is_url(url):
"""A simple regex test to check if the URL is valid.""" """A simple regex test to check if the URL is valid."""
import re import re
return bool(re.search('^(https?|ftp)://', url)) return bool(re.search('^(https?|ftp|udp)://', url))
def is_magnet(uri): def is_magnet(uri):
"""Returns True if uri is a valid bittorrent magnet uri.""" """Returns True if uri is a valid bittorrent magnet uri."""