Skip to content

Commit

Permalink
🚑️ Switch to Playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
KirianCaumes committed Nov 17, 2023
1 parent b5377b7 commit 017c24b
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 129 deletions.
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ RUN sudo apt-get install -y nodejs
RUN sudo npm i -g nodemon@2.0.22
RUN sudo npm i -g np@7.7.0
RUN sudo npm i -g gitmoji-cli@7.0.2
RUN sudo npx playwright install-deps chromium

WORKDIR /app_discogs-marketplace-api-nodejs
22 changes: 16 additions & 6 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

Another (better ?) NodeJs library to fetch data from Discogs marketplace. 💿

## Installation (with npm)
## 📂 Installation (with npm)

Run the following command in your project:

```sh
npm install discogs-marketplace-api-nodejs
```

## Quick Start
## ▶️ Quick Start

Import `DiscogsMarketplace` into your project:

Expand All @@ -22,7 +22,7 @@ import { DiscogsMarketplace } from 'discogs-marketplace-api-nodejs'
const DiscogsMarketplace = require('discogs-marketplace-api-nodejs').DiscogsMarketplace
```

## Examples
## 🤔 Examples

- Get top 250 items, of the 2nd page, filtered by Rock, listed by newest, for a given artist

Expand Down Expand Up @@ -102,7 +102,7 @@ const result = await DiscogsMarketplace.search({
})
```

## Data format
## 📃 Data format

You can provide parameters to `DiscogsMarketplace.search` function according to this interface:

Expand Down Expand Up @@ -278,7 +278,7 @@ interface OutputErrorInterface {
}
```

## How to contribute
## 💡 How to contribute

There is a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) on that project already configured, feel free to use it.

Expand All @@ -290,7 +290,17 @@ npm install

You can open a pull request with your new additions.

## Know issues
## 🐛 Known issues/problems

### Playwright

Install system dependencies:

```sh
sudo npx playwright install-deps chromium
```

More information [here](https://playwright.dev/docs/browsers#install-system-dependencies).

### Linkedom

Expand Down
14 changes: 13 additions & 1 deletion cspell.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,17 @@ module.exports = {
language: 'en',
ignorePaths: ['settings.json', 'devcontainer.json', 'node_modules/**', 'build/**', 'dist/**'],
ignoreWords: ['Kirian_', 'KirianCaumes'],
words: ['discogs', 'wantlist', 'catnos', 'devcontainer', 'linkedom', 'gitmojis', 'mywants', 'camelcase'],
words: [
'discogs',
'wantlist',
'catnos',
'devcontainer',
'linkedom',
'gitmojis',
'mywants',
'camelcase',
'texttrack',
'domcontentloaded',
'PJAX',
],
}
118 changes: 27 additions & 91 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"node": ">=14.0.0"
},
"dependencies": {
"axios": "^1.6.2",
"linkedom": "^0.16.4",
"playwright-chromium": "^1.40.0",
"user-agents": "^1.1.24"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 017c24b

Please sign in to comment.