similar to: some Mechanize objects never garbage collected?

Displaying 20 results from an estimated 1000 matches similar to: "some Mechanize objects never garbage collected?"

2012 Jul 23
2
Mechanize::Agent#post_connect_hook response != Mechanize#parse response
I''m working through an idea for a db-backed cache for Mechanize#get(). The idea is to use a Mechanize::Agent#post_connect_hook to cached any fetch data, and create a subclass of Mechanize::Agent#get() that checks the cache before calling super. I want to store the un-parsed (raw) page in the db, and call Mechanize#parse when there''s a cache hit, something along these lines:
2007 Oct 07
1
How to store a Mechanize object in the database?
Hi, I am trying to save a Mechanize object in database (using a Rails Model). But the save operation throws a TypeError Considering that "agent" is an instance of a Rails Model and "user" is defined as a "text" type in the Model. irb(main):039:0> agent.user = WWW::Mechanize.new #<WWW::Mechanize:0xb71295f0 @follow_meta_refresh=false, @key=nil,
2007 Nov 14
0
Hpricot & mechanize fail to parse page after redirect1q
Hi everyone, My quest with mechanize/Hpricot continues :) Something extremely strange happened today - some simple working code broke down, and i can''t figure out why. I am trying to access a piratebay.org search page, which does a redirect to a relative url like this: original link: http://thepiratebay.org/s/?page=0&orderby=3&q=football+manager+2008&searchTitle=on redirects
2011 Mar 27
2
LinkedIn still not working?
To clarify the issue I posted earlier: I am on OS X 10.6.7. Trying to use Mechanize to log in to LinkedIn. As others have posted about in the past, when I submit the form it kicks me back to the LinkedIn landing page, and does not log me in. I read the earlier discussion of the issue that mentioned how cookie values were being improperly dequoted when stored. But I thought that issue was fixed.
2007 Mar 25
5
mechanize 0.6.6 Released
mechanize version 0.6.6 has been released! http://mechanize.rubyforge.org/ The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, can follow links, and submit forms. Form fields can be populated and submitted. Mechanize also keeps track of the sites that you have visited as a history. Changes: =
2007 Apr 15
0
mechanize 0.6.8 Released
mechanize version 0.6.8 has been released! http://mechanize.rubyforge.org/ The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, can follow links, and submit forms. Form fields can be populated and submitted. Mechanize also keeps track of the sites that you have visited as a history. Changes: = Mechanize
2006 Sep 11
0
mechanize lists
On Mon, Sep 11, 2006 at 09:04:49AM -0400, Mat Schaffer wrote: > I noticed that my message is the first post to mechanize- > users at rubyforge.org. Should I post to devel? That looks empty too, > but I thought I''d check if you were only watching the devel list and > not the users list. Hey Mat, this is definitely a bug in mechanize. If you add this to your script, it
2009 Mar 11
0
problem scrapping ATnT site (Matt White)
Try to use firebug to assist you finding these changes. I never used AT&T website, but you may need to login and find the download url using firebug as I did: http://zenmachine.wordpress.com/2007/11/11/scraping-with-firebug-and-wwwmechanize/ regards, gm On Tue, Mar 10, 2009 at 4:12 PM, <mechanize-users-request at rubyforge.org>wrote: > Send Mechanize-users mailing list submissions
2009 Jun 25
2
Bad Form?
Hi, This is my first post, I wanted to ask a quick question about "Bad Form" -- rather, am I doing something with Mechanise I shouldn''t be doing? Here''s the long and short of it - I am using Mechanize with Cucumber and RSpec to test a *ahem* Perl XML web service.. talk about technology soup, but I have it working quite well. I have an example project on GitHub that
2007 Sep 14
1
Unable to scrap gmail.com - EOFError: End of file reached
Hi all, I am so excited to use mechanize! It has opened a whole new world of projects for me :) I am trying to login into the Gmail.com server, as described in http://schf.uc.org/articles/2007/02/14/scraping-gmail-with-mechanize-and-hpricot but am running into a few issues... irb(main):010:0> page = agent.submit form EOFError: end of file reached from
2007 Mar 15
0
SOLVED: Getting info from an Hpricot::Elem
I knew as soon as I hit the enter key, the intelligence would feed my brain. The answer to this is: elements[1]["value"] Easy Peasy....and why not? (there is a pun there if you can see it) Thanks for listening. Mike B. ----- Forwarded message from barjunk at attglobal.net ----- Date: Wed, 14 Mar 2007 17:49:57 -0800 From: barsalou <barjunk at attglobal.net> Reply-To:
2007 May 28
2
Clicking image maps?
Hello all, I am trying to click image maps ("area" nodes), and while Perl''s mechanize treats "a", "area", "frame", "iframe" and "meta" tags as links, it seems to me that Ruby''s Mechanize thinks only "a" tags can be links (at least my little experiment, namely: page.links.each {|link| puts link.node.name}
2007 Dec 10
3
Road to 0.7.0
Hey everyone, I''ve been refactoring Mechanize for an 0.7.0 release. Basically I''m trying to clean the code up and there are a few features that I think are unnecessary, but I would like to ask people first. 1) REXML as a parser. I want to remove support for REXML. I don''t use it. Hpricot seems to do everything I need. 2) 1.8.2 thru 1.8.4 support
2007 Sep 20
4
issues submitting a search form
Hello to the list and thanks to Aaron for the cool software. I''ve been fooling around with Mechanize and Hpricot for a couple of days and from the docs I''ve read, the following code SHOULD work but doesn''t. I''ve tried the same code on a couple of different sites and I get the same exception for each. Any pointers or suggestions are appreciated.
2007 Jan 12
1
Single method call to retrieve the entire page in HTML?
All, Another easy question. In Hpricot, on a doc that I am using, I can do a .to_html method and retrieve the entire page. However, this doesn''t seem to work in Mechanize. My goal is to the text of the page and put it into a database to make it searchable with ferret (using the acts_as_ferret plugin in Rails). Does anyone have a good suggestion short of iterating over the entire
2008 Jan 15
1
Converting Watir script to Mechanize
I have a Watir script that I would like to convert to a Mechanize script. The watir code looks like this require ''watir'' include Watir def test ie = IE.new ie.goto(''http://cpref.gsm.com/inter.asp?r=8084'') ie.text_field(:name, ''inter_string'').set(''Potassium'') ie.button(:id, ''image1'').click
2006 Nov 02
5
Adding fields to a form
Is there a decent way to add a field to a form before posting it? I haven''t tried using HPricot manipulations just yet, since I can''t ever find really solid docs on hpricot.... Form#[]= doesn''t work because it first searches only pre-existing fields. I''m investigating how to write a patch now. But I thought maybe someone here might have an idea.
2007 Jul 25
0
Being a polite client: maintaining history
Hi, folks. I''m investigating libraries to use in a rather specialized feed reader. Some of the sites I want to follow don''t have RSS feeds (or have hopelessly broken feeds) so I was already planning on using Hpricot anyway -- Mechanize is looking good, here. In my research for my project, recipe 11.16 in O''Reilly''s Ruby Cookbook references a website[1]
2007 Mar 15
0
Getting info from an Hpricot::Elem
How about getting the name and value from this element object: irb(main):079:0> elements[1] => {emptyelem <input name="SNMPTrustedHost" type="hidden" value="1.2.3.4">} irb(main):080:0> elements[1].class => Hpricot::Elem If I can do that, then I''m home free. I''ve been looking at the Hpricot docs, but I''m not
2008 Apr 09
5
Peculiar Hpricot error in Rails app
Hi, I have been stumped by this error Hpricot is generating in my rails app. The error looks like this: $ script/console Loading development environment (Rails 2.0.2) >> str = ''<p>lorem ipsum <a href="http://dolor.com/">dolor</a> sit amet.</p>'' => "<p>lorem ipsum <a href=\"http://dolor.com/\">dolor</a>