Compare commits
2 Commits
f09b58fb63
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bcb7ae01b3 | ||
|
|
11f120ce2f |
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM node:22-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json .
|
||||
|
||||
RUN npm install
|
||||
|
||||
RUN npx playwright install-deps
|
||||
RUN npx playwright install chromium
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["node", "index.js"]
|
||||
9
index.js
9
index.js
@@ -60,13 +60,10 @@ async function compareAndSave(productsPrice) {
|
||||
}
|
||||
|
||||
async function getProducts() {
|
||||
const products = await axios
|
||||
.get(
|
||||
"https://db.maciaszek.ovh/api/collections/gifts_items/records?fields=ceneo_id&filter=ceneo_id!=''"
|
||||
)
|
||||
.then((response) => response.data.items.map((item) => item.ceneo_id));
|
||||
const products = fs.readFileSync("input.txt", "utf8");
|
||||
const productsIds = products.split("\n");
|
||||
|
||||
return products;
|
||||
return productsIds;
|
||||
}
|
||||
|
||||
async function init() {
|
||||
|
||||
Reference in New Issue
Block a user