import urllib
import urllib2
import email.utils
+import xml.etree.ElementTree
+from urlparse import parse_qs
try:
import cStringIO as StringIO
except ImportError:
import StringIO
-# parse_qs was moved from the cgi module to the urlparse module recently.
-try:
- from urlparse import parse_qs
-except ImportError:
- from cgi import parse_qs
-
-try:
- import xml.etree.ElementTree
-except ImportError: # Python<2.5: Not officially supported, but let it slip
- warnings.warn('xml.etree.ElementTree support is missing. Consider upgrading to Python >= 2.5 if you get related errors.')
-
from utils import *
pass
# description
- video_description = get_element_by_id("eow-description", video_webpage)
- if video_description: video_description = clean_html(video_description.decode('utf8'))
+ video_description = get_element_by_id("eow-description", video_webpage.decode('utf8'))
+ if video_description: video_description = clean_html(video_description)
else: video_description = ''
# closed captions
video_thumbnail = config["video"]["thumbnail"]
# Extract video description
- video_description = get_element_by_id("description", webpage)
- if video_description: video_description = clean_html(video_description.decode('utf8'))
+ video_description = get_element_by_id("description", webpage.decode('utf8'))
+ if video_description: video_description = clean_html(video_description)
else: video_description = ''
# Extract upload date