Live data from Hacker News

Portia, an open-source visual web scraper

blog.scrapinghub.com

61–70 of 70 posts

Re: Portia, an open-source visual web scraper

#61
post #57

Earlier quoted context omitted.

Surely there are difficulties in expecting data providers to produce their data in standard formats across industries and countries? I am naive as to how much and what data is available but that seems a stretch

If interested, take a look at my project on unifying bike sharing networks data. Besides providing a public API, we are also providing a python library that accesses and abstracts different sources under the same model [1, 2] There are a lot of accessible sources (though, not documented), but there are also clear examples on how one would never provide a service! Some examples [3, 4] What I was referring, though, was…

Ok different feeds, same domain, unifying the model sis feasible, either as an intermediate or as a client "template thing"

Thank you - makes sense. I was thinking different data feeds different domains.

Re: Portia, an open-source visual web scraper

#62
post #30
post #26

Earlier quoted context omitted.

Anybody know of any tools that would work with JS-rendered sites, and not have to "parse the JS"?

Answering my own question: CasperJS is an open source navigation scripting & testing utility written in Javascript for the PhantomJS WebKit headless browser and SlimerJS (Gecko). It eases the process of defining a full navigation scenario and provides useful high-level functions, methods & syntactic sugar for doing common tasks such as: defining & ordering browsing navigation steps filling & submitting forms clicking…

I wrote a blog post on my experiences using CasperJS to parse a single page site which used angular. http://www.andykelk.net/tech/web-scraping-with-casperjs

Re: Portia, an open-source visual web scraper

#63
post #35

Earlier quoted context omitted.

There are multiple internal tools I use at work (JIRA, our ticketing system, our code review tool) that won't work because of this issue. In the meantime, I've written Tampermonkey scripts that will scrape and embedd multiple pages all hack-like, but at least I get a good CSV of the data I need. To me, the value in this tool is the user interface for creating the scrape logic. If this ran as an embeddable JS app, tha…

how would a bookmarklet be able to crawl & scrape a website?

You can have javascript code as a bookmarklet

Re: Portia, an open-source visual web scraper

#65
post #35

Earlier quoted context omitted.

There are multiple internal tools I use at work (JIRA, our ticketing system, our code review tool) that won't work because of this issue. In the meantime, I've written Tampermonkey scripts that will scrape and embedd multiple pages all hack-like, but at least I get a good CSV of the data I need. To me, the value in this tool is the user interface for creating the scrape logic. If this ran as an embeddable JS app, tha…

Great idea on the bookmarklet. I could see a tool for building custom readers with clippings from various sites. Say I want to organize JavaScript array patterns and ideas. Throw in a way to clip parts of my PDF books into this "reader" and you have an amazing product worth millions.

Can you explain this more, how do you see this being operated? See a pdf, clip it, create your own reader with your own clips?

Re: Portia, an open-source visual web scraper

#67
post #26

The problem with these sorts of solutions is that they work perfectly for 'simple' sites like the register, but fail hard with 'modern' sites like, e.g. ASOS.com. Just tried ASOS and the web front end failed to request a product page correctly... All the dynamic JS and whatnot just plays havoc with these projects. In my experience you have to run through webdriver or something like phantomjs and parse the JS...

Anybody know of any tools that would work with JS-rendered sites, and not have to "parse the JS"?

I recently created a service designed to make JS sites crawlable by search engines and other robots. However it works for scraping as well. Try the demo: https://snapsearch.io/

Re: Portia, an open-source visual web scraper

#68

The problem with these sorts of solutions is that they work perfectly for 'simple' sites like the register, but fail hard with 'modern' sites like, e.g. ASOS.com. Just tried ASOS and the web front end failed to request a product page correctly... All the dynamic JS and whatnot just plays havoc with these projects. In my experience you have to run through webdriver or something like phantomjs and parse the JS...

It also depends on a coherent structure in HTML websites. Domains running websites which are more like javascript frontend modules shouldn't be scraped at all, it screams for a public API.

Try using https://snapsearch.io/ It is designed for JS sites.

Re: Portia, an open-source visual web scraper

#69

The problem with these sorts of solutions is that they work perfectly for 'simple' sites like the register, but fail hard with 'modern' sites like, e.g. ASOS.com. Just tried ASOS and the web front end failed to request a product page correctly... All the dynamic JS and whatnot just plays havoc with these projects. In my experience you have to run through webdriver or something like phantomjs and parse the JS...

I built SnapSearch for JS/SPA sites that need SEO. But it works for scraping as well. https://snapsearch.io/ You can try the demo. I tried it with "http://www.asos.com/" and it worked properly. Note that empty content actually means that the webserver returned with no body content. The real API will return the headers as well the body.

It works via Firefox, and it's load balanced and multithreaded. It takes care of all the thorny issues regarding async content... etc.

Post reply on HN