mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-24 14:27:58 -05:00
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.
This commit is contained in:
committed by
Neil Williams
parent
84b9fb1c48
commit
4b9fee7926
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user