nokogiri
Mechanize get a file instead of a page object
i try to scrap a web page. I use Nokogiri/ Mechanize. so if i make page = agent.get(url) page.class => Mechanize::开发者_JAVA百科File[详细]
2023-04-08 16:19 分类:问答Routing error after call to RDF::RDFa::Reader
I\'ve posted a question relating to this before but it was unclear. I\'ve simplified the code so I can copy it here and have it be as straightforward as possible. I\'m still not sure what the best way[详细]
2023-04-07 23:29 分类:问答How to get the proper values after a html table parse with ruby/nokogiri
I have searched and searched for 3 days straight now trying to get a data scraper to work and it seems like I have successfully parsed the HTML table that looks like this:[详细]
2023-04-06 21:32 分类:问答stumped on clicking a link with nokogiri and mechanize
perhaps im doing it wrong, or there\'s another more efficient way. Here is my problem: I first, using nokogiri open an html document and use its css to traverse the document until i find the link whi[详细]
2023-04-06 11:47 分类:问答Extracting links in a class
doc.xpath(\"//div[@id=\'Ci_\']\").each_with_index do |div,i| parse_file.puts \"#{div.at_xpath(\"./*[@class=\'class1\']\").text}\"[详细]
2023-04-06 05:08 分类:问答Nokogiri table parsing
My problem is that I can\'t get to the second row in this table It only prints out the text from the td\'s on the first tr.[详细]
2023-04-05 06:19 分类:问答Strip Font Tags from XML with nokogiri
I\'m trying to clean up some xml by removing Font Tags. Here\'s what I start with: <?xml version=\"1.0\"?>[详细]
2023-04-05 05:42 分类:问答Parsing html with rails and nokogiri
I need to parse HTML using Rails and Nokogiri. Here is the HTML: <body> <div id=\"mama\"> <div class=\"test1\">text</div>[详细]
2023-04-04 09:22 分类:问答Nokogiri replace inner text with <span>ed words
Here\'s an example HTML fragment: <p class=\"stanza\">Thus grew the tale of Wonderland:<br/>[详细]
2023-04-04 09:22 分类:问答How do I omit script elements from HTML using XPath in Nokogiri in Ruby on Rails?
Say I start with everything inside the body element: Nokogiri::HTML( doc ).xpath( \"/html/body/node()\" ).to_html[详细]
2023-04-03 23:52 分类:问答