안드로이드 개발 질문/답변
(글 수 45,052)
플레이리스트를 가져오는 api인데요
(↑ 플레이리스트를 이용한 API )
제가 원하는건 이게 아니라...
(↑ 실제 url링크)
이거처럼 플레이리스트 안에 있는 실제 동영상 정보입니다...
API로 하다가 안되어서 어쩔수없이 강제적으로 url를 파싱할려고햇는데..
youtube에서 그걸 막았는지 안되더군요... (전혀 다른정보를 파싱해서 가져옵니다...)
(↑ 비디오를 이용한 API)
video로 찾으면... 정렬도 잘 안되어있고...
이상하게 2년전에 올라온것들이 최신비디오로 올라왔다고 되어있어 난감합니다...
플레이리스트안에 정보를 찾을수 있는 방법이나 API 아시는분 계신가요?
즉 이 내용을 제가 쓸수있는 방법을 아시는분 계신가요?
동영상만 따로 가져오려고 하는 경우에 id를 가지고 조회하는 방법도 있어요.
올려주신
https://gdata.youtube.com/feeds/api/playlists/snippets?q=wodota&v=2
URL로 응답받은 XML에서
<athor> 엘리먼트의 서브 엘리먼트로 <uri> 엘리먼트가 있을겁니다.
이를테면
<uri>https://gdata.youtube.com/feeds/api/users/(게시자 ID)</uri>
이런식으로 되어 있습니다.
위의 uri에 적혀있는 주소를 그대로 들어가시면 해당 ID에 대한 추가 주소를 확인할 수 있는데요,
<gd:feedLink rel="http://gdata.youtube.com/schemas/2007#user.subscriptions" href="https://gdata.youtube.com/feeds/api/users/(게시자 ID)/subscriptions" countHint="13" />
<gd:feedLink rel="http://gdata.youtube.com/schemas/2007#user.contacts" href="https://gdata.youtube.com/feeds/api/users/(게시자 ID)/contacts" countHint="1506" />
<gd:feedLink rel="http://gdata.youtube.com/schemas/2007#user.inbox" href="https://gdata.youtube.com/feeds/api/users/(게
자 ID)/inbox" />
<gd:feedLink rel="http://gdata.youtube.com/schemas/2007#user.playlists" href="https://gdata.youtube.com/feeds/api/users/(
시자 ID)/playlists" />
<gd:feedLink rel="http://gdata.youtube.com/schemas/2007#user.uploads" href="https://gdata.youtube.com/feeds/api/users/(게시자 ID)/uploads" countHint="253" />
<gd:feedLink rel="http://gdata.youtube.com/schemas/2007#user.newsubscriptionvideos" href="https://gdata.youtube.com/feeds/api/users/(게시자 ID)/newsubscriptionvideos" />
등의 자세한 링크 정보를 확인하실 수 있습니다.
여기에서 실제 해당 사용자가 직접 공개하지 않은 부분을 제외하고
upload, playlist 항목은 열람할 수 있었습니다.
해당 href로 URL을 입력하시면
upload, playlist에 대해 원하는 XML 정보를 얻으실 수 있을겁니다.