From 4b9fee79269500a0ab7c026eb7bfb9356838e193 Mon Sep 17 00:00:00 2001 From: Sean Creeley Date: Tue, 2 Aug 2011 12:34:04 -0700 Subject: [PATCH] Use an API key for the embed.ly API. Open sorcerers: you will need an API key for media scraping to work now. Please visit http://embed.ly to sign up. It's free for <10K URLs a month. --- r2/example.ini | 2 ++ r2/r2/lib/scraper.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/r2/example.ini b/r2/example.ini index c1e0d6aed..39d6dc29b 100755 --- a/r2/example.ini +++ b/r2/example.ini @@ -313,6 +313,8 @@ s3_thumb_bucket = test.your.domain.here default_thumb = /static/noimage.png self_thumb = /static/self_default2.png media_domain = localhost +# Embedly API Key +embedly_api_key = # -- limits -- # rate limiter duration (minutes) diff --git a/r2/r2/lib/scraper.py b/r2/r2/lib/scraper.py index 4a0c4fb01..152355dde 100644 --- a/r2/r2/lib/scraper.py +++ b/r2/r2/lib/scraper.py @@ -1318,8 +1318,8 @@ class EmbedlyOEmbed(OEmbed): , re.I ) - api_endpoint = 'http://api.embed.ly/v1/api/oembed' - api_params = {'format':'json', 'maxwidth':600 } + api_endpoint = 'http://api.embed.ly/1/oembed' + api_params = {'format':'json', 'maxwidth':600, 'key' : g.embedly_api_key } class GenericScraper(MediaScraper): """a special scrapper not associated with any domains, used to