Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'fork-origin/master'
Conflicts:
	embedly/client.py
  • Loading branch information
umbrae committed Nov 22, 2011
commit 659d6a4bef3873eec86f83b56db2cc7aa6fa2ff6
24 changes: 7 additions & 17 deletions embedly/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ def get_services(self):
resp_data = json.loads(content)
self.services = resp_data

#build the regex that we can use later.
_regex = []
for each in self.get_services():
_regex.append('|'.join(each.get('regex',[])))

self._regex = re.compile('|'.join(_regex))

return self.services

def service_matcher(self):
Expand All @@ -76,23 +83,6 @@ def url_is_serviced(self, url):
"""
return self.service_matcher().match(url) is not None

def _get(self, version, method, url_or_urls, **kwargs):
"""
_get makes the actual call to pro.embed.ly/api.embed.ly
"""

query = ''

if self.key:

_regex = []
for each in self.get_services():
_regex.append('|'.join(each.get('regex',[])))

self._regex = re.compile('|'.join(_regex))

return self.services

@property
def regex(self):
"""
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.