Python

[howto] Python - 유튜브 재생목록 역순으로 List에 담기

1919


1. python-youtube 라이브러리 설치.

 

pip install --upgrade python-youtube

 


2. 유튜브 api키 발급받기.

구글링 권장. ㅡㅡ;

 


3. 재생목록 역순 List 생성.

 

from pyyoutube import Api

 

api = Api(api_key='내 유튜브 API키 입력')

base_video_url = 'https://www.youtube.com/watch?v='

items_in_playlist = api.get_playlist_items(playlist_id='PL-c0h1s2FioBuR7rJffcZHHJTGVArmu9d', count=None)

result = []

for i in range(len(items_in_playlist.items)):

    result.append(base_video_url + items_in_playlist.items[i].snippet.resourceId.videoId)

result.reverse()

 

Innisfree 님 (200319) https://sir.kr/qa/404699

 


분류 제목
numpy PY - NumPy Random : Uniform Distribution (균등 분포)
numpy PY - NumPy Random : Logistic Distribution (로지스틱 분포)
numpy PY - NumPy Random : Multinomial Distribution (다항 분포)
numpy PY - NumPy Random : Exponential Distribution (지수 분포)
numpy PY - NumPy Random : Chi Square Distribution (카이제곱 분포)
numpy PY - NumPy Random : Rayleigh Distribution (레일리 분포)
numpy PY - NumPy Random : Pareto Distribution (파레토 분포)
numpy PY - NumPy Random : Zipf Distribution (지프 분포)
numpy Python - NumPy ufuncs : Intro (일반함수 소개)
numpy PY - NumPy ufuncs : Create Function (일반함수 생성)
numpy PY - NumPy ufuncs : Simple Arithmetic (간단 산수)
numpy PY - NumPy ufuncs : Rounding Decimals (반올림 소수점)
numpy PY - NumPy ufuncs : Logs (로그)
numpy PY - NumPy ufuncs : Summations (합계=합산)
numpy PY - NumPy ufuncs : Products (요소 곱셈)
23/32
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티
웹유틸
회원센터
홈짱닷컴 PC버전 로그인