Scraping made easy with jQuery and SelectorGadget (and Node.js!)
1–10 of 19 posts
Re: Scraping made easy with jQuery and SelectorGadget (and Node.js!)
#2[deleted]
Re: Scraping made easy with jQuery and SelectorGadget (and Node.js!)
#3 perl -MLWP::UserAgent -e 'map { $_ =~ s/([^([^]*>(\d+ points)/print "$1 $2 $3 $4\n" if($i++ new->get("http://news.ycombinator.com/")->content;'Re: Scraping made easy with jQuery and SelectorGadget (and Node.js!)
#4I also like this python scrape library: http://arshaw.com/scrapemark/
Re: Scraping made easy with jQuery and SelectorGadget (and Node.js!)
#5[deleted]
Re: Scraping made easy with jQuery and SelectorGadget (and Node.js!)
#6People using clojure can get selector based scraping using Enlive instead of JQuery [1]. It also ends up doubling as a templating library. I use it for templating on my website and I use it to scrape Hacker News, though that project the scraping is for isn't ready for launch [2].
Re: Scraping made easy with jQuery and SelectorGadget (and Node.js!)
#7People using clojure can get selector based scraping using Enlive instead of JQuery [1]. It also ends up doubling as a templating library. I use it for templating on my website and I use it to scrape Hacker News, though that project the scraping is for isn't ready for launch [2]. 1: https://github.com/cgrand/enlive 2: https://github.com/jColeChanged/mysite
And here's a truly awesome tutorial for enlive (swannodette is a regular here as well):
Re: Scraping made easy with jQuery and SelectorGadget (and Node.js!)
#8I've been doing a lot of scraping in node. I've had much better luck using YUI + jsdom than jquery +jsdom. Many pages would fail using jquery and it also leaked memory like crazy.
Re: Scraping made easy with jQuery and SelectorGadget (and Node.js!)
#9perl -MLWP::UserAgent -e 'map { $_ =~ s/ ([^ ([^ ]*>(\d+ points)/print "$1 $2 $3 $4\n" if($i++ new->get("http://news.ycombinator.com/")->content;'
It would be much difficult to write many more complex scrapers just using regexes, which is why methods like the one posted above scale well with complexity.
For example, if you wanted to scrape comments on HN and get a tree-like data structure, regexes would be much more difficult to write and maintain!
Re: Scraping made easy with jQuery and SelectorGadget (and Node.js!)
#10I do a lot of scraping using perl. Web Scraper is an awesome tool: http://search.cpan.org/~miyagawa/Web-Scraper-0.32/lib/Web/Sc...