Skip to content
How to convert a lo...
 
Notifications
Clear all

How to convert a long string into JSON

3 Posts
3 Users
0 Reactions
5 Views
Markus2
(@markus2)
Posts: 1
New Member
Topic starter
 

Hi all,

Could someone please assist me in converting the request result under “data” of type “long string” into JSON format?

 
Posted : 17/09/2024 4:44 am
samliew
(@samliew)
Posts: 293
Reputable Member
 

Welcome to the callin.io community!

You can’t directly convert HTML code into JSON.

Consider utilizing an AI web scraper.

Essentially, you need to "visit" the website yourself to retrieve the content. This process is known as Web Scraping.

Web Scraping

For web scraping, a service you can employ is ScrapeNinja to extract content from a webpage.

ScrapeNinja enables you to use jQuery-like selectors to pull content from elements via an extractor function. ScrapeNinja also has the capability to run the page in a live web browser, loading all content and executing page load scripts, which closely mimics what you see, unlike simply fetching the raw page HTML through the HTTP module.

If you'd like an example, please refer to Grab data from page and url - #5 by samliew

AI-powered “easier” method

Alternatively, you can use AI-powered web scraping tools such as Dumpling AI.

This is likely the most straightforward and rapid method to set up, as it only requires you to describe the content you need, rather than inspecting elements to create selectors or devising regular expression patterns.

The advantage here is that such services integrate BOTH fetching and extracting data within a single module (conserving operations), and eliminate the extensive setup required by other methods.

For additional details on various web scraping techniques, consult Overview of Different Web Scraping Techniques in Make 🌐

Hope this proves helpful! Please let me know if you have any further questions or encounter any issues.

@samliew

P.S.: Investing some time in the callin.io Academy can significantly reduce the time and frustration involved in using callin.io.

 
Posted : 17/09/2024 4:47 am
Msquare_Automation
(@msquare_automation)
Posts: 88
Estimable Member
 

Hi there,

If you need the output in a more readable format, you can convert the HTML to text using the text parser module or utilize the stripHTML() function:

image

Best regards,

Msquare Automation
Gold Partner of callin.io

 
Posted : 17/09/2024 5:14 am
Share: