[이윰] 비메오 썸네일 추출 올바르게 적용하기
페이지 정보
shadow2fox
1,361 2 2
2023.04.24 10:45:53
짧은주소
-
https://yadolee.com/tip/1046 주소복사
본문
📝비메오 썸네일 추출 올바르게 적용하기
이윰빌더 3,x, 4.x 이용 중 비메오 썸네일 추출이 올바르게 적용되지 않는다면 아래와 같은 소스 수정을 해 보도록 하자.
이윰빌더 3.x : 그누보드5/eyoom/classes/eyoom.class.php,
이윰빌더 4.x : 그누보드5/eyoom/classes/bbs.class.php
를 열어 $output = $this->curl_web_scripping($url);를 검색하고 수정한다.
수정 전
case 'vimeo.com':
preg_match('/\<meta property=\"og:url\"\scontent=\"(?P<vid>[a-zA-Z0-9:\/\._]+)\"/i', $output, $scrapping);
$out['vid'] = $this->get_video_key($this->eyoom_host($scrapping['vid']));
preg_match('/\<meta property=\"og:image\"([^\<\>])*\>/i', $output, $scrapping);
$temp1 = explode('=', htmlspecialchars($scrapping[0]));
$temp2 = explode('/', urldecode($temp1[3]));
$temp3 = explode('_', urldecode($temp2[4]));
$out['imgkey'] = $temp3[0];
return $out;
break;
수정 후
case 'vimeo.com':
preg_match('/\<meta property=\"og:url\"\scontent=\"(?P<vid>[a-zA-Z0-9:\/\._]+)\"/i', $output, $scrapping);
if(array_key_exists("vid", $scrapping)) $out['vid'] = $this->get_video_key($this->eyoom_host($scrapping['vid']));
//preg_match('/\<meta property=\"og:image\"([^\<\>])*\>/i', $output, $scrapping);
//if(isset($scrapping[0])) $temp1 = explode('=', htmlspecialchars($scrapping[0]));
//if(isset($temp1[3])) $temp2 = explode('/', urldecode($temp1[3]));
//if(isset($temp2[4])) $temp3 = explode('_', urldecode($temp2[4]));
//if(isset($temp3[0])) $out['imgkey'] = $temp3[0];
preg_match('/\<meta property=\"og:image\"\scontent=\"(?P<imgsrc>[a-zA-Z0-9:\/\._-]+)\"/i', $output, $scrapping);
if(array_key_exists("imgsrc", $scrapping)) $out['imgkey'] = $scrapping['imgsrc'];
return $out;
break;
$video['img_url'] = "https://i.vimeocdn.com/video/{$video['key2']}.jpg" 검색하고 수정한다.
수정 전
case 'vimeo.com':
$video['img_url'] = "https://i.vimeocdn.com/video/{$video['key2']}.jpg";
break;
수정 후
case 'vimeo.com':
//$video['img_url'] = "https://i.vimeocdn.com/video/{$video['key2']}.jpg";
$video['img_url'] = $video['key2'];
break;
추천인 2
레벨 155
경험치 3,585,879
Progress Bar 11.57%
- 가입일 : 2015-03-10 12:21:44
- 서명 : 인간에게 가장 큰 선물은
자기 자신에게 기회를 주는 것이다.
- 크리스 가드너, Chris Gardner -
- 자기소개 : There's never a shortcut to happiness.
-
[뮤직 비디오 게시판] blue - yung kai [blue] 2024년2026-02-21
-
2 [Web Server Tip] 출석부 문구를 가져오지 못하는 증상 해결하기 +12026-02-20
-
1 [공유 자료실] Imagine v2.5.02026-02-20
-
[공유 자료실] Rufus 4.132026-02-20
-
[공유 자료실] Notepad++ 8.9.22026-02-17
-
1 [자유 게시판] Andai Aku Bisa - Tulus +12026-02-16
-
1 [Web Server Tip] 그누보드(영카트) 5.6.24 +12026-02-16
-
[골라먹는 요리] 호불호 없는 중화불고기2026-02-15
-
[자유 게시판] 무엇보다 건강하시고 어제 보다 나은 오늘, 오늘 보다 나은 내일을 위해 그렇게 행복함이 넘쳐나시길 기원드립니다 새해 복 많이 받으세요2026-02-16
-
[생활 정보] 15원 추가 적립이 있네요 https://campaign2.naver.com/npay/v2/click-point/?eventId=cr_2026012802_2602_01772026-02-10
-
[생활 정보] 15원 줍줍 아직 수확 전이시면 체크해 보세요 https://campaign2.naver.com/npay/v2/click-point/?eventId=cr_2026012802_2602_01272026-02-07
-
[생활 정보] 가격이 착하다 싶더니 할인이 사라지고 일반가 30,900원으로 판매하네요2026-01-28
-
[일일 메모장] 안타까운 소식입니다. 민주 진영의 거목이였던 이해찬 전 대표님 정말 고생 많으셨습니다. 이제 편히 쉬십시오.2026-01-25
-
[자유 게시판] 올 한 해도 잘 부탁드립니다. 새해 복 많이 받으세요.2026-01-06
-
[일일 메모장] 무슨 말이 필요할까요 삼가 조의를 표하며 고인의 명복을 빕니다 영면하세요2026-01-05
-
[생활 정보] 이번 년도도 잘 정리해 주셨네요 감사드립니다2026-01-01


댓글2
내사랑님의 댓글
축하합니다. 지뢰폭탄 제거로 26경험치를 획득하였습니다.
하늘구장님의 댓글
축하합니다. 첫 댓글로 14경험치를 획득하였습니다.