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

cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
515 12931 101
New
wmnnd
Hey folks, I wanted to share with you a project I’ve been working on for a while: It’s an Open Source (AGPLv3) newsletter tool. Think Ma...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
sntran
In my third year of college, around 2010, I found Erlang. A few years later, I found Elixir. I liked the ideas at once: many small proces...
New
Ganna
Hi everyone, I have 8 years of production experience with Erlang/OTP and I’m just starting to get to know Elixir. What would you learn f...
New
gtcode
I’ve been tinkering with Lynx (by José) via hold_ledger. I used AI to write the code, a separate specification, the tests, and the Lean p...
New
AstonJ
A remark @Garrison made… ..has already inspired a thread for the technical side of reclaiming our internet, but there is of course anot...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
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
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews