Skip to content

Commit

Permalink
Bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
babaprogramlar committed Jul 13, 2024
1 parent 70e4549 commit b67b2de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import time
import json
from .xml.etree import ElementTree as ElementTree
import xml.etree.ElementTree as ElementTree
from html import unescape
from typing import Dict, Optional

Expand Down
7 changes: 3 additions & 4 deletions addon/globalPlugins/basic_youtube_downloader/pytube/cipher.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
class Cipher:
def __init__(self, js: str):
self.transform_plan: List[str] = get_transform_plan(js)
var_regex = re.compile(r"^\$*\w+\W")
var_regex = re.compile(r"^\w+\W")
var_match = var_regex.search(self.transform_plan[0])
if not var_match:
raise RegexMatchError(
Expand Down Expand Up @@ -269,9 +269,8 @@ def get_throttling_function_name(js: str) -> str:
# a.C && (b = a.get("n")) && (b = Bpa[0](b), a.set("n", b),
# Bpa.length || iha("")) }};
# In the above case, `iha` is the relevant function name
r'a\.[a-zA-Z]\s*&&\s*\([a-z]\s*=\s*a\.get\("n"\)\)\s*&&\s*'
r'\([a-z]\s*=\s*([a-zA-Z0-9$]+)(\[\d+\])?\([a-z]\)',
]
r'a\.[a-zA-Z]\s*&&\s*\([a-z]\s*=\s*a\.get\("n"\)\)\s*&&.*?\|\|\s*([a-z]+)',
r'\([a-z]\s*=\s*([a-zA-Z0-9$]+)(\[\d+\])\([a-z]\)', ]
logger.debug('Finding throttling function name')
for pattern in function_patterns:
regex = re.compile(pattern)
Expand Down
2 changes: 1 addition & 1 deletion buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _(arg):
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
"addon_description": _("A plugin that can download Youtube videos and playlists."),
# version
"addon_version": "2.0.1",
"addon_version": "2.0.2",
# Author(s)
"addon_author": "Bora FIRLANGEÇ <borafirlangec@gmail.com>",
# URL for the add-on documentation support
Expand Down

0 comments on commit b67b2de

Please sign in to comment.