简体   繁体   English

如何使用 Perl 连接到 iPhone Web 应用程序?

[英]How can I connect to a iPhone web application using Perl?

Is it possible to use Perl's LWP from my Windows PC to scrape contents of iPhone web application?是否可以在我的 Windows PC 上使用 Perl 的 LWP 来抓取 iPhone Web 应用程序的内容? If yes, which parameters I should change or could someone provide example?如果是,我应该更改哪些参数或有人可以提供示例?

No, web applications running on the iPhone are run inside of the browser.不,在 iPhone 上运行的 Web 应用程序是在浏览器中运行的。 LWP lets you connect to web servers , not web browsers . LWP 允许您连接到 Web服务器,而不是 Web浏览器 That said, where are you getting the web application?也就是说,您从哪里获得 Web 应用程序? You may be able to run it directly in Perl using WWW::HTMLUnit .您可以使用WWW::HTMLUnit直接在 Perl 中运行它。

It's possible to get the web application, but you probably won't be able to do anything with it in Perl because most of the fun stuff happens with Javascript.可以获取 Web 应用程序,但您可能无法在 Perl 中使用它做任何事情,因为大部分有趣的事情都发生在 Javascript 中。 However, you might be able to extract various data, links, and so on.但是,您可能能够提取各种数据、链接等。

To see what your phone is sending to websites, write a little CGI program to dump it's input and environment.要查看您的手机向网站发送的内容,请编写一个小 CGI 程序来转储它的输入和环境。 You'll especially be interested in the user-agent string.您会对用户代理字符串特别感兴趣。 Through LWP::UserAgent , you can set any of those values yourself.通过LWP::UserAgent ,您可以自己设置这些值中的任何一个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM