简体   繁体   English

在服务器上运行的WWW :: Mechanize :: Firefox脚本的替代方法?

[英]Alternative to WWW::Mechanize::Firefox script to run on a server?

I have a cloud server and would like to run this script on a cron job, unfortunately it requires Firefox to be installed with MozRepl and WWW::Mechanize::Firefox . 我有一个云服务器,想在cron作业上运行此脚本,不幸的是,它要求FirefoxMozReplWWW::Mechanize::Firefox一起安装。 I don't think I can run the script without it installed on the server and I don't think I can get it installed as there is no desktop. 我认为没有在服务器上安装脚本就无法运行该脚本,并且由于没有桌面,因此我也无法安装该脚本。

I'm no expert. 我不是专家。

what can I do, other than run the scipt on my local but update the db on server? 除了在本地运行scipt但更新服务器上的数据库外,我该怎么办?

There is no need to use WWW::Mechanize::Firefox if your requirement is to merely webscrape there are multiple options available that do not require a browser installed. 如果您只需要webscrape,则无需使用WWW::Mechanize::Firefox ,可以使用多个选项,这些选项不需要安装浏览器。

A popular choice is ScraPY which comes with all the bells and whistles and is built with python 最受欢迎的选择是ScraPY ,它带有所有的花哨功能 ,并且使用python构建

No browser required 无需浏览器

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

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