Pytube: signature = cipher.get_signature(js, stream['s']) key error 's'

Created on 12 Jun 2019  路  2Comments  路  Source: pytube/pytube

hey,
I'm trying to download with Youtube module and some videos throws this error :

Traceback (most recent call last): File "download2.py", line 81, in <module> isSuccess = downloadYouTube(row['video_id'],path_videos) File "download2.py", line 17, in downloadYouTube yt = YouTube(url) # gerer video unavailable File "/home/aub.haddad/anaconda3/envs/youtube/lib/python3.6/site-packages/pytube/__main__.py", line 88, in __init__ self.prefetch_init() File "/home/aub.haddad/anaconda3/envs/youtube/lib/python3.6/site-packages/pytube/__main__.py", line 97, in prefetch_init self.init() File "/home/aub.haddad/anaconda3/envs/youtube/lib/python3.6/site-packages/pytube/__main__.py", line 133, in init mixins.apply_signature(self.player_config_args, fmt, self.js) File "/home/aub.haddad/anaconda3/envs/youtube/lib/python3.6/site-packages/pytube/mixins.py", line 49, in apply_signature signature = cipher.get_signature(js, stream['s']) KeyError: 's'

can you help me please.
Thank youuu

stale

Most helpful comment

Pull request #395 fixes this.

In pytube/mixins.py chage line 41 from
if 'signature=' in url:
to
if ('signature=' in url) or ('&sig=' in url) or ('&lsig=' in url):

All 2 comments

Pull request #395 fixes this.

In pytube/mixins.py chage line 41 from
if 'signature=' in url:
to
if ('signature=' in url) or ('&sig=' in url) or ('&lsig=' in url):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dreamingbinary picture dreamingbinary  路  3Comments

arthurbarros picture arthurbarros  路  4Comments

chris-saunders picture chris-saunders  路  6Comments

JJLAAA picture JJLAAA  路  5Comments

purnendushukla picture purnendushukla  路  6Comments