You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 30, 2022. It is now read-only.
# Due to some errors with JS fetching with httpx, we are now using sync urllib
75
-
self._getJS()
50
+
self._js=self.youtube.js
76
51
77
52
asyncdefgetJavaScript(self):
78
-
awaitself._asyncGetJS()
53
+
# we don't wanna break compatibility, so we just pass
54
+
pass
79
55
80
56
'''
81
57
Not fetching for new player JavaScript if pytube.__js__ is not None or exception is not caused.
82
58
'''
83
59
def_decipher(self, retry: bool=False):
84
60
ifnotpytube.__js__orretry:
61
+
self.youtube._js=None
62
+
self.youtube._js_url=None
63
+
pytube.__js__=None
64
+
pytube.__js_url__=None
85
65
self._getJS()
86
66
try:
87
67
'''
88
68
These two are the main methods being used from PyTube.
89
69
Used to decipher the stream URLs using player JavaScript & the player_response passed from the getStream method of this derieved class.
90
70
These methods operate on the value of "player_response" key in dictionary of self._player_response & save _deciphered information in the "url_encoded_fmt_stream_map" key.
# TODO: Applying signature is randomly failing - not to me, but on GitHub Actions server. I disabled throwing errors, since we don't want a whole mailbox of failed tests...
0 commit comments