youtube-dl: [youtube] Unable to decode n-parameter: download likely to be throttled

Checklist

  • I’m reporting a broken site support

  • I’ve verified that I’m running youtube-dl version 2021.12.17

./youtube-dl --version
2021.12.17

– NOTE!!!: Custom build from Master Working until recently. See: Issue30583

  • I’ve checked that all provided URLs are alive and playable in a browser – URL plays normally in BraveBrowser: https://www.youtube.com/watch?v=lDqlpTcxLqg

  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped – NOTE: using shell script so calls are consistent. COMMAND STRING: /media/media3/ytu/youtube-dl -v --console-title --verbose -f best[height<=?1080]/bestvideo[height<=?1080]+bestaudio --merge-output-format mp4 --write-thumbnail --write-description --write-info-json --ignore-errors --max-downloads 50 --no-overwrites --restrict-filenames --download-archive /media/media3/ytu/archive-video.txt --no-playlist --output /home/uc/Videos/ytu/%(uploader)s/%(title)s-%(id)s.%(ext)s https://www.youtube.com/watch?v=lDqlpTcxLqg

  • I’ve searched the bugtracker for similar issues including closed ones – Search Term yielded no results: “Unable to decode n-parameter”

Verbose log

Geting single URL ( dont get entire playlist )
NOT using BATCHFILE, using https://www.youtube.com/watch?v=lDqlpTcxLqg
COMMAND STRING: /media/media3/ytu/youtube-dl -v --console-title --verbose -f best[height<=?1080]/bestvideo[height<=?1080]+bestaudio --merge-output-format mp4  --write-thumbnail --write-description --write-info-json --ignore-errors --max-downloads 50 --no-overwrites --restrict-filenames --download-archive /media/media3/ytu/archive-video.txt --no-playlist  --output /home/uc/Videos/ytu/%(uploader)s/%(title)s-%(id)s.%(ext)s  https://www.youtube.com/watch?v=lDqlpTcxLqg
Timestamp: 
[R]un or Run & [T]ail? Options:[r/t]r
Typed: r
[debug] System config: []
[debug] User config: []                                                                                                                                                                                                                  
[debug] Custom config: []                                                                                                                                                                                                                
[debug] Command-line args: [u'-v', u'--console-title', u'--verbose', u'-f', u'best[height<=?1080]/bestvideo[height<=?1080]+bestaudio', u'--merge-output-format', u'mp4', u'--write-thumbnail', u'--write-description', u'--write-info-json', u'--ignore-errors', u'--max-downloads', u'50', u'--no-overwrites', u'--restrict-filenames', u'--download-archive', u'/media/media3/ytu/archive-video.txt', u'--no-playlist', u'--output', u'/home/uc/Videos/ytu/%(uploader)s/%(title)s-%(id)s.%(ext)s', u'https://www.youtube.com/watch?v=lDqlpTcxLqg']                                                                                                                                                                       
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8                                                                                                                                                                          
[debug] youtube-dl version 2021.12.17                                                                                                                                                                                                    
[debug] Python version 2.7.17 (CPython) - Linux-4.15.0-20-generic-x86_64-with-LinuxMint-19.1-tessa                                                                                                                                       
[debug] exe versions: ffmpeg 3.4.8, ffprobe 3.4.8                                                                                                                                                                                        
[debug] Proxy map: {}                                                                                                                                                                                                                    
[youtube] lDqlpTcxLqg: Downloading webpage                                                                                                                                                                                               
[youtube] Downloading just video lDqlpTcxLqg because of --no-playlist                                                                                                                                                                    
[youtube] lDqlpTcxLqg: Downloading MPD manifest                                                                                                                                                                                          
[youtube] lDqlpTcxLqg: Downloading player c5a4daa1                                                                                                                                                                                       
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (dx: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):                                                    
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1514, in _n_descramble                                                                                                                                       
    self._player_cache[player_id] = self._extract_n_function(video_id, player_url)                                                                                                                                                       
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1487, in _extract_n_function                                                                                                                                 
    funcname = self._extract_n_function_name(jscode)                                                                                                                                                                                     
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1476, in _extract_n_function_name                                                                                                                            
    'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]                                                                                                              
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/common.py", line 910, in _parse_json                                                                                                                                           
    raise ExtractorError(errmsg, cause=ve)                                                                                                                                                                                               
