lib/onebox/engine/pubmed_onebox.rb in onebox-1.3.8 vs lib/onebox/engine/pubmed_onebox.rb in onebox-1.3.9
- old
+ new
@@ -2,15 +2,10 @@
module Engine
class PubmedOnebox
include Engine
include LayoutSupport
- matches do
- http
- domain("www.ncbi.nlm.nih")
- tld("gov")
- has("/pubmed/")
- end
+ matches_regexp Regexp.new("^http(?:s)?://(?:(?:\\w)+\\.)?(www.ncbi.nlm.nih)\\.gov(?:/)?/pubmed/")
private
def get_xml
doc = Nokogiri::XML(open(@url + "?report=xml&format=text"))