]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Remove useless u prefixes
authorPhilipp Hagemeister <phihag@phihag.de>
Wed, 26 Nov 2014 12:06:02 +0000 (13:06 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Wed, 26 Nov 2014 12:06:02 +0000 (13:06 +0100)
youtube_dl/extractor/cbs.py
youtube_dl/extractor/clipfish.py
youtube_dl/extractor/eighttracks.py
youtube_dl/extractor/gamekings.py
youtube_dl/extractor/mooshare.py
youtube_dl/extractor/mtv.py
youtube_dl/extractor/nhl.py
youtube_dl/extractor/sohu.py
youtube_dl/extractor/space.py
youtube_dl/extractor/tudou.py
youtube_dl/extractor/youporn.py

index db48dc24fa2a4698ac0dc8a28033b8cca51d3d44..e43756ec69b1d7f1872e45cc6901b41752ec6ef6 100644 (file)
@@ -45,4 +45,4 @@ class CBSIE(InfoExtractor):
         real_id = self._search_regex(
             r"video\.settings\.pid\s*=\s*'([^']+)';",
             webpage, 'real video ID')
-        return self.url_result(u'theplatform:%s' % real_id)
+        return self.url_result('theplatform:%s' % real_id)
index 669919a2cc9039ffb91ae052b96d5531665341e0..a5c3cb7c6253776062fb5834d0fe4c121dfb9c99 100644 (file)
@@ -24,7 +24,7 @@ class ClipfishIE(InfoExtractor):
             'title': 'FIFA 14 - E3 2013 Trailer',
             'duration': 82,
         },
-        u'skip': 'Blocked in the US'
+        'skip': 'Blocked in the US'
     }
 
     def _real_extract(self, url):
@@ -34,7 +34,7 @@ class ClipfishIE(InfoExtractor):
         info_url = ('http://www.clipfish.de/devxml/videoinfo/%s?ts=%d' %
                     (video_id, int(time.time())))
         doc = self._download_xml(
-            info_url, video_id, note=u'Downloading info page')
+            info_url, video_id, note='Downloading info page')
         title = doc.find('title').text
         video_url = doc.find('filename').text
         if video_url is None:
