revati

revati

Hello everyone,

I have an idea that I want to scrape some HTML/JSON/XML sources. I want to fetch contents of root URL and then depending on source type, maybe extract some more URLs and scrape those as well.

In the end, I would like to scrape those resources regularly, so I would have diffs have one specific source (containing one or more URL contents) have changed over time.

If I in UI select one source I open list of all revisions of this source, opening one revision, I would see that particular state. (Something like gists in GitHub, can contain multiple files).

I would also be able to see diff history, how one revision diffs from another one.

Each scrape session would collect raw response. and diffing would be made on demand.

One possible solution would be to make git repo and scraper would store contents in {source name}/{date}/{all sources here}.html and make commits. Something like automated git repo. Then all diffing and revisions would already be handled by git itself.

I have approximated for now that there could be something like few thousands of sources. Each scraped in dynamic timeframes (but mostly daily/some hourly). So there would be tons of commits daily. and that git repo would get pretty big fast. (don’t know enough about git, maybe that isn’t a problem). The potential issue, concurrent scrapes would be committed in wringing commits. How to implement transactions?

More used I would be to some relational db, where data are stored.

sources
id | url | type

scrapes (odd name)
id | source_id | revision | timestamp

contents
id | scrape_id | contents (long text???)

Ideally, it would be CQRSish, at least Event soured in which case

%SourceAdded{id, url, type}
%SourceScraped{id, source_id, revision, timestamp, [url => contents]} // Lsit of contents as there can be many sources of data (root one is that url is equal to source url)

Later there will be heavy duty scraper, where facts will be extracted from those sources, but that is next level.

P.S. This probably is my rambling and trying to formalize for myself what exactly I need.

Showing Posts 1 to 2

mjaric

mjaric

Why not using git as a storage? You can even make it as distributed storage so nodes can merge remote branches and sync over time.

revati

revati OP

Yeah, that was one of my ideas hot to handle it. Will have to look into it, how it could work. Haven’t used git for such dynamics.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
achempion
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
jtormey
Lately I’ve been thinking about how to organize components as a LiveView application grows. One of the pain points I’ve found (for myself...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
georgeguimaraes
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews