4 ms·
Ask HN: Have you implemented a computer vision library for website screenshots?
I wanted to make a smarter scraper. Right now if I was to scrape a site for particular information, I have to inspect it and understand their HTML layout and then I can target the specific DOM elements.
The smarter way would be to first try predictive/progressive steps to try and find normal patterns like look for <header><body><footer> sections and common patterns like <ul><li>
The part about computer vision comes in where visually when you as a human looks at a website you can pretty easily spot the UI layout like "Oh here is the main menu/banner, this is the content, etc..."
So possibly one way to make the scraping better is to know what menu to look for... usually when you just dump plain text you don't even know where the actual content begins.
I was also thinking of the possibility of outsourcing this like grabbing screenshots of several (thousand?) websites and then creating these jobs for a site like Amazon Mechanical Turk where a human looks at the screenshots of the sites and draws colored rectangles around the 'menu' 'body' etc... to feed into "machine learning" haha throw in a buzz word there (I don't know anything about it).
Yeah this isn't "ground breaking" and is probably redundant but it's just a project.
I'm just wondering if you know of any easy to use computer vision libraries that you can feed it a photo and get out the positions of menus(with words) to help the scrape.
I use PHP/HTMLSimpleDOM and have not used Python or Node, GO? (have not used Go I just hear a lot about it being awesome/various things it can do).