Skip to content

Commit 5432629

Browse files
committed
Add default UA
1 parent 28a0314 commit 5432629

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

akari_bot_webrender/constants/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
templates_path = (Path(__file__).parent.parent / "templates").resolve()
2323

24-
base_user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36"
24+
base_user_agent = "AkariBotWebrender/1.0 (+https://github.com/Teahouse-Studios/akari-bot-webrender) Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36"
2525

2626
base_width = 720
2727
base_height = 1280

akari_bot_webrender/functions/browser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ async def browser_init(self, browse_type: Literal["chrome", "chromium", "firefox
4545
else:
4646
raise ValueError(
4747
"Unsupported browser type. Use \"chromium\" or \"firefox\".")
48-
self.browser = await _b.launch(headless=not self.debug, executable_path=executable_path)
48+
self.browser = await _b.launch(headless=not self.debug,
49+
executable_path=executable_path)
4950
while not self.browser:
5051
self.logger.info("Waiting for browser to launch...")
5152
await asyncio.sleep(1)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "akari-bot-webrender"
3-
version = "0.5.7"
3+
version = "0.5.8"
44
description = ""
55
authors = [
66
{name = "OasisAkari", email = "OasisAkari@gmail.com"},

0 commit comments

Comments
 (0)