search for: beautifulsoup

Displaying 10 results from an estimated 10 matches for "beautifulsoup".

2006 Mar 22
2
Successfully importing Rubyful Soup objects
All, At the top of my controller, I have: require ''rubygems'' require_gem ''rubyful_soup'' The rubyful_soup gem has been successfully installed. However, when I go to instantiate a class from it, using parser = BeautifulSoup.new(html) I get uninitialized constant BeautifulSoup Is there something else I need to do to see the symbols in the Rubyful Soup gem? Thanks, Wes P. S. I had this working like 10 minutes ago but I don''t know how - to be honest. -- Posted via http://www.ruby-forum.com/.
2006 Mar 22
2
RubyGem loading into a controller (High quality question)
...1) I have a controller. The first 4 lines are: require ''rubygems'' require_gem ''rubyful_soup'', ''>= 1.0.4'' class ESimplyController < ApplicationController 2) In this controller I have a method. Here it is: public def index parser = BeautifulSoup.new(String.new "test") #Establish the parse tree end When I execute this action, I get: "uninitialized constant BeautifulSoup" which basically tells me that the BeautifulSoup class within the rubyful_soup.rb file can''t be seen. 3) Inside of the rubyful_soup.r...
2006 Jun 25
0
rubyful_soup replace element
Hi, well, how do i replace an element with rubyful_soup ?? I tried soup = BeautifulSoup.new(input) elemnt = soup.find(''quote'') elemnt = tag(''<div></div>'') elemnt = ''<div></div>'' elemnt.replaceWith(''<div></div>'') elemnt = BeautifulSoup.new(''<div></div>'...
2008 Jun 07
2
mkhtml.py: writing HTML documents in Markdown
...3C%2Fstyle%3E> * <http://babelmark.bobtfish.net/?markdown=%3Clink+%2F%3E> But at the top of <http://canonical.org/~kragen/crywrap.html> the problem shows up anyway. Of course, neither tag has any business being in the HTML body; they should both be in the head. Since you?re loading BeautifulSoup anyway, you probably want to include that as fix-up step in your postprocessing. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>
2006 Jun 23
1
rubyful_soup works fine as an RB file but bugs in Rails
This is the code: 1 require ''rubyful_soup'' 2 require ''open-uri'' 3 4 url = "http://www.google.com/search?q=ruby" 5 open(url) { 6 |page| page_content = page.read() 7 soup = BeautifulSoup.new(page_content) 8 result = soup.find_all(''a'', :attrs => {''class'' => ''l''}) 9 result.each { |tag| puts tag[''href''] } 10 } it works fine when i ran it: ruby rfs.rb but when i wrap it with <%%> and try launchin...
2006 Jun 05
6
HTML Parsing libraries
Hi, What is the best way to parse HTML? Or is there a simple way to convert a table to an array? I tried beautiful_soup and the built-in htmltools, but have trouble getting them to run. Any pointers? Thanks, Hari -- Posted via http://www.ruby-forum.com/.
2014 Dec 13
3
CentOS forum search link in http://wiki.centos.org/AdditionalResources/Repositories under Atomic Repo
[ https://www.centos.org/search.php?query=atomicorp&mid=30&action=showall&andor=AND forum search] returns a 404. Can the forum search https://www.centos.org/forums/search.php? be used with parameters that will provide the supporting material for the warning "Many CentOS users have had problems after enabling this repo"? -------------- next part -------------- An HTML
2005 Dec 02
5
what is best for scripting?
I am using R in Windows. I see that I will have to use batch processes with R. I will have to read and write text files, and run some R code; probably some external code too. I have never done scripting. Is there any document that explains simple steps with examples? I also have heard that Python is a good scripting language. Is it worth the effort? (I do not have too much free time, so if I could
2010 Feb 11
1
[PATCH] Provides a reference implementation management server.
...esponse = self.app.get('/') + msg = 'TurboGears 2 is rapid web application development toolkit '\ + 'designed to make your life easier.' + # You can look for specific strings: + assert_true(msg in response) + + # You can also access a BeautifulSoup'ed response in your tests + # (First run $ easy_install BeautifulSoup + # and then uncomment the next two lines) + + #links = response.html.findAll('a') + #print links + #assert_true(links, "Mummy, there are no links here!") diff --git a/serv...
2010 Feb 17
0
[PATCH] Provides the new node lifecycle events.
...esponse = self.app.get('/') - msg = 'TurboGears 2 is rapid web application development toolkit '\ - 'designed to make your life easier.' - # You can look for specific strings: - assert_true(msg in response) - - # You can also access a BeautifulSoup'ed response in your tests - # (First run $ easy_install BeautifulSoup - # and then uncomment the next two lines) - - #links = response.html.findAll('a') - #print links - #assert_true(links, "Mummy, there are no links here!") diff --git a/serv...