Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2269,24 +2269,21 @@ def serve_html_vk(filename):
|
|
2269 |
logging.debug(f"Decoded URL: {decoded_url}")
|
2270 |
logging.debug(f"Parsed base URL: {base_url}")
|
2271 |
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
|
2291 |
# Параметры запроса
|
2292 |
params = {
|
@@ -2303,12 +2300,11 @@ def serve_html_vk(filename):
|
|
2303 |
"sign": sign
|
2304 |
}
|
2305 |
|
2306 |
-
|
2307 |
# Формирование URL с использованием f-строк
|
2308 |
-
fullUrl = f"{base_url}?{'&'.join([f'{key}={value}' for key, value in params.items()])}"
|
2309 |
|
2310 |
logging.debug(f"Received params: fullUrl={fullUrl}")
|
2311 |
-
|
2312 |
# Преобразуем строку в JSON
|
2313 |
try:
|
2314 |
api_key_apps_vk_dict = json.loads(api_key_apps_vk)
|
|
|
2269 |
logging.debug(f"Decoded URL: {decoded_url}")
|
2270 |
logging.debug(f"Parsed base URL: {base_url}")
|
2271 |
|
2272 |
+
# Парсим параметры из декодированного URL
|
2273 |
+
query_params = dict(parse_qsl(parsed_url.query, keep_blank_values=True))
|
2274 |
+
|
2275 |
+
# Извлекаем параметры
|
2276 |
+
vk_access_token_settings = query_params.get('vk_access_token_settings', '')
|
2277 |
+
vk_app_id = query_params.get('vk_app_id')
|
2278 |
+
vk_are_notifications_enabled = query_params.get('vk_are_notifications_enabled')
|
2279 |
+
vk_is_app_user = query_params.get('vk_is_app_user')
|
2280 |
+
vk_is_favorite = query_params.get('vk_is_favorite')
|
2281 |
+
vk_language = query_params.get('vk_language')
|
2282 |
+
vk_platform = query_params.get('vk_platform')
|
2283 |
+
vk_ref = query_params.get('vk_ref')
|
2284 |
+
vk_ts = query_params.get('vk_ts')
|
2285 |
+
vk_user_id = query_params.get('vk_user_id')
|
2286 |
+
sign = query_params.get('sign')
|
|
|
|
|
|
|
2287 |
|
2288 |
# Параметры запроса
|
2289 |
params = {
|
|
|
2300 |
"sign": sign
|
2301 |
}
|
2302 |
|
|
|
2303 |
# Формирование URL с использованием f-строк
|
2304 |
+
fullUrl = f"{base_url}?{'&'.join([f'{key}={value}' for key, value in params.items()])}"
|
2305 |
|
2306 |
logging.debug(f"Received params: fullUrl={fullUrl}")
|
2307 |
+
|
2308 |
# Преобразуем строку в JSON
|
2309 |
try:
|
2310 |
api_key_apps_vk_dict = json.loads(api_key_apps_vk)
|