diff --git a/embedly/client.py b/embedly/client.py index e175976..4e8ed1a 100644 --- a/embedly/client.py +++ b/embedly/client.py @@ -8,6 +8,7 @@ import urllib import httplib2 import json +import itertools from models import Url @@ -62,6 +63,13 @@ def get_services(self): return self.services + def url_is_serviced(self, url): + """ + If a URL is serviced by Embed.ly, return True. Otherwise return False. + """ + services = self.get_services() + return self._regex.match(url) is not None + @property def regex(self): """