Skip to main content
Solved

Get text from component using REST API

  • September 15, 2023
  • 3 replies
  • 1135 views

Can I extract a text from a component using the REST API? I have a chat baloon component and I want to extract the text from it. As of now, the only solution I found was to create a Python script where I get a JSON of my file, get the component, get the {thumbnailurl}, save the png, use an OCR to extract a text from the png. But, the OCR is returning not so good results and I want to know if there is a simpler solution to it

Best answer by tank666

Find the required node in the JSON response, look at its children, find an object with the TEXT type and the characters property.

View original

3 replies

tank666
  • 4858 replies
  • September 15, 2023

Thanks for the reply! But how could I then extract the text content from there?


tank666
  • 4858 replies
  • Answer
  • September 15, 2023

Find the required node in the JSON response, look at its children, find an object with the TEXT type and the characters property.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings