Skip to content

Commit

Permalink
Merge pull request #33 from austin1237/deno
Browse files Browse the repository at this point in the history
Deno
  • Loading branch information
austin1237 authored Oct 19, 2024
2 parents 907705b + 6d87f42 commit 5f5415a
Show file tree
Hide file tree
Showing 18 changed files with 1,150 additions and 6,381 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,18 @@ jobs:
run: go test -v ./...
working-directory: jobNotifier

- name: Setup Node.js
uses: actions/setup-node@v4
- uses: denoland/setup-deno@v2
with:
node-version: v20.12.2
deno-version: v2.0.2

- name: Install local dependencies
run: npm install
run: deno install
working-directory: local

- name: build local typescript
run: npx tsc
- name: Lint local
run: deno lint
working-directory: local

- name: test local
run: npm test
- name: Test local
run: deno test
working-directory: local
22 changes: 18 additions & 4 deletions local/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# Local
This is where scraping scripts that can only be ran locally and not in a remote enviorment go.

This is where scraping scripts that can only be ran locally and not in a remote
enviorment go.

## Deno

These scripts are written to be used with the [Deno](https://deno.land/) runtime using the following command

```bash
deno task run
```

## Set up (OSX)
For these scripts to run sucessfully it requires an already running instance of chrome in debug mode, as well a tab logged into the target site to bypass auth/recaptcha.

For these scripts to run sucessfully it requires an already running instance of
chrome in debug mode, as well a tab logged into the target site to bypass
auth/recaptcha.

Run the following command with no other chrome process running to get Chrome running in debug mode:
Run the following command with no other chrome process running to get Chrome
started in debug mode:

```bash
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
```
13 changes: 13 additions & 0 deletions local/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"tasks": {
"dev": "deno run --watch main.ts",
"run": "deno run --allow-net --allow-env --allow-read --allow-sys main.ts"
},
"imports": {
"@std/assert": "jsr:@std/assert@1",
"axios": "npm:axios@^1.7.7",
"axios-mock-adapter": "npm:axios-mock-adapter@^2.1.0",
"puppeteer": "npm:puppeteer@^23.6.0"
},
"nodeModulesDir": "auto"
}
Loading

0 comments on commit 5f5415a

Please sign in to comment.