ExtractorError: dx: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.                                                                                                                                                         
)                                                                                                                                                                                                                                        
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (dx: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):                                                    
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1514, in _n_descramble                                                                                                                                       
    self._player_cache[player_id] = self._extract_n_function(video_id, player_url)                                                                                                                                                       
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1487, in _extract_n_function
    funcname = self._extract_n_function_name(jscode)
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1476, in _extract_n_function_name
    'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/common.py", line 910, in _parse_json
    raise ExtractorError(errmsg, cause=ve)
ExtractorError: dx: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
)
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (dx: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1514, in _n_descramble
    self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1487, in _extract_n_function
    funcname = self._extract_n_function_name(jscode)
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1476, in _extract_n_function_name
    'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/common.py", line 910, in _parse_json
    raise ExtractorError(errmsg, cause=ve)
ExtractorError: dx: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
)
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (dx: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1514, in _n_descramble
    self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1487, in _extract_n_function
    funcname = self._extract_n_function_name(jscode)
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1476, in _extract_n_function_name
    'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/common.py", line 910, in _parse_json
    raise ExtractorError(errmsg, cause=ve)
ExtractorError: dx: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
)
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (dx: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1514, in _n_descramble
    self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1487, in _extract_n_function
    funcname = self._extract_n_function_name(jscode)
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1476, in _extract_n_function_name
    'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/common.py", line 910, in _parse_json
    raise ExtractorError(errmsg, cause=ve)
ExtractorError: dx: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
)
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (dx: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1514, in _n_descramble
    self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1487, in _extract_n_function
    funcname = self._extract_n_function_name(jscode)
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1476, in _extract_n_function_name
    'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
  File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/common.py", line 910, in _parse_json
    raise ExtractorError(errmsg, cause=ve)
ExtractorError: dx: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
)
[info] Writing video description to: /home/uc/Videos/ytu/DarkJournalist/Dark_Journalist_Special_Report_-_DHS_CIA_UFO_Takeover-lDqlpTcxLqg.description
[info] Writing video description metadata as JSON to: /home/uc/Videos/ytu/DarkJournalist/Dark_Journalist_Special_Report_-_DHS_CIA_UFO_Takeover-lDqlpTcxLqg.info.json
[youtube] lDqlpTcxLqg: Downloading thumbnail ...
[youtube] lDqlpTcxLqg: Writing thumbnail to: /home/uc/Videos/ytu/DarkJournalist/Dark_Journalist_Special_Report_-_DHS_CIA_UFO_Takeover-lDqlpTcxLqg.jpg
[debug] Invoking downloader on u'https://rr3---sn-5go7yne6.googlevideo.com/videoplayback?expire=1653403020&ei=LJmMYsOaLsSUyAX8gJr4Bw&ip=128.127.104.80&id=o-AK3bmBCB8bG0x5mh5jrXLX9dSeDwQeJqETejstHzHLcP&itag=22&source=youtube&requiressl=yes&mh=vG&mm=31%2C29&mn=sn-5go7yne6%2Csn-5goeen7y&ms=au%2Crdu&mv=m&mvi=3&pl=23&initcwndbps=342500&spc=4ocVC1uVM1AIxWBmDhtHnUpX3h1d&vprv=1&mime=video%2Fmp4&ns=hF1g8npJN37xcxHTDFZb2FAG&cnr=14&ratebypass=yes&dur=6548.491&lmt=1653192575993965&mt=1653380939&fvip=2&fexp=24001373%2C24007246&c=WEB&txp=7211224&n=ASAJjGCGLHbscuiSQUm&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Cmime%2Cns%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAK7al3JgSvd8vF05prUjeK1nxGxrRAAiDIJgqur2h2nJAiEArmwXj6-wqwMK2g46tpjyTw2eA093KJA5DVIblEE1Ye4%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgINepUqsFnniJTPM6LFH8A99J7ztZQblYHKzObHmuI6cCIQDGMwIEcK1EZBbVKz5f6ih2kK-bVlN1NOn8gU6oJpEsDg%3D%3D'
[download] Destination: /home/uc/Videos/ytu/DarkJournalist/Dark_Journalist_Special_Report_-_DHS_CIA_UFO_Takeover-lDqlpTcxLqg.mp4
[download]   0.2% of 863.08MiB at 68.31KiB/s ETA 03:35:16

Description

  • Started seeing the following error for youtube URLs about a week ago ( estimated, hadn’t used in about 2 weeks ) - with our lovely throttling ensuing “Unable to decode n-parameter”
  • NOTE!!!: Custom build from Master Working until recently. See: Issue30583
  • Running from bash script, so COMMAND hasn’t changed.
  • Same issue occuring with DIRECT URL and [/videos] URLS ( where youtube-dl generates the list of URLs )
  • Saw 429, but this went away when changing VPN to obscure nation/location
  • Been through the YouTube throttling game for last year or two - this ‘seems’ like a new permutation.

