Not infrequently, we receive a story submission to SoylentNews that consists of a single URL. Or, a story that contains but a single sentence or paragraph along with the URL. During weekends and holidays, the story submission queue tends to run dry. We have an IRC channel (#rss-bot) that gathers RSS links from around the web. Hmm.
It would be really handy if there were an automated way to "scrape" the contents of that page. In some cases, a simple redirect of the output of a text-based browser like Lynx would do the trick. Unfortunately, all too many sites subscribe to the idea that a web page needs to pull in Javascript and libraries from a myriad of other sites. Failing to do so displays a blank page.
There must be a way to do it — search engines like Google and Bing must extract the page text in order to index it. It would be best to have a general-purpose solution; having a custom template for each site is time-consuming to create and maintain (think if the site changes its layout). Our site is powered by Perl, so that would be the obvious preference.
So, fellow Soylentils, what tools and/or techniques have you used? What has worked for you?
Maybe I'm approaching this the wrong way? When all you have is a hammer... what am I missing here? Is there another approach?
(Score: 5, Insightful) by Anonymous Coward on Saturday June 04 2016, @06:39PM
Don't do it!
1) If the article isn't good enough for an editor to vet and read, why is it good enough to waste every soylentil's time on?
2) Scraping JS means soylentils would need to enable JS. Have you /spoken/ to us? When was the last time one of us /wasn't/ running noscript-or-equivalent??
(Score: 2) by urza9814 on Tuesday June 07 2016, @11:59PM
Seems that they don't need editors, they need article submissions. That's what this is intended to solve. The articles will still be edited as usual, this will just ensure that the editors have more than just a bare link to start with.
The idea is for the SN servers to run the JavaScript so you don't have to.