Skip to content

Commit

Permalink
Update thumbnail generator
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenmcd committed Jan 12, 2014
1 parent 7a28a42 commit 81b9a94
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions demo/management/commands/sites_thumbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ def create_webkit(self, url, full_path, thumb_dir, title, delay):
return full_path.replace(".jpg", ".png")

def create_snapito(self, url, delay):
if delay:
delay = "&delay=%s" % delay
else:
delay = ""
api_key = settings.SNAPITO_KEY
api_url = "http://api.snapito.com/web/%s/full?freshness=1&url=%s%s" % (
api_key, url, delay)
# if delay:
# delay = "&delay=%s" % delay
# else:
# delay = ""
# api_key = settings.SNAPITO_KEY
# api_url = "http://api.snapito.com/web/%s/full?freshness=1&url=%s%s" % (
# api_key, url, delay)
api_url = "http://api.snapito.com/free/full/%s" % url
return urlretrieve(api_url)[0]

def handle(self, **options):
Expand Down

0 comments on commit 81b9a94

Please sign in to comment.