DISCLAIMER: searched ‘n-parameter’ & didn’t find anything - apologies if this is duplicate. 😃

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

I wonder if #31504 is related.

An exception is being raised in a catch block:

Exception("Unsupported JS expression in: 'if(0!=e.length){d=(d%e.length+e.length)%e.length;var f=e[0];e[0]=e[d];e[d]=f}'..."

Apparently we managed to overlook the JS if statement! The fix from downstream will be applied shortly.

Yes, welcome to player c5a4daa1 where the descrambling function is applied like this:

...
$o=function(a){ ...
...
... b=dx[0](b),a.set("n",b) ...
/* 5000 lines later */
var dx=[$o]; ...

Patch to catch this:

--- old/youtube-dl/youtube_dl/extractor/youtube.py
+++ new/youtube-dl/youtube_dl/extractor/youtube.py
@@ -1471,9 +1471,15 @@
         nfunc, idx = re.match(target, nfunc_and_idx).group('nfunc', 'idx')
         if not idx:
             return nfunc
+        if int_or_none(idx) == 0:
+            real_nfunc = self._search_regex(
+                r'var %s\s*=\s*\[([a-zA-Z_$][\w$]*)\];' % (re.escape(nfunc), ), jscode,
+                'Initial JS player n function alias ({nfunc}[{idx}])'.format(**locals()))
+            if real_nfunc:
+                return real_nfunc
         return self._parse_json(self._search_regex(
             r'var %s\s*=\s*(\[.+?\]);' % (re.escape(nfunc), ), jscode,
-            'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
+            'Initial JS player n function name ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
 
     def _extract_n_function(self, video_id, player_url):
         player_id = self._extract_player_info(player_url)

@dirkf + entire ytdl past/present… Can’t come close to expressing my love & appreciation for the labor put forth on this project. It has literally transformed my life both in terms of making accessible an impossible amount of information, but doing so without the expense of every waking moment.

Prior to ytdl, procuring content was absurd - even with paid apps. This CLI-driven application is EXACTLY what is needed for archivists such as myself in this time of spiritual, culture & information wars. In no small part, I’m confident this project ( and others like it - if they exist ) have made a HUGE impact on the destiny of humanity.

The [VHS Generations] are dropping dead left & right ( even before biohazard was administered under cover of healthcare )… and the bulk of this heritage was pushed to YT. YT has taken upon themselves to fail miserably as a custodian of this heritage - unceremoniously destroying untold volumes of content under direction of mentally unfit review panels with questionable motives. Without [batchable] tools to archive this content, it would be lost to future generations ( excepting those with access to the Akashic Records I suppose ).

Just wanted to take a moment to recognize the team here - as the only time I (and probably everyone else) pop up is when I’m all pissed off & annoyed ( at the situation, not the tool - though its likely impossible to tell the difference).

THANKS!!! & God Bless you Catz! image

@dirkf could you please post here when the fix is merged to the main brunch, so we can update youtube-dl (since no new releases are happening)? 🙏

(instead of opening a new dupe about it 😉 )

The last time Google broke the native JSInterp was on Oct 11th 2022, with YT-player 7a062b77, which necessitated 6e2626f092c63a5fa22a31df409610b5deaf3968 as a fix… In the last few hours, they’re back 😠 with YT-player dac945fd:

yt-dl -vF "4jduuQh-Uho" => 

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--ffmpeg-location', '.\\FFmpeg', '--external-downloader-args', '-v 8 -stats', '-vF', '4jduuQh-Uho']
[debug] Encodings: locale cp1253, fs mbcs, out cp1253, pref cp1253
[debug] youtube-dl version 2023.01.31.114514
[debug] Python version 3.4.4 (CPython) - Windows-Vista-6.0.6003-SP2
[debug] exe versions: ffmpeg n5.2-dev-2245-N-109649-gab8cde6, ffprobe n5.2-dev-2245-N-109649-gab8cde6, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 4jduuQh-Uho: Downloading webpage
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (Unhandled exception in decode; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
  File "D:\a\youtube-dl\youtube-dl\youtube_dl\extractor\youtube.py", line 1524, in _n_descramble
youtube_dl.utils.ExtractorError: Unhandled exception in decode; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
)
[info] Available formats for 4jduuQh-Uho:
format code  extension  resolution note
249          webm       audio only tiny   47k , webm_dash container, opus @ 47k (48000Hz), 1.05MiB
250          webm       audio only tiny   59k , webm_dash container, opus @ 59k (48000Hz), 1.31MiB
251          webm       audio only tiny  105k , webm_dash container, opus @105k (48000Hz), 2.32MiB
140          m4a        audio only tiny  129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 2.86MiB
160          mp4        256x144    144p   13k , mp4_dash container, avc1.4d400c@  13k, 30fps, video only, 310.72KiB
278          webm       256x144    144p   15k , webm_dash container, vp9@  15k, 30fps, video only, 350.62KiB
242          webm       426x240    240p   22k , webm_dash container, vp9@  22k, 30fps, video only, 509.02KiB
133          mp4        426x240    240p   23k , mp4_dash container, avc1.4d4015@  23k, 30fps, video only, 534.08KiB
243          webm       640x360    360p   38k , webm_dash container, vp9@  38k, 30fps, video only, 865.13KiB
134          mp4        640x360    360p   41k , mp4_dash container, avc1.4d401e@  41k, 30fps, video only, 938.46KiB
244          webm       854x480    480p   59k , webm_dash container, vp9@  59k, 30fps, video only, 1.31MiB
135          mp4        854x480    480p   64k , mp4_dash container, avc1.4d401f@  64k, 30fps, video only, 1.43MiB
247          webm       1280x720   720p  112k , webm_dash container, vp9@ 112k, 30fps, video only, 2.48MiB
136          mp4        1280x720   720p  119k , mp4_dash container, avc1.4d401f@ 119k, 30fps, video only, 2.62MiB
18           mp4        640x360    360p  208k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 4.60MiB
22           mp4        1280x720   720p  247k , avc1.64001F, 30fps, mp4a.40.2 (44100Hz) (best)

Downstream also notified… 😄

RE PATCH: CONFIRM FIX

  • saved text to issue-30976.patch as sibling to /youtube-dl project folder
  • git apply issue-30976.patch
    • NOTE!!! ensure there is an empty line at EOF
$ ~/t/git/youtube-dl$ git apply --verbose issue-30976.patch
error: corrupt patch at line 19
    • then it applied successfully
$ ~/t/git$ git apply --verbose youtube-dl/issue-30976.patch
Checking patch youtube-dl/youtube_dl/extractor/youtube.py...
Applied patch youtube-dl/youtube_dl/extractor/youtube.py cleanly.
  • ran make
  • no throttling

Version Check

~/t/git/youtube-dl/youtube-dl --version
2021.12.17

execution with no throttling

$ ~/t/git/youtube-dl/youtube-dl https://www.youtube.com/watch?v=YHoYRUUcNY4 [youtube] YHoYRUUcNY4: Downloading webpage [youtube] YHoYRUUcNY4: Downloading player c5a4daa1 [download] Destination: Dark Journalist X-121 - Cayce Atlantean DNA Secret-YHoYRUUcNY4.f398.mp4 [download] 8.3% of 941.60MiB at 3.33MiB/s ETA 04:19

make output

$ make
mkdir -p zip
for d in youtube_dl youtube_dl/downloader youtube_dl/extractor youtube_dl/postprocessor ; do \
  mkdir -p zip/$d ;\
  cp -pPR $d/*.py zip/$d/ ;\
done
touch -t 200001010101 zip/youtube_dl/*.py zip/youtube_dl/*/*.py
mv zip/youtube_dl/__main__.py zip/
cd zip ; zip -q ../youtube-dl youtube_dl/*.py youtube_dl/*/*.py __main__.py
rm -rf zip
echo '#!/usr/bin/env python' > youtube-dl
cat youtube-dl.zip >> youtube-dl
rm youtube-dl.zip
chmod a+x youtube-dl
COLUMNS=80 /usr/bin/env python youtube_dl/__main__.py --help | /usr/bin/env python devscripts/make_readme.py
/usr/bin/env python devscripts/make_contributing.py README.md CONTRIBUTING.md
pandoc -f markdown -t plain README.md -o README.txt
/usr/bin/env python devscripts/prepare_manpage.py youtube-dl.1.temp.md
pandoc -s -f markdown -t man youtube-dl.1.temp.md -o youtube-dl.1
rm -f youtube-dl.1.temp.md
/usr/bin/env python devscripts/bash-completion.py
/usr/bin/env python devscripts/zsh-completion.py
/usr/bin/env python devscripts/fish-completion.py
/usr/bin/env python devscripts/make_supportedsites.py docs/supportedsites.md