mjrode

mjrode

I have been trying to build a side project for about 6 months now and am extremely frustrated and not sure where to turn for help.

I originally wrote the application in Rails and had what I thought was a decent working version but the code became a mess and I just couldn’t rely on the data I was getting back from my web scraping.

You can see an example of my scraping code here.

I decided that I would try to rebuild this application in Elixir because I wanted to build something that was more reliable and I wanted to learn more about Elixir.

Well now I have spent a few weeks building it out and have run into the same issues (even worse now) that I was having with my Rails app. (FYI I am new to programming)

I am trying to scrape two tables in particular this one and this one.

You can see examples of my scrape logic here and here.

Now the issue I am having is there are small inconsistencies in the tables and where they are placed within the DOM that I do not know how to account for. I tried to write tests for these modules but there is only so much I can test. Also I am grabbing a lot of this data by filtering through parent classes to grab it so if any of the parent classes are off it ruins everything.

After reviewing the results of my scrapped data I realized that much of the information I was collection was either wrong or null.

I am at my wits end and don’t want to give up on this project but there is no point for me to continue to build this out if I can’t figure out a reliable way to scrape this data.

I am sorry for the long rambling post but was just curious if anyone would be able to help me out, I would honestly pay for your time at this point just so I could learn the proper way to go about doing something like this.

Showing Posts 1 to 3

BrightEyesDavid

BrightEyesDavid

Hi there. I’m also relatively new and I haven’t looked at your code yet as I’m on the phone, but if the HTML is valid(ish?) XML perhaps using an XML library such as SweetXML could be a good approach. You could then use XPath to select the elements required, which is very flexible and can help avoid relying on brittle structure.

mjrode

mjrode OP

Thanks David I will check that out!

dimitarvp

dimitarvp

Did somebody help you? Or did you do it yourself?

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics 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
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
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