Ruby mechanized on facebook

I try to click the "Settings" button on the home page, but when I return this page:

#<WWW::Mechanize::Page
 {url
  #<URI::HTTP:0x1023c5fc0 URL:http://www.facebook.com/editaccount.php?ref=mb&drop>}
 {meta}
{title nil}
{iframes}
{frames}
{links}
{forms}>

which is .. kinda empty! Are there any problems with these frames and frames? May be?

+3
source share
2 answers

As mentioned above, the following redirects may be what you need. Here is an example of how to do this:

@agent = Mechanize.new
@agent.redirect_ok = :all
@agent.follow_meta_refresh = :anywhere

Then you can pretty much ignore the fact that redirects are involved there - Mechanize will just put you on the resulting page.

+3
source

Facebook : https://register.facebook.com/editaccount.php, , , . , WWW:: Mechanize https, .

Facebook, -, javascript, , , WWW:: Mechanize, . "? _fb_noscript = 1" URL-, . javascript facebook .

(, , , , , , facebooks, "". , ..... ad nauseum)

+2

Source: https://habr.com/ru/post/1731450/


All Articles