Displaying 20 results from an estimated 1200 matches similar to: "How to submit this form?"
2007 Apr 20
2
Running script does not return the correct page
Hello all,
I have tried to post this yesterday, but noticed I was actually not
subscribed yet... Well, here we go again:
If I run this script, and observe the output, the results are not there
at all (try to do the same in the browser). Any suggestions?
require ''rubygems''
require ''mechanize''
agent = WWW::Mechanize.new
agent.user_agent_alias =
2007 Apr 19
1
Do you have any idea what could be the problem with this script?
Hello all,
If I run this script, and observe the output, the results are not there
at all (try to do the same in the browser). Any suggestions?
require ''rubygems''
require ''mechanize''
agent = WWW::Mechanize.new
agent.user_agent_alias = ''Mac Safari''
page =
2007 Jul 12
1
WWW::Mechanize::Link.inspect needs some TLC
The problem: users trying to debug Mechanize apps with Komodo
are finding the debugger times out once it''s loaded a web
page. They don''t run into this in the ruby-debug debugger,
or running in normal mode.
The reason: Komodo''s debugger is graphical, which means that
whenever it hits a breakpoint it automatically shows the
contents of each local variable. It has a
2010 Jan 25
4
Does Amazon.com blocks scraping?
Hi there
Does anyone know if Amazon.com has any sort of server side script that tries
to block scraping activities? I first noticed that if I didn?t change the
agent alias, it would fetch a page exactly like the normal one, but without
the intial search field(maybe a silly way to prevent scraping). Then after
it, I changed to some other alias, and submit a search. I got the result
page as
2008 Nov 03
2
Multiple Submit Buttons
Hello.
I have run into a new form that contains multiple submit buttons.
Currently my code for working with forms looks just like this example.
require ''rubygems''
require ''mechanize''
a = WWW::Mechanize.new { |agent|
agent.user_agent_alias = ''Mac Safari''
}
a.get(''http://google.com/'') do |page|
2009 Sep 25
0
WWW::Mechanize and Rails console not playing well
I can run this code just fine in irb, but when I run it in rails
script/console, I get an error:
>> res = agent.submit(search_form, search_form.buttons.first)
ArgumentError: one hash required
from /home/jwoods/NetBeansProjects/activista/vendor/rails/
actionmailer/lib/../../actionpack/lib/../../activesupport/lib/
active_support/core_ext/string/interpolation.rb:85:in `%''
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
2007 May 20
0
Urgent :: File Object problem
disclaimer: Im not a developer, in fact I know very little of Ruby.
I had this script made for me by Endax, LLC. I have run into problems
with the script and they are unable/unwilling to help resolve the issue.
The script was working fine for a while, but now when I run it I get the
following error in the Ruby editor:
>ruby realtor_scraper.rb
realtor_scraper.rb:54:in `initialize'':
2006 May 15
3
Page hit counter?
Hello all,
Yet another "don''t reinvent the wheel" n00b question:
Is there an ''official'' page hit counter plugin/code snippet/whatever? I
would need something like this:
- It is possibility to set a constant timespan (say 5 hours).
- On every page hit, save away @request.remote_ip and Time.new
- The counter gets incremented only if the same IP was here
2006 Jun 22
5
Problems with layouts
ruby script/generate controller Tools::Search - ok
in views/layouts/application.rhtml:
<%= render_component :controller => ''tools/search'',
:action => ''searchbox'',
:params => {:context =>
''header-section''}
%>
in
2007 Oct 04
2
newbie question with login form
hi,
i''m just starting to work with this incredible tool...
but i got a first problem with the login process
i''m logging on my app like this :
------
@agent = WWW::Mechanize.new { |a| a.log = Logger.new("mech.log") }
@agent.user_agent_alias = ''Mac Safari''
@page = @agent.get("http://myappAdress/")
@form = @page.forms.first
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.
2009 Sep 17
1
Load Error Using Mechanize Gem
Hi,
I''m getting a "Could not open any of [xml2, xslt, exslt] (LoadError)" error when trying to run a simple Ruby program taken from the EXAMPLES.rdoc file of the Mechanize gem.
The error is in this line of the Nokogiri module of libxml.rb: ffi_lib ''xml2'', ''xslt'', ''exslt''
Not sure if there are missing gems, and if so,
2009 Jul 29
6
Doubt in nil object with ajax
hi this is my htnl
<html>
<head>
<%= javascript_include_tag :defaults %>
</head>
<body>
<%= form_tag nil, { :id => ''search_form'' } %>
<%= text_field ''recipe'', ''name'' %>
<%= end_form_tag %>
<div id="recipe">
</div>
<%= observe_form :search_form, :frequency =>
2006 May 12
21
Drupal vs. Ruby on Rails
Hello all,
Maybe the $subj is a little bit weird (i.e. apples vs oranges) but it is
a situation i am facing at the moment: We are developing a small web
site which will be mostly a CMS (more or less) and my colleagues is
arguing for drupal, and i am for RoR.
Maybe i can formulate the question in a different way: when to use a CMS
(not necessarily drupal but e.g. Radiant CMS) and when to use Ruby
2006 May 22
2
How to execute time consuming code
Hello all,
I have a screen scraping application (go to a lots of sites, extract 10k
stuff, integrate the results, put them to DB etc). Now i want to use a
Rails application as a frontend to this: The user can push a button
which triggers the screen scraping app and view the results (preferably
asynchronously, but that does not really matter right now).
Questions:
- Should the screen scraping app
2007 Nov 12
3
Weird error downloading a gzip''ed file
Hi all,
I''ve been using mechanize for a while and it rocks. Docs are pretty clear
and so far I''ve been able to do it on my own.
However, I''m stuck in a weird situation in a script to download my contact
list from hotmail.
I''ve used Firebug to check all urls, and tested it by hand while logged in
via browser.
Even in the script everything works well until the
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}
2010 Oct 20
2
Mechanize::ResponseCodeError: 500
Also, excuse me if my issue is a little bit application-specific. I need
Mechanize to submit bunch of data from our server to an online reservation
system. The url ishttp://hajres.iranair.com/haj/request.php"
It works in my browser however, using mechanize following error appears:
>> agent.get("http://hajres.iranair.com/haj/request.php")
Net::HTTP::Get: /haj/request.php
2007 May 18
1
select model & field for search
hi, I was wondering if someone could help me? I am trying to create a
select option for the ferret search in my app. I want users to be able
to select from a range of fields and models to limit their query
results.
So far i have a select box;
<input type="text" name="query" value="<%= h @query %>" />
<%= select(:searchbox, :category,