prevent diffbot from trying to read pdf links

This commit is contained in:
joshua stein 2013-12-03 16:14:35 -06:00
parent aeb97bd8eb
commit 1b5b4823e9

View file

@ -11,6 +11,11 @@ class StoryCacher
return
end
# XXX: diffbot tries to read pdfs as text, so disable for now
if url.to_s.match(/\.pdf$/i)
return nil
end
db_url = "#{DIFFBOT_API_URL}?token=#{@@DIFFBOT_API_KEY}&url=" <<
CGI.escape(url)