News for hackers. Stuff that matters.
Re:Pattern - Web Mining Python lib by salimmadjd on Sunday October 14, 2012 @01:30PM (#4651956)
This is awesome! Any plans to add other sites, like amazon, yelp, tripadvisor, etc!
Re:Pattern - Web Mining Python lib by stevejohnson on Sunday October 14, 2012 @03:02PM (#4652246)
NB: screen-scraping Yelp is against the TOS and you'll get shut down pretty fast if you try it.
Re:Pattern - Web Mining Python lib by Terretta on Sunday October 14, 2012 @03:08PM (#4652269)
Exactly. Screen scrape Google search results instead, I've heard that works great. Bet your business model on it, I've heard. ;-)
Re:Pattern - Web Mining Python lib by bigthingnext on Monday October 15, 2012 @02:14AM (#4653978)
Well, Google "screen scrapes" millions of websites. They bet their business on it and they seem to be doing OK.

If you upload something to an http server connected to the public internet on tcp/80, and you don't exclude the path to it in robots.txt, then should anyone be surprised if it is copied? HTTP clients don't read TOS.

If Google had to read and interpret every every website's TOS, I doubt they could easily, if at all, produce an index the size of the one they have. It seems by ignoring a "fear of scraping" they managed to produce something valuable that the courts seem to side with in spite of offended copyright holders.

Moreover there's no requirement for them to make their "cache" publicly accessible. But they do. And again this has held up in court quite well. I doubt anyone would be surprised that people are using it. Or "scraping" it if you want to play word games.

Re:Pattern - Web Mining Python lib by salimmadjd on Tuesday October 16, 2012 @03:46AM (#4658799)
I see you worked at yelp before so I will not elaborate more, but it's not too hard to scrape yelp if you know what you are doing
Re:Pattern - Web Mining Python lib by enjo on Sunday October 14, 2012 @02:34PM (#4652123)
Better yet: Is there a well defined structure for other folks to add that stuff?
Re:Pattern - Web Mining Python lib by fooandbarify on Sunday October 14, 2012 @05:25PM (#4652698)
I'm not one of the authors, but the code in question is all in one file: https://github.com/clips/pattern/blob/master/pattern/web/__i...

It would be fairly straightforward to add your own class.

Re:Pattern - Web Mining Python lib by a235 on Sunday October 14, 2012 @10:31PM (#4653446)
Whoa, modules with dozen of classes and 2450 lines of code! They definitely don't rely on file-navigation.

Project is great, but I've got a feeling that many smallish components have been already implemented, but here they were rewritten from scratch.

Re:Pattern - Web Mining Python lib by rabidsnail on Sunday October 14, 2012 @07:18PM (#4652951)
Is it just me or are they rerlolling requests and lxml for no good reason?
Re:Pattern - Web Mining Python lib by tomdesmedt on Sunday October 14, 2012 @08:46PM (#4653176)
The source code has a base SearchEngine class and a Result class, which streamline the input and output parameters across different web services, so it is not difficult to add new services (= subclass of SearchEngine). There are also some general developer docs: http://www.clips.ua.ac.be/pages/pattern-dev