확인했습니다:
…이것이 투명한 박스로 변합니다:
DOM에는 다음과 같이 표시됩니다:
<img src="" width="480" height="360" title=" - YouTube" style="aspect-ratio: 480 / 360;">
그러나 게시될 때는 다음과 같이 렌더링됩니다:
확인했습니다:
…이것이 투명한 박스로 변합니다:
DOM에는 다음과 같이 표시됩니다:
<img src="" width="480" height="360" title=" - YouTube" style="aspect-ratio: 480 / 360;">
그러나 게시될 때는 다음과 같이 렌더링됩니다:
확인했습니다. 잘 발견하셨네요. 당분간 이 이슈에 pr-welcome 라벨을 붙이고, 팀에서 분류(triage)하도록 메모를 남겨두겠습니다.
흥미로운 문제입니다. OP의 링크 관련 문제를 메타(Meta)에서 재현할 수 있지만, 로컬과 내부 디스코urs 사이트에서는 정상적으로 가져와서 렌더링됩니다:
@roke_julian_lockhart 이 링크가 본인 사이트에서는 정상 렌더링되고 메타에서만 문제가 있는 건가요?
@martin 님, 몇몇 다른 곳에서도 마찬가지입니다:
https://www.youtube.com/watch?v=Cs3sTnLO6EE&lc=Ugyi1VtrCVd2POTc82N4AaABAg#:~:text=A%20Screencast%20Of%20LinkedIn%20Persona%20Verification%20Failure 링크를 사용하면 다음 곳에서 재현됩니다:
하지만 discussion.fedoraproject.org에서는 다음과 같이 렌더링됩니다:
https://youtube.com/shorts/Cs3sTnLO6EE 링크를 사용하면 아래 언급된 문제가 재현됩니다:
…다음 곳에서:
하지만 마찬가지로, discussion.fedoraproject.org에서는 다음과 같이 렌더링됩니다:
Fedora는 어떻게 이렇게 올바르게 처리하고 있는 것일까요?
이 문제가 해결되었나요? 현재 제 보드에서 유사한 문제가 발생하고 있어 관련 주제를 열었습니다.
@hameedacpa, 이건 해당 사항과 전혀 관련이 없습니다. 왜냐하면 이것은 프리뷰어에 관한 것이기 때문입니다. 또한, 단순히 프리뷰어를 사용함으로써 이것이 해결되지 않았음을 확인할 수 있습니다. 번역기를 설치해 보시길 권합니다.
제가 직면하고 있는 문제와 관련된 부분적인 이슈를 포함하는 이 주제를 발견했습니다
실제로 모든 YouTube 영상이 이전처럼 작동하지 않고, 포럼은 원래 보드 기반으로 만들어져서 커스터마이징을 할 수 없습니다
@hameedacpa, 감사합니다. 비슷하지만 동일한 문제인지는 의문입니다. 잘못된 썸네일 아이콘이 표시되는 점과 <img 태그의 다른 가로세로 비율을 고려하면, 이는 두 문제가 다르다는 점을 시사하는 것으로 보입니다. 이러한 세부 사항을 387672/1 이슈에 추가해 주시면 그곳에서 유용하게 활용될 것입니다. 만약 단순히 브라우저 차이로 인한 문제라면, 이 이슈의 부분적 중복으로 분류되어 처리될 것입니다.
이와 관련하여, 해당 스레드에서 브라우저 버전, Discourse 버전, 그리고 렌더링된 콘텐츠의 실제 마크업을 포함해 주십시오. 현재 해당 스레드에는 스크린샷 외에 실질적인 정보가 거의 없으며, 정보가 연속된 게시글에 흩어져 있습니다. 무보수 지원을 받으려면 정보를 가독성 있게 정리하는 데 노력을 기울여 주셔야 합니다.
우리 Onebox 플로우에서 무언가 문제가 일어나고 있는 것 같습니다. 리다이렉트/FinalDestination 관련이 아닌가 싶습니다. curl을 다음과 같이 사용하면:
curl -L https://youtube.com/shorts/Cs3sTnLO6EE
응답에서 title 및 기타 meta 태그를 찾을 수 있습니다:
curl -L https://youtube.com/shorts/Cs3sTnLO6EE | htmlq 'head > meta'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 947221 0 947221 0 0 406174 0 --:--:-- 0:00:02 --:--:-- 504109
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="ApvK67ociHgr2egd6c2ZjrfPuRs8BHcvSggogIOPQNH7GJ3cVlyJ1NOq/COCdj0+zxskqHt9HgLLETc8qqD+vwsAAABteyJvcmlnaW4iOiJodHRwczovL3lvdXR1YmUuY29tOjQ0MyIsImZlYXR1cmUiOiJQcml2YWN5U2FuZGJveEFkc0FQSXMiLCJleHBpcnkiOjE2OTUxNjc5OTksImlzU3ViZG9tYWluIjp0cnVlfQ==" http-equiv="origin-trial">
<meta content="rgba(255, 255, 255, 0.98)" name="theme-color">
<meta content="A Screencast Of LinkedIn Persona Verification Failure" name="title">
<meta content="For https://www.linkedin.com/help/linkedin/cases/73171318#:~:text=Thanks%20for%20contacting%20us%20about,to%20troubleshoot%20any%20additional%20causes." name="description">
...
curl -L https://youtube.com/shorts/Cs3sTnLO6EE | htmlq 'head > title'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 992110 0 992110 0 0 445530 0 --:--:-- 0:00:02 --:--:-- 739941
<title>A Screencast Of LinkedIn Persona Verification Failure - YouTube</title>
그러나 our oneboxer 코드를 통해 응답을 가져오면, <head> 내에서 받는 태그는 다음과 같습니다 (script + style 태그 제외):
uri = FinalDestination.new("https://youtube.com/shorts/Cs3sTnLO6EE", Oneboxer.get_final_destination_options("https://youtube.com/shorts/Cs3sTnLO6EE")).resolve
doc2 = Onebox::Helpers.fetch_response(uri)
Nokogiri.HTML(doc2).css("head").children.each do |headel|
next if headel.name == "script" || headel.name == "style"
puts headel.to_s
end; nil;
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="origin-trial" content="ApvK67ociHgr2egd6c2ZjrfPuRs8BHcvSggogIOPQNH7GJ3cVlyJ1NOq/COCdj0+zxskqHt9HgLLETc8qqD+vwsAAABteyJvcmlnaW4iOiJodHRwczovL3lvdXR1YmUuY29tOjQ0MyIsImZlYXR1cmUiOiJQcml2YWN5U2FuZGJveEFkc0FQSXMiLCJleHBpcnkiOjE2OTUxNjc5OTksImlzU3ViZG9tYWluIjp0cnVlfQ==">
<link rel="shortcut icon" href="https://www.youtube.com/s/desktop/ace6261e/img/favicon.ico" type="image/x-icon">
<link rel="icon" href="https://www.youtube.com/s/desktop/ace6261e/img/favicon_32x32.png" sizes="32x32">
<link rel="icon" href="https://www.youtube.com/s/desktop/ace6261e/img/favicon_48x48.png" sizes="48x48">
<link rel="icon" href="https://www.youtube.com/s/desktop/ace6261e/img/favicon_96x96.png" sizes="96x96">
<link rel="icon" href="https://www.youtube.com/s/desktop/ace6261e/img/favicon_144x144.png" sizes="144x144">
<link rel="stylesheet" href="//fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=YouTube+Sans:wght@300..900&display=swap" nonce="kFtYVVw9wWKkoPdOJkO9xQ">
<link rel="stylesheet" href="/s/player/65578ad1/www-player.css" nonce="kFtYVVw9wWKkoPdOJkO9xQ">
<link rel="stylesheet" href="https://www.youtube.com/s/desktop/ace6261e/cssbin/www-main-desktop-player-skeleton.css" nonce="kFtYVVw9wWKkoPdOJkO9xQ">
<link rel="stylesheet" href="https://www.youtube.com/s/desktop/ace6261e/cssbin/www-onepick.css" nonce="kFtYVVw9wWKkoPdOJkO9xQ">
<link rel="stylesheet" href="https://www.youtube.com/s/_/ytmainappweb/_/ss/k=ytmainappweb.kevlar_base.dsnGl9m3_bM.L.X.O/am=AAAgAAgk/d=0/rs=AGKMywEVyAGSU99VwQpoLFio5FrCvZ1WpA" nonce="kFtYVVw9wWKkoPdOJkO9xQ">
<meta name="theme-color" content="rgba(255, 255, 255, 0.98)">
<link rel="search" type="application/opensearchdescription+xml" href="https://www.youtube.com/opensearch?locale=en_US" title="YouTube">
<link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials">
<link rel="canonical" href="undefined">
<link rel="alternate" media="handheld" href="https://m.youtube.com/shorts/Cs3sTnLO6EE">
<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.youtube.com/shorts/Cs3sTnLO6EE">
<title> - YouTube</title>
<meta name="title" content="">
<meta name="description" content="Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.">
<meta name="keywords" content="video, sharing, camera phone, video phone, free, upload">
<link rel="alternate" href="android-app://com.google.android.youtube/http/www.youtube.com/shorts/Cs3sTnLO6EE">
<link rel="alternate" href="ios-app://544007664/vnd.youtube/www.youtube.com/shorts/Cs3sTnLO6EE">
아마도 이 ignore_redirects 때문인 것 같다고 생각했지만, FD 옵션을 수정해도 차이가 없었습니다:
유튜브가 다른 모든 서비스와 동일한 AI 스크래퍼 문제를 겪고 있기 때문에 스크래핑을 제한하고 있는 것 같습니다. 하지만 구체적으로 무엇이 빈 응답(브라우저에서 방문할 때와 마찬가지로 JS를 통해 meta/title 태그가 채워지는 것처럼 보이는)을 받게 하는지는 확실하지 않습니다.
여기 있는 유튜브 원박스(oneboxing) 코드가 title + image 태그가 채워지기를 기대하는 부분입니다:
조사를 계속할 것입니다 ![]()
대역폭을 절약하기 위해 필요한 것으로 보이는 것만 전송하는 것일 수 있습니다. 저희 Oneboxes는 브라우저 사용자 에이전트를 사용하므로, 아마도 이를 존중하면서 "좋아요. 그러면 OpenGraph는 필요 없겠네요"라고 판단하는 것 같습니다.
좋아요, 여기 수정 방법이 있는 것 같습니다. YouTube에 대한 이 작업에는 oEmbed를 사용하는 것이 더 나을 것 같습니다:
그렇지 않은 것 같습니다. 두 가지 문제로 보입니다:
전체적으로 oEmbed URL이 더 안전한 것 같습니다. OP 비디오의 경우 https://www.youtube.com/oembed?url=https://youtube.com/shorts/Cs3sTnLO6EE&format=json이며, 다음과 같은 응답을 얻습니다:
그 수정이 병합된 후, 이제 정상적으로 작동합니다 ![]()
onebox URL 응답은 1일간 캐시되므로, 새 결과를 확인하기 위해 콘솔에서 Oneboxer.preview("https://youtube.com/shorts/Cs3sTnLO6EE", invalidate_oneboxes: true)를 실행해야 했습니다.
이 주제는 2일 후 자동으로 닫혔습니다. 더 이상 새 답글을 작성할 수 없습니다.