3 ms·
True - there's nothing exactly like www::mechanize, but really, you can usually write what you want with scrapy, beautifulsoup, html5lib, any of the tree/xpath
by viraptor 16y ago
True - there's nothing exactly like www::mechanize, but really, you can usually write what you want with scrapy, beautifulsoup, html5lib, any of the tree/xpath implementations, etc. (I know, because I did, writing a quick form processor + wrapper for common functions in <1k lines for my page scraping needs)
You will rarely find an exact port of some other foreign library that will work exactly like you expected the original to work. That goes both ways - for example there's loads of async frameworks in python, but it's really hard to find a good one in perl. Sure - there's AnyEvent and POE, but they're just bizarre monsters compared to much cleaner simple solutions like diesel. There's Coro... but that's a longer topic than I'm willing to discuss here ;)
- Vivtek 16y agoMan, what about Coro? I just ran across that - is it worth my while to examine it more closely?
- viraptor 16y agoYeah - definitely, if you can make it work for you. I just run into some situations where I expected it to do a context switch in async block but it didn't seem to (locked up instead)... I couldn't find the reason. Maybe it was my fault, or maybe just some tricky bit was missing from the docs - I don't know. Python-diesel is my default so I just went back instead of digging for the solution too much.
- draegtun 16y agoYes it is. Unlike viraptor I've been using Coro (http://search.cpan.org/dist/Coro/ http://search.cpan.org/dist/Coro/) successfully in production without any hitches and have services (including web apps) that are still running after 2 years without a reboot. PS. For my Coro webapps I use Continuity (http://search.cpan.org/dist/Continuity/ http://search.cpan.org/dist/Continuity/) & Squatting (http://search.cpan.org/dist/Squatting/ http://search.cpan.org/dist/Squatting/)