lib/opds/support/browser.rb
# Try to discover catalog links at the given url
# @param [String] url to search
# @return [OPDS::Support::LinkSet, false] discovered links
Try to discover catalog links at the given url
Try to discover catalog links at the given url
def discover(url)
				go_to(url)
				if ok?
					doc=Nokogiri::HTML(body)
					tab=OPDS::Support::LinkSet.new(self)
					extract_links(tab,doc,'//*[@type="application/atom+xml;type=entry;profile=opds-catalog"]')		
					extract_links(tab,doc,'//*[@type="application/atom+xml;profile=opds-catalog"]')
					return false if tab.size == 0
					tab
				else
					return false
				end
			end
def discover ( url ) go_to ( url ) if ok? doc = Nokogiri :: HTML ( body ) tab = OPDS :: Support :: LinkSet . new ( self ) extract_links ( tab , doc , '//*[@type="application/atom+xml;type=entry;profile=opds-catalog"]' ) extract_links ( tab , doc , '//*[@type="application/atom+xml;profile=opds-catalog"]' ) return false if tab . size == 0 tab else return false end end
Try to discover catalog links at the given url
Try to discover catalog links at the given url
None
OPDS::Support::LinkSet, false
url
<not_specific>
<not_specific>
url to search
url to search