# 포스트 임베딩: React 사이트에서 CSS 선택자를 읽을 수 없습니다

**URL:** <https://meta.discourse.org/t/embedding-post-cant-read-css-selectors-from-react-site/279316>\
**Category:** Support\
**Tags:** embedding\
**Created:** [9월 17, 2023, 10:36오후 UTC](https://meta.discourse.org/t/embedding-post-cant-read-css-selectors-from-react-site/279316 "2023-09-17T22:36:49Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [9월 20, 2023, 4:52오후 UTC](https://meta.discourse.org/t/embedding-post-cant-read-css-selectors-from-react-site/279316/5 "2023-09-20T16:52:48Z")

</div>

> [@Aaron\_B](#):
>
> 임베디드 게시물 기능을 사용하여 내 React 사이트를 크롤링하는 방법에 대해 말씀드리는 것입니다.

도움이 된다면, 외부 게시물을 가져오기 위해 사용되는 코드는 여기 있습니다: [discourse/app/models/topic\_embed.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/main/app/models/topic_embed.rb#L120-L230)

사이트의 Rails 콘솔에 액세스 권한이 있다면, 이를 통해 테스트하여 어떤 일이 일어나고 있는지 파악할 수 있습니다. 예를 들어:

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

문제가 발생한 부분은 `find_remote` 메서드 끝에 호출되는 `parse_html` 메서드입니다. Ruby Readability는 일부 HTML/CSS를 처리하는 데 어려움을 겪습니다.

또한 React 사이트에서 HTML이 반환되지 않을 수도 있습니다. `find_remote` 메서드에 포함된 코드를 콘솔에서 단계별로 실행하여 이를 확인할 수 있습니다.

---

_[View the full topic](https://meta.discourse.org/t/embedding-post-cant-read-css-selectors-from-react-site/279316)._
