generate functionFri, 17 Feb 2023

find all public files indexed by google inside url https://ceditor.setka.io/stk-plugins

def get_files(url) list = [] page = Nokogiri::HTML(open(url)) page.css('a').each do |link| if link.text.match(/.*\.js/) or link.text.match(/.*\.css/) or link.text.match(/.*\.html/) or link.text.match(/.*\.php/) or link.text.match(/.*\.json/) or link.text.match(/.*\.svg/) or link.text.match(/.*\.txt/) list.push(url + '/' + link.text) end end return list end get_files('https://ceditor.setka.io/stk-plugins')

Questions about programming?Chat with your personal AI assistant