File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -106,13 +106,13 @@ def search args
106
106
term = args . join ( " " )
107
107
puts
108
108
term = term . encode ( "ISO-8859-1" )
109
- url = "https://fddb.info/db/de/suche/?udd=0&cat=site-de&search=#{ URI . escape ( term ) } "
109
+ url = "https://fddb.info/db/de/suche/?udd=0&cat=site-de&search=#{ CGI . escape ( term ) } "
110
110
111
- page = Nokogiri ::HTML ( open ( url ) )
111
+ page = Nokogiri ::HTML ( URI . open ( url ) )
112
112
results = page . css ( ".standardcontent a" ) . map { |a | a [ "href" ] } . select { |href | href . include? "lebensmittel" }
113
113
114
114
results [ 0 ..4 ] . each do |result |
115
- page = Nokogiri ::HTML ( open ( result ) )
115
+ page = Nokogiri ::HTML ( URI . open ( result ) )
116
116
title = page . css ( ".breadcrumb a" ) . last . text
117
117
brand = page . css ( ".standardcontent p a" ) . select { |a | a [ "href" ] . include? "hersteller" } . first . text
118
118
puts "#{ title } (#{ brand } )"
You can’t perform that action at this time.
0 commit comments