Questions tagged [mechanize-ruby]

The Ruby library for automating interaction with websites.

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.

193 questions
0
votes
1 answer

Clicking on a Field with Ruby Mechanize

I am trying to use mechanize to click what appears to be a button, however, when I look at the CSS it seems to be a form field.
HMLDude
  • 1,547
  • 7
  • 27
  • 47
0
votes
1 answer

Click a input type submit - Mechanize Ruby

I am trying to click a button which is actually a submit without a form which looks some thing like this and store the result in an object
Arihant Godha
  • 2,339
  • 2
  • 26
  • 50
0
votes
2 answers

Unable to submit Amazon form via Mechanize (Ruby)

In the script I wrote, I'm logging into Amazon successfully on behalf of the user with their credentials. Then I'm trying to fill out the form to enter a new address. Here's my current code: class AmazonCrawler def initialize @agent =…
Zack Shapiro
  • 6,648
  • 17
  • 83
  • 151
0
votes
1 answer

Mechanize with weird https form RoR

I'm using RoR trying to search a simple form at my college using mechanize. The code works fine for searching google, but returns the search form in the results? I'm really confused. Any advice? Thanks! ruby script/console require 'mechanize' agent…
JZ.
  • 21,147
  • 32
  • 115
  • 192
0
votes
2 answers

Mechanize Link#click vs Agent#get

I have an application that looks for certain links on a page (using CSS) and retrieves the pages referenced by the link by using agent#get on the href value. This has been working for months until today (presumably the web site has changed…
Jack R-G
  • 1,778
  • 2
  • 19
  • 25
0
votes
1 answer

Nokogiri and Mechanize help (clicking links found by Nokogiri via Mechanize)

I search links via css form page = agent.get('http://www.print-index.ru/default.aspx?p=81&gr=198') and after that I have in page variable a lot of links but I don't know how use them, how click on them via Mechanize. I found on stackoverflow this…
user2596615
  • 131
  • 1
  • 4
  • 11
0
votes
1 answer

Get computed font-size in Rails

I'm using Rails 3 to scrape a website, and doing a query like so: agent = Mechanize.new doc = agent.get(url) I'm then doing doc.search("//div") Which returns a list of all divs on the page. I'd like to select the div that has the largest font…
Octodone
  • 515
  • 6
  • 13
0
votes
1 answer

Getting Errno::ENOMEM: Not enough space when 'getting' a page via Mechanize

I'm currently trying to follow a tutorial on web scraping and have been receiving a ruby error message "Errno::ENOMEM: Not enough space". I've found a workaround from http://bugs.ruby-lang.org/issues/show/1063 but I was wondering if there is a more…
Lifeweaver
  • 986
  • 8
  • 29
0
votes
2 answers

Make ruby automacially find the values for the proxy/authentication settings for http?

I'm using the ruby gem Mechanize to access a website through a proxy and it's working find I'm just wondering if it's possible to have ruby automatically fill in my proxy settings. require 'mechanize' agent = Mechanize.new do|a| …
Lifeweaver
  • 986
  • 8
  • 29
0
votes
1 answer

File upload with Mechanize fails

I am trying to automate filling out a form (which includes a file upload) using Mechanize. I have gone through the process in the GUI interface and the file uploads fine, so I know the file isn't corrupt, but when I run my mechanize script it fails.…
lyonsinbeta
  • 919
  • 6
  • 25
0
votes
2 answers

Is it possible to find the .. text, when any of the .. value is known?

I have an webpage which has the similar kind of html format as below:
.... . . . alo foo bla bla…
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
0
votes
2 answers

Can I get HREF values using Mechanize which are not within the form?

I have similar HTML in one of my pages (with form name): bla bla boo bla
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
0
votes
1 answer

How to click the Submit button which has no id and name using mechanize?

Find the below HTML code: How to click the Submit button which has no id and name using mechanize?
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
0
votes
1 answer

Getting the error "nil:NilClass (No MethodError)"

Please find the part of a code: button = Login_form.button_with(:name => 'Submit') loggedin_page = Login_form.submit(button) bizz_hierarchy_form=loggedin_page.form('login_showSplashForm') button = bizz_hierarchy_form.button_with(:name =>…
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
0
votes
1 answer

How to get page description with ruby mechanize?

How do I get page descriptions with Mechanize? The Pismo gem has this functionality, but it's worse than the Mechanize gem. Mechanize finds image tags, for example. I didn't find in the Mechanize documentation how to get the description. Does…
Luccas
  • 4,078
  • 6
  • 42
  • 72
1 2 3
12
13