본문 바로가기

Python/실습

[YTS YIFY movie API] 영화 다운로드 횟수 TOP 10 / 파이썬

www.yts.mx/api

 

API Documentation - YTS YIFY

Official YTS YIFY API documentation. YTS offers free API - an easy way to access the YIFY movies details.

yts.mx

코드

# 파이썬 
import requests
import json

api_url = 'https://yts.mx/api/v2/list_movies.json?sort_by=download_count&limit=10'
data = requests.get(api_url)
json_data = json.loads(data.text)

for d in json_data['data']['movies']:
    print(d['title_long'])

결과