Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update user agent description #306

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion octomind-bot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Key functionalities include:
The crawler’s user-agent string is set statically and remains the same across all requests.

- **Static User-Agent:** The user-agent string is manually set for all requests, ensuring consistency.
- `Octomind/X.x.y` is added as bot to the user agent signature, as suggested in [Crawler and UA strings](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent#crawler_and_bot_ua_strings)
fabianboth marked this conversation as resolved.
Show resolved Hide resolved

Example code snippet:

Expand All @@ -98,7 +99,7 @@ const { chromium } = require("playwright");
const browser = await chromium.launch();
const context = await browser.newContext({
userAgent:
"octomind Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.6312.4 Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; Octomind/1.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.6312.4 Safari/537.36",
});
const page = await context.newPage();
await page.goto("https://example.com");
Expand Down