Hacker Newsnew | past | comments | ask | show | jobs | submit | cuppster's commentslogin

Watch out for unicode when using pyquery and requests. I provided a fix for that just recently now merged into the pyquery repo. I use it (among other things) to scrape upcoming comic book releases =) http://cuppster.com/2013/01/30/decorators-scrapers-and-gener...


Do you mean that the algo sorts on decreasing color frequency? i.e. you choose "blue" then the top results are images that are literally all "blue".

Usually when I want an image with a specific color, I don't want the entire image to be that color...


I get what you're saying. Maybe you could throw in a lower bound of the hue variation of the image as a parameter into the search to find "natural looking" images but with prominent fields of the desired color.


Anyone scraping in Perl? I've found pQuery very useful. (I tried it in node.js to stay cool, but async scraping is an anti-pattern) You can use jQuery selectors, etc... Just posted something related to it on by blog: scrape with pQuery, dump into Redis, reformat into CSV then into mysql...

http://cuppster.com/2012/02/28/utf-8-round-trip-for-perl-mys...


I also use Perl for web scraping, never heard of pQuery though, I use HTML::TokeParser or HTML::TreeBuilder::XPath.


I did the same thing with my local pizza shop. They were =really= happy to get the domain... and in return they gave me a $100 credit, and I threw a party for my friends... good times! http://jerseyspizza.com/


On a totally unrelated note, that may be the best restaurant website I've ever seen. Just gave me the facts, no Flash, I could see the menu and it works fine on a mobile phone. I wish all other restaurants would copy this template.


The name, directions, and phone number are all images. Can't copy and paste them into an email.


...and by "directions" I meant "address"... can't copy and paste it into Google Maps! Big issue there.


Unless it's changed in the last 2h, the directions and phone # are both plain text.



Oh, I see. When you said 'directions', I thought you were talking about the page text. The directions are on the Directions page, and the number is on the Place an Order page. The banner could probably be better, but the only thing I'd complain about is the lack of business hours.


CSS gets re-written anyway along the way. Resets gives you a leg up in the beginning for a consistent look across browsers so you can focus on other pieces of a project -- at least that's how I use it.


if you're using an ubuntu image, it's going to be the ubuntu user: ssh -i path/to/key.pem ubuntu@blah.amazonaws.com

Spent too much time figuring that out the hardway...


I've got a follow up post that shows how to use upstart instead of init to manage supervisor http://cuppster.com/2011/05/18/using-supervisor-with-upstart

People were having issues with the init script gist... upstart simplifies things quite a bit.


Yes it does, but I'm having so much fun deploying these things, I've created more than one... =)


I've used this recipe for a couple sites of mine, including the blog itself. The ups and downs of beta features of other node.js hosting providers was becoming a hindrance so I decided to roll my own.


would be interesting to know what features node hoster kept changing? Only thing I have so far is some cough node hosts don't send out enough invites for some of us to get


I loved that podcast... also, you can find his QVC work on youtube. Gold.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: