Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
use of youtube-dl in my own python script #806
Comments
|
On Fri, Apr 26, 2013, at 12:58, yasoob wrote:
Side note: I should have separated the output methods to a different |
|
Ouch, I shouldn't have quoted the original message while replying by Side note: I should have separated the output methods to a different |
|
You should look at the method |
|
it is not working. It is throwing exceptions........ like the params does On Fri, Apr 26, 2013 at 10:21 PM, Jaime Marquínez Ferrándiz <
|
|
What are the errors you get? class NoneFile(object):
'''
A file-like object that does nothing
'''
def write(self,msg):
pass
def flush(self,*args,**kaargs):
pass
def isatty(self):
return False
class ScreenFile(NoneFile):
def write(self,msg):
logging.debug(msg)
class SimpleFileDownloader(youtube_dl.FileDownloader):
def __init__(self,*args,**kargs):
super(SimpleFileDownloader,self).__init__(*args,**kargs)
self._screen_file=ScreenFile()
self._ies = youtube_dl.gen_extractors()
for ie in self._ies:
ie.set_downloader(self)Then I can do: fd = SimpleFileDownloader({'outtmpl':'%(title)s'})
results = fd.extract_info(url, download = False)This will get the videos information. |
|
this is the whole input and the error which i get after following your method
|
|
Sorry, I forgot to mention that you needed to include the logging module, add |
|
Thanx it worked.........:).........now i realize how much effort you guys On Sun, Apr 28, 2013 at 7:34 PM, Jaime Marquínez Ferrándiz <
|
|
hey sorry for bothering you again . Now the problem is that my script is working great and is producing the download links........you can visit it on yasoobcode.appspot.com but now the problem is that when i click on download button the download page gives me a 403 forbidden header......Is there some problem with my header.......does youtube and other websites require some different header and if so how can i accomplish this that when the user clicks on download button the video starts to download.......Btw i am making this in flask. I hope to hear from you guys soon. Thanx for your previous help as well |
|
I'm not sure this issues should be discussed here, so if you don't mind you can email me (see my profile). |
I am trying to make a youtube downloading website and was going to use youtube-dl in my site. I wanted to know that how can i just get the variables with the results instead of results being printed on the screen.
for example if i run the main.py file with the url i get the printed output but i want that if i import Infoextractors file and then pass it a url it can give me back a variable possibly a list with the result which i can access for further use. Can anyone illustrate this with an example. I would be really grateful to you guys.