Skip to content

Commit

Permalink
Feature: Support JSON Feed autodiscovery. Fixes #250.
Browse files Browse the repository at this point in the history
  • Loading branch information
benubois committed Jan 24, 2020
1 parent 62732d7 commit cc89dd7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/models/source/meta_links.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@ def find_links

private

def document
@document ||= Nokogiri::HTML(@config[:request].body)
end

def link_valid?(link)
valid = false
types = ["application/rss+xml", "application/atom+xml"]
types = ["application/rss+xml", "application/atom+xml", "application/json"]
if link["type"] && link["href"]
type = link["type"].strip.downcase
valid = types.include?(type)
Expand Down

0 comments on commit cc89dd7

Please sign in to comment.