Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perl vs PHP to web scraping [closed]

Say we have project that requires web scraping. (parsing strings (< 40) and scraping web pages (geting meta datas and such) I am aware of that perl has great and suited cpan modules for this job, so i can take that way and don't bother myself that much. But i don't have a clue about speed and memory related stuff.

So, which would you choose? (May be Python??) And in terms of speed which one is better for this job? Explain please...

Thanks in advance.

like image 578
wonnie Avatar asked Feb 24 '23 15:02

wonnie


2 Answers

Use Perl or Python. Both have tons of libraries for web scraping.

In Python you could use BeautifulSoup to parse even the crappy kind of HTML lots of pages like to use.

like image 149
ThiefMaster Avatar answered Mar 04 '23 10:03

ThiefMaster


I once successfully used Perl with WWW-Mechanize in such a context. Hopefully you don't need to evaluate .js.

like image 37
mbx Avatar answered Mar 04 '23 09:03

mbx