index c1b4c729ef5888da0bdcebf692cbddad30dee4df..f4c1e2a72bf74821afd476dee86b806c0dbb56c7 100644 (file)
@@ -125,7 +125,7 @@ class EightTracksIE(InfoExtractor):
             info = {
                 'id': compat_str(track_data['id']),
                 'url': track_data['track_file_stream_url'],
-                'title': track_data['performer'] + u' - ' + track_data['name'],
+                'title': track_data['performer'] + ' - ' + track_data['name'],
                 'raw_title': track_data['name'],
                 'uploader_id': data['user']['login'],
                 'ext': 'm4a',
index 11fee3d31e88833b8074a1b59cff885eeffa46d3..cf8e90d7dbe9483efffe7894bedbe437746c5da1 100644 (file)
@@ -11,7 +11,7 @@ class GamekingsIE(InfoExtractor):
         'url': 'http://www.gamekings.tv/videos/phoenix-wright-ace-attorney-dual-destinies-review/',
         # MD5 is flaky, seems to change regularly
         # 'md5': '2f32b1f7b80fdc5cb616efb4f387f8a3',
-        u'info_dict': {
+        'info_dict': {
             'id': '20130811',
             'ext': 'mp4',
             'title': 'Phoenix Wright: Ace Attorney \u2013 Dual Destinies Review',
index f50e432a3693f22b4acd0afc705976ef3baa1d9a..34a4bec3a0d1fb91208acce4684a4078188b847d 100644 (file)
@@ -49,7 +49,7 @@ class MooshareIE(InfoExtractor):
         page = self._download_webpage(url, video_id, 'Downloading page')
 
         if re.search(r'>Video Not Found or Deleted<', page) is not None:
-            raise ExtractorError(u'Video %s does not exist' % video_id, expected=True)
+            raise ExtractorError('Video %s does not exist' % video_id, expected=True)
 
         hash_key = self._html_search_regex(r'<input type="hidden" name="hash" value="([^"]+)">', page, 'hash')
         title = self._html_search_regex(r'(?m)<div class="blockTitle">\s*<h2>Watch ([^<]+)</h2>', page, 'title')
index 506d2d5a071d9ab27c0c7ecb868af3ebcf75b24f..b482d6d4dfb09416bc46ef43ac21dff8bf2d5744 100644 (file)
@@ -164,7 +164,7 @@ class MTVServicesInfoExtractor(InfoExtractor):
         if mgid is None or ':' not in mgid:
             mgid = self._search_regex(
                 [r'data-mgid="(.*?)"', r'swfobject.embedSWF\(".*?(mgid:.*?)"'],
-                webpage, u'mgid')
+                webpage, 'mgid')
         return self._get_videos_info(mgid)
 
 
index 719eb51a468d72ef6939d5a4bf2f49570c24b15d..bdcf7e23953870e61a523a11b4daaf10cfc3ab75 100644 (file)
@@ -4,9 +4,11 @@ import re
 import json
 
 from .common import InfoExtractor
-from ..utils import (
+from ..compat import (
     compat_urlparse,
     compat_urllib_parse,
+)
+from ..utils import (
     unified_strdate,
 )
 
@@ -122,7 +124,7 @@ class NHLVideocenterIE(NHLBaseInfoExtractor):
         response = self._download_webpage(request_url, playlist_title)
         response = self._fix_json(response)
         if not response.strip():
-            self._downloader.report_warning(u'Got an empty reponse, trying '
+            self._downloader.report_warning('Got an empty reponse, trying '
                                             'adding the "newvideos" parameter')
             response = self._download_webpage(request_url + '&newvideos=true',
                                               playlist_title)
index 331b345dcbc777da9bf58367f6e4d74904a942c7..07f514a46246657206ae3fd31e19b1d2932e6f15 100644 (file)
@@ -32,7 +32,7 @@ class SohuIE(InfoExtractor):
             data_url = base_data_url + str(vid_id)
             data_json = self._download_webpage(
                 data_url, video_id,
-                note=u'Downloading JSON data for ' + str(vid_id))
+                note='Downloading JSON data for ' + str(vid_id))
             return json.loads(data_json)
 
         mobj = re.match(self._VALID_URL, url)
@@ -53,7 +53,7 @@ class SohuIE(InfoExtractor):
                    for q in QUALITIES
                    if data['data'][q + 'Vid'] != 0]
         if not vid_ids:
-            raise ExtractorError(u'No formats available for this video')
+            raise ExtractorError('No formats available for this video')
 
         # For now, we just pick the highest available quality
         vid_id = vid_ids[-1]
@@ -71,7 +71,7 @@ class SohuIE(InfoExtractor):
                         (allot, prot, clipsURL[i], su[i]))
             part_str = self._download_webpage(
                 part_url, video_id,
-                note=u'Downloading part %d of %d' % (i + 1, part_count))
+                note='Downloading part %d of %d' % (i + 1, part_count))
 
             part_info = part_str.split('|')
             video_url = '%s%s?key=%s' % (part_info[0], su[i], part_info[3])
index d34aefeaa24a2b8b307005e9164ad9349b638e88..c2d0d36a6935c40553419621678ce8987c4f2dbd 100644 (file)
@@ -33,5 +33,6 @@ class SpaceIE(InfoExtractor):
             # Other videos works fine with the info from the object
             brightcove_url = BrightcoveIE._extract_brightcove_url(webpage)
         if brightcove_url is None:
-            raise ExtractorError(u'The webpage does not contain a video', expected=True)
+            raise ExtractorError(
+                'The webpage does not contain a video', expected=True)
         return self.url_result(brightcove_url, BrightcoveIE.ie_key())
index be51f4f877ff7be71012098c89c520bd2826d30d..161e47624b383dfe76ea1e2ea6ec73395a97db53 100644 (file)
@@ -73,7 +73,7 @@ class TudouIE(InfoExtractor):
         result = []
         len_parts = len(parts)
         if len_parts > 1:
-            self.to_screen(u'%s: found %s parts' % (video_id, len_parts))
+            self.to_screen('%s: found %s parts' % (video_id, len_parts))
         for part in parts:
             part_id = part['k']
             final_url = self._url_for_id(part_id, quality)
index 97ef9c17e5b29e8aa9bd72c027acab63a74d81b3..8123928be982dbaccb98638ea0b915007ebc7066 100644 (file)
@@ -49,7 +49,7 @@ class YouPornIE(InfoExtractor):
         try:
             params = json.loads(json_params)
         except:
-            raise ExtractorError(u'Invalid JSON')
+            raise ExtractorError('Invalid JSON')
 
         self.report_extraction(video_id)
         try:
@@ -103,7 +103,7 @@ class YouPornIE(InfoExtractor):
         self._sort_formats(formats)
 
         if not formats:
-            raise ExtractorError(u'ERROR: no known formats available for video')
+            raise ExtractorError('ERROR: no known formats available for video')
 
         return {
             'id': video_id,