[Help] Missing Python Modules / Getting Youtube-Dl.py To Run On Pandor


jonai

Still Fresh
Joined
Aug 28, 2006
Messages
67
Hello,

usually I use the youtube-dl.py script which can be found here
http://bitbucket.org/rg3/youtube-dl/
to download Videos with my Win-XP/Debian PC at home and later I watch them with the mplayer of my Pandora.
I already installed the Hotfix and Mplayer package.
I thought, why not run the script on the Pandora itself because it has Python already installed?? It works perfect on my PC with Python 2.6.4.

When I try to do this the script complains about missing python modules in my terminal window.
The script uses the following modules:

import htmlentitydefs
import httplib
import locale
import math
import netrc
import os
import os.path
import re
import socket
import string
import subprocess
import sys
import time
import urllib
import urllib2

Isn't the Python on the Pandora supposed to be a complete working Python or am I missing something here??
Can someone confirm this if it is the case that there are missing modules in the Python package of the Pandora?

How can I get this script to work on the Pandora?


Thank you very much for your attention.
 
Subprocess is definately not installed by default. I ran into this while trying to get Comix to work. If it's really important to you, you can install the missing modules by doing a:
Code:
sudo opkg update
sudo opkg install python-subprocess

Python modules are tiny, and don't take up much space at all on the NAND. Alternatively, you could download the missing modules, unpack the .py files into the same folder as youtube-dl.py and it should pick them up from there without modifying the NAND.
 
I don't know how to solve your problem, unfortunately, but I would like to add a question, as I believe your problem will be solved easily enough by just installing the python-* modules through opkg ..

My question is this: can this script be easily modified to download from my Youtube user accounts Favourites list? I have been Favourite'ing all my Youtube videos with the idea that I can one day download them all through some script, and this looks like it might be almost what I need .. I'd love to just set up a script to automatically download every video in my favourites. Think thats possible, or will I have to write a scraper manually? (Not too interested in doing that, if I have to I will though .. got a lot of great vids in my favourites list that I'd love to have offline some day ..)
 
torpor said:
I don't know how to solve your problem, unfortunately, but I would like to add a question, as I believe your problem will be solved easily enough by just installing the python-* modules through opkg ..

My question is this: can this script be easily modified to download from my Youtube user accounts Favourites list? I have been Favourite'ing all my Youtube videos with the idea that I can one day download them all through some script, and this looks like it might be almost what I need .. I'd love to just set up a script to automatically download every video in my favourites. Think thats possible, or will I have to write a scraper manually? (Not too interested in doing that, if I have to I will though .. got a lot of great vids in my favourites list that I'd love to have offline some day ..)


Yes It can. A modified version that does exactly that and more can be found here
https://bitbucket.org/archanamiya/youtube-dl


Is there an alternative way to opkg to get the module files offline from the pandora ?? (for example with my Windows XP machine)

I hope this helps
 
Last edited by a moderator:
Is there an alternative way to opkg to get the module files offline from the pandora ?? (for example with my Windows XP machine)

If you know the package names, you can just download them with your PC, put them on an SD card, and use "opkg install ./somepackagename.pkg" to get it installed .. but you have to really know the dependencies of the modules, and you can use opkg to show them for each package .. you'll have to make the list yourself, though ..
 
Back
Top