Grab data from page and url

Hello,
I need to extract information from email that is sent with a URL that when you open it it have status information and the address of package delivery (format is kept fixed). All that to connect it with woocommerce. It is the long way as this service I use does not have API option.
I know how to extract info from email, connect with woocommerce but I’m stuck how to extract delivey information from that url.
Is there a way to extract information from that link/web? AI that can do it?
thank you very much,

Hello,

Could you tell us more information about the URL string, provide an example of the URL, and what key/values do you want to extract from the URL/page?

If you are looking to get data from a webpage, you can use scraping integrations like ScrapingBee and ScrapeNinja to get content from the page.

2 Likes

Hi @ipoblete

If the URL provided is for a publicly accessible file, please utilize the HTTP “GET request” module to retrieve the data. If it isn’t a file, we should verify the URL before making an HTTP module make a request.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

Hi @samliew
sure, is a link like Live Tracking where you get info like this,

where I want to grab string “Dirección” (Addres) and check it exist “Entrega Exitosa” (successful delivery) with a woocommerce order information.
Best regards,

I would use ScrapeNinja’s “Scrape (Real Browser)” module for this, as client-side JavaScript needs to run to retrieve the data.

You CANNOT use a HTTP “Make a request” module to fetch this data.

Fields:

  1. CSS Selector field:   .visit-detail

  2. Extractor function field:

    function (input, cheerio) {
      let $ = cheerio.load(input);
      return {
        orderNum: $('h1').text().replace('Order #', ''),
        address: $('h3').first().next().text(),
        status: $('ul').children().first().children().last().text()
      }
    }
    

Output:

Screenshot_2023-09-29_190917

1 Like

cool @samliew. Thank you

1 Like