Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to make a file and youtube downloader #1

Closed
monikarazdan opened this issue Nov 17, 2017 · 1 comment
Closed

trying to make a file and youtube downloader #1

monikarazdan opened this issue Nov 17, 2017 · 1 comment

Comments

@monikarazdan
Copy link

hello, I'm new to python and trying to make files and youtube downloader but while making that I have a problem with setting the youtube URL by the user at runtime(plz someone kindly correct me where I'm wrong)

from future import unicode_literals
import youtube_dl
from youtube_dl import YoutubeDL
import urllib
import shutil
import os

u_input=int(input("enter url:"))
ydl_opts = {}
url=(u_input)
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download(url)
info_dict=ydl.extract_info(url[0], download=False)
video_title = info_dict.get('title', None)
print(video_title)
print("DONE!")
script_dir = os.path.dirname(os.path.realpath(file))
print(script_dir+"\" +video_title)](url)

@ubbn
Copy link
Owner

ubbn commented Dec 7, 2017

Hi, I would suggest you to check youtube_dl' wiki and address the question to its forum

@ubbn ubbn closed this as completed Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants