mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
deleted youtube_utils, and fixed various imports from the source code #273
This commit is contained in:
parent
fe72fe97b5
commit
6eb27b655a
BIN
src/snapshot.zip
Normal file
BIN
src/snapshot.zip
Normal file
Binary file not shown.
@ -11,7 +11,7 @@ import audio_services
|
||||
import paths
|
||||
import sound_lib
|
||||
import output
|
||||
import youtube_utils
|
||||
from audio_services import youtube_utils
|
||||
import application
|
||||
system = platform.system()
|
||||
if system=="Windows" and not hasattr(sys, 'frozen'): # We are running from source on Windows
|
||||
|
@ -1,12 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import youtube_dl
|
||||
|
||||
def get_video_url(url):
|
||||
ydl = youtube_dl.YoutubeDL({'quiet': True, 'format': 'bestaudio/best', 'outtmpl': u'%(id)s%(ext)s'})
|
||||
with ydl:
|
||||
result = ydl.extract_info(url, download=False)
|
||||
if 'entries' in result:
|
||||
video = result['entries'][0]
|
||||
else:
|
||||
video = result
|
||||
return video["url"]
|
Loading…
Reference in New Issue
Block a user