Ask YC: What do you scrape? How do you scrape?
11–20 of 47 posts
Re: Ask YC: What do you scrape? How do you scrape?
#12I use it to scrape television listing data (http://ktyp.com/rss/tv/ was my old site, and http://code.google.com/p/listocracy/) and more recently to scrape resume data from job posting websites for a (YC-rejected :P ) side project I'm working on.
The hardest part I've encountered with scraping is odd login and form setups. For example Monster.com uses an outside script to attempt to fool scraping. A couple other sites use bizarre redirecting across pages. Also AJAX certainly has changed the way a lot of screen scraping is done.
Finally, the most useful tool I've used is LiveHTTPHeaders (http://livehttpheaders.mozdev.org/) which is great for following how a site operates.
Edit: For PHP, another interesting tool for scraping is htmlSQL (http://www.jonasjohn.de/lab/htmlsql.htm) which allows HTML to be searched using SQL like syntax.
Re: Ask YC: What do you scrape? How do you scrape?
#13http://nostarch.com/frameset.php?startat=webbots
http://www.oreilly.com/catalog/spiderhks/
That probably covers the topic of scraping pretty exhaustively.
Re: Ask YC: What do you scrape? How do you scrape?
#14I took a quick glimpse at beautiful soup and it seems to be doing something similar - someone let me know if this is correct.
Re: Ask YC: What do you scrape? How do you scrape?
#15It lets you specify which items on an initial / prototype page you want to scrape, and then it builds up a set of rules than then work on future similar instances of that page. Good for scraping eBay, Google, stuff like that.
Re: Ask YC: What do you scrape? How do you scrape?
#16I do all my screen scraping with PHP, curl, and some regex. Previously I used plain PHP. I use it to scrape television listing data ( http://ktyp.com/rss/tv/ was my old site, and http://code.google.com/p/listocracy/ ) and more recently to scrape resume data from job posting websites for a (YC-rejected :P ) side project I'm working on. The hardest part I've encountered with scraping is odd login and form setups. For e…
I'd be interested in how you tackle this one. I've always used something like Perl/Curl/wget etc for scraping, but (like you say) JavaScript messes that up. I've had moderate success using GreaseMonkey and regexps in JavaScript code, but it's a bit fragile. I'm thinking of using GreaseMonkey + jQuery, since that should allow me to select DOM elements very easily. But if you have a better way, please share :)
Re: Ask YC: What do you scrape? How do you scrape?
#17Re: Ask YC: What do you scrape? How do you scrape?
#18I use BeautifulSoup when needed for simple scraping. My biggest frustrations, right now, are really around getting data from lots of different websites in subtly varied forms. This is a tough problem to automate. I certainly haven't found any tools that make it simple. I'd be happy with a 50% correctness rate, looking for very loose patterns. I just haven't found a tool and, while I have some ideas for how to do it,…
That said, it's likely do-able, as long as you don't need perfect results. There are plenty of sites around that seem to be doing things along these lines - but AFAIK none of them have open-sourced their code.
Meanwhile, I've been a coward and stuck to beautiful soup for my scraping projects. In the short term, it works out faster than trying to be too clever.
Re: Ask YC: What do you scrape? How do you scrape?
#19Yahoo Pipes is also fun to play with; and Firebug is the scraper's best friend.
Right now I'm working on scraping public LinkedIn data. In the past I've done Craigslist and Twitter. I haven't done anything really hard, though -- mostly things that can be read as XML.
Here's a few cool links if you're interested in scraping with Ruby: http://del.icio.us/jeremyraines/scraping