Post de Incorporação: Não consigo ler seletores CSS de um site React

It it helps, the code that’s used for pulling in the external post is here: discourse/app/models/topic_embed.rb at main · discourse/discourse · GitHub

If you have access to your site’s Rails console, you can test it to get some idea of what’s going on. For example:

TopicEmbed.find_remote("https://blog.discourse.org/2023/04/introducing-discourse-ai/")

Where I’ve run into problems is with the parse_html method that’s called at the end of the find_remote method. Ruby Readability struggles with some HTML/CSS.

It’s also possible that HTML isn’t being returned from your React site. You could confirm that by running the code that’s in the find_remote method in steps from the console.

2 curtidas