#im trying to parse answer but i not able to parse image ,inline math and svg please help me guys

23 messages · Page 1 of 1 (latest)

gleaming bluffBOT
#

See #faq to learn how to properly share code on Discord: #faq message

craggy stone
#
                  steps.forEach((step) => {
                    step.blocks.forEach((block) => {
                        if (block.type === 'TEXT') {
                        stepsHtml += `<div>${block.block.editorContentState.blocks[0].text}</div>`;
                        const mathContent = ""; // MathJax content
                       // const htmlContent = "<p>This is an HTML paragraph.</p>"; // HTML content

// Append both MathJax and HTML content within <div> tags
                        stepsHtml += `<div>${mathContent}${htmlContent}</div>`;
                        }
                        if (block.type === 'EXPLANATION') {
                        stepsHtml += `<ol>`;
                        block.block.editorContentState.blocks.forEach((listItem) => {
                            if (listItem.type === 'unstyled') {
                            stepsHtml += `<li>${listItem.text}</li>`;
                            }
                        });
                        stepsHtml += `</ol>`;
                        }
                    });
                    });   ```
pliant holly
#

```js
your code here
```

#

your question also doesn't really make any sense

#

I assume you're using all these strings with innerHTML. you probably shouldn't.

craggy stone
#

Yes

#

I also using script of mathjax in html file

craggy stone
#

@pliant holly

#

im making discord bot who scrap answer from website but in my answer mathjax and image not support

craggy stone
pliant holly
#

zero amount of the information you've given is actually helpful

craggy stone
#

I'm very grateful to you if you helped me

pliant holly
#

you need to at least share relevant code, yes. you should also attempt to better-describe the problem.

craggy stone
#

sir im trying to scrape answer from website but it was only able to scrap text not able to scrape image and math syntax

craggy stone
craggy stone
# craggy stone

these answer which i try to scrape see difference in my answer

pliant holly
#

none of your code is scraping anything. so yes, show more code.

craggy stone
#

here

craggy stone