Skip to content

Commit

Permalink
fix: fix user agent blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
ariesclark committed Nov 7, 2024
1 parent ba5bb11 commit 6f6e001
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"dependencies": {
"@babel/parser": "^7.26.2",
"@babel/traverse": "^7.25.9",
"user-agents": "^1.1.350",
"vrchat": "^1.18.6"
}
}
15 changes: 15 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion scripts/checkup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import fs from "node:fs/promises";
import { parse } from "@babel/parser";
import traverse from "@babel/traverse";
import beautify from "js-beautify";
import UserAgent from "user-agents";
import { SystemApi } from "vrchat";

const userAgent = new UserAgent();

const system = new SystemApi({
basePath: "https://vrchat.com/api/1",
baseOptions: {
headers: {
"User-Agent": "vrchat-monitor/1 [email protected]"
"User-Agent": userAgent.toString()
}
}
});
Expand Down

0 comments on commit 6f6e001

Please sign in to comment.