Implement title fetch in metadatafetch.py

A simple prototype for fetching the title of media using youtube-dl.
This commit is contained in:
Aleksander Wasaznik 2017-02-05 15:51:12 +01:00
parent 2466c20059
commit 3a329fe689
1 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,7 @@
import youtube_dl
from . import nyasync
@nyasync.ify
def title(url):
ydl = youtube_dl.YoutubeDL()
return ydl.extract_info(url, download=False).get('title')