🎨 Use request instead of session (#363)

This commit is contained in:
Nikhil Badyal
2023-09-02 17:12:11 +05:30
committed by GitHub
parent 5c62a1b677
commit 720bfe9a3c
4 changed files with 8 additions and 9 deletions
+3 -1
View File
@@ -8,7 +8,7 @@ from typing import Any, Dict, List
import requests
from loguru import logger
from requests import Response
from requests import Response, Session
from src.config import RevancedConfig
from src.downloader.sources import APK_MIRROR_APK_CHECK
@@ -30,6 +30,8 @@ request_header = {
bs4_parser = "html.parser"
changelog_file = "changelog.md"
request_timeout = 60
session = Session()
session.headers["User-Agent"] = request_header["User-Agent"]
def update_changelog(name: str, response: Dict[str, str]) -> None: