Mechanize无法用iframe抓取网站

时间:2015-11-01 05:58:32

标签: javascript html ruby-on-rails iframe

我正在使用rails 4和gem mechanize。试图从http://www.pln.co.id/info-rekening抓取一些信息。我需要的信息是“信息收集”框。机械化无法得到它。您可以使用543102425859为id pelanggan尝试。

被抓取的html主体是:

<!doctype html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="FormInfoRekening/reset.css" />
    <title>InfoRekening</title>
    <script type="text/javascript" language="javascript" src="FormInfoRekening/FormInfoRekening.nocache.js"></script>
  </head>

  <body>
    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
	 <!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
    <noscript>
      <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
        Your web browser must have JavaScript enabled
        in order for this application to display correctly.
      </div>
    </noscript>
  </body>
</html>

iframe标签应该有一些信息。希望有人可以帮助我。

0 个答案:

没有答案