Live data from Hacker News

Show HN: RSS feeds for arbitrary websites using CSS selectors

feed-me-up-scotty.vincenttunru.com

31–40 of 134 posts

Re: Show HN: RSS feeds for arbitrary websites using CSS selectors

#31
post #28

I very simple plumbing tools like these.

This reminds me of the Soupault ( https://soupault.app/ ) philosophy for building static sites. You write it in any language you want like, pass it trough Pandoc or AsciiDoctor as preprocessor, and postprocess with Lua and CSS selectors.

You both might find https://stitcherd.vhodges.dev/ interesting then.

Re: Show HN: RSS feeds for arbitrary websites using CSS selectors

#33
post #25

Earlier quoted context omitted.

Thanks! I'll look at that.

> (Of course, for the combined feed this would be problematic.) Not so; unlike the HTML element which applies to a document, the xml:base attribute is applied to an element and its descendants. The typical pattern (as shown in the RFC 4287 example) is to put it on each entry’s . In your markup, you’ll end up with each entry having its URL in three places: http://example.com/item …

Excellent! I'll look into actually implementing this before making further comments, since I'm sure I'll find out such things as I do :P

Edit: the package I'm using to generate the feeds does not support that attribute yet, so it'll have to wait a bit for my PR to hopefully be accepted: https://github.com/jpmonette/feed/pull/158

Thanks for the pointers!

Re: Show HN: RSS feeds for arbitrary websites using CSS selectors

#34

Nice, but it's essentially scraping? Scraping is brittle. Some design changes and the whole thing breaks. Maintenance nightmare.

Not sure for the downvote reason. Like I say scraping is brittle. I've done hundreds of scraping projects in the past. A recent one was taking 50 shopping sites looking for what products they covered. Safe to say you look at it a month later and the XPaths/CSS selectors/whatever scraping method you used has changed.

This is why APIs exist.

Re: Show HN: RSS feeds for arbitrary websites using CSS selectors

#35

Nice, but it's essentially scraping? Scraping is brittle. Some design changes and the whole thing breaks. Maintenance nightmare.

Not sure for the downvote reason. Like I say scraping is brittle. I've done hundreds of scraping projects in the past. A recent one was taking 50 shopping sites looking for what products they covered. Safe to say you look at it a month later and the XPaths/CSS selectors/whatever scraping method you used has changed. This is why APIs exist.

Ideally sites would just publish RSS feeds themselves, but not all of them do — let alone an API…

Re: Show HN: RSS feeds for arbitrary websites using CSS selectors

#36
post #35

Earlier quoted context omitted.

Not sure for the downvote reason. Like I say scraping is brittle. I've done hundreds of scraping projects in the past. A recent one was taking 50 shopping sites looking for what products they covered. Safe to say you look at it a month later and the XPaths/CSS selectors/whatever scraping method you used has changed. This is why APIs exist.

Ideally sites would just publish RSS feeds themselves, but not all of them do — let alone an API…

Indeed, but the scraping workaround is brittle. We could make rules for all sites on the web that don't have a feed or API but it's not all that manageable.

It also begs the question of why they don't make their content that way, perhaps it was by choice. Especially if you use this kind of tool to syndicate things.

Not quite sure of the novelty of this one given that people have scraped things for decades.

There's probably a wiki endpoint for their example, maybe, maybe not. A lot of wiki's stuff is free to download and they have extensive endpoints for acquiring data.

Re: Show HN: RSS feeds for arbitrary websites using CSS selectors

#38

Nice, but it's essentially scraping? Scraping is brittle. Some design changes and the whole thing breaks. Maintenance nightmare.

I'm not sure I understand the criticism. What exactly is supposed to be the alternative? It's not like this is supposed to be used for high-availability purposes or stock trading or something. It scratches a particular itch for a handful of end users who just want to get all their news in their feed reader. It's expected that they'll maintain their own scraper parameters.

Re: Show HN: RSS feeds for arbitrary websites using CSS selectors

#39
post #21

Earlier quoted context omitted.

Same problem with SSL encryption. But with both RSS and SSL, if the user use a modern client, he shouldn't bother if its internally using RSS, Atom, SSL or TLS. I for one know most of my pals do know about RSS, but haven't heard the term 'Atom feed'.

“SSL” is finally dying as a term; the significant majority of what I see calls it TLS now. But the problem didn’t exist in the same way with SSL/TLS: SSL was actively killed off in favour of TLS so that regardless of what you call it, you’re actually dealing with TLS. But with feeds, RSS is still supported, and so the mindshare problem happens: people hear about RSS and so implement the inferior and problematic RSS r…

> I say just advertise it as “feeds”, not “RSS feeds”.

I think that's even worse. For most ordinary people that has a bunch of unintended meanings. "My Facebook has a feed, do you mean subscribing to your site on Facebook? Why do I see a bunch of code when I click the link?"

Re: Show HN: RSS feeds for arbitrary websites using CSS selectors

#40
post #27

In case anyone wants to detect the selectors automatically, here's a small python library I wrote that does it for you: https://github.com/lorey/mlscraper

A good idea and very cleanly implemented. I imagine that there's a ton of other possible applications that don't require much modification to the code. Thanks for sharing!
Post reply on HN