# add-urls-to-planning-file

> NB: THIS PROGRAM HAS NOT BEED TESTED IN CASE THE PRODUCT IS NOT AVAILABLE ON A WEBSITE. THE BEHAVIOR IN THIS CASE IS UNPREDICTABLE.

Latest version **8.54.1** (published 2018-01-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install add-urls-to-planning-file
pnpm add add-urls-to-planning-file
yarn add add-urls-to-planning-file
bun add add-urls-to-planning-file
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 8.54.1 |
| Published | 2018-01-23 |
| First published | 2018-01-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bitliner |

## Links

- npm: https://www.npmjs.com/package/add-urls-to-planning-file
- npm.io page: https://npm.io/package/add-urls-to-planning-file

## Dependencies (10)

- [ava](https://npm.io/package/ava.md) ^0.24.0
- [idx](https://npm.io/package/idx.md) ^2.2.0
- [debug](https://npm.io/package/debug.md) ^3.1.0
- [my-env](https://npm.io/package/my-env.md) ^1.2.0
- [limiter](https://npm.io/package/limiter.md) ^1.1.2
- [mustache](https://npm.io/package/mustache.md) ^2.3.0
- [commander](https://npm.io/package/commander.md) ^2.12.2
- [await-to-js](https://npm.io/package/await-to-js.md) ^2.0.1
- [node-bing-api](https://npm.io/package/node-bing-api.md) ^3.2.2
- [@bitliner/project-file](https://npm.io/package/@bitliner/project-file.md) ^8.38.4

## Recent versions

- 8.54.1 (latest) — 2018-01-23
- 8.46.3 — 2018-01-11

## README

# add-urls-to-planning file

NB: THIS PROGRAM HAS NOT BEED TESTED IN CASE THE PRODUCT IS NOT AVAILABLE ON A WEBSITE. THE BEHAVIOR IN THIS CASE IS UNPREDICTABLE.

## Usage

`ENV=production node bin/run.js -u "http://spreadsheetUrl.com" -n "sheetName"`

## Manual test

- consider the following spreadsheet to run test https://docs.google.com/spreadsheets/d/1EvD9mGr9zPAjTgifBc-dtT6PNlB4mcUywtUo_XJGo48/edit#gid=1097386816 

## How it works

Given an **SKU** and **channel**, it uses bing for searching for the query 

```
site:amazon.de  "HF3507/20" // QUERY_TYPE=v1
domain:amazon.de intitle:"QE75Q7F" "QE75Q7F" "Produktinformation" // QUERY_TYPE=v2
domain:amazon.de && intitle:"QE65Q7F" && "QE65Q7F" && -intitle:"Suchergebnis auf" // QUERY_TYPE=v3
```

[Example](https://www.bing.com/search?q=site%3Aamazon.de++%22HF3507%2F20%22&qs=n&form=QBRE&sp=-1&pq=site%3Aamazon.de+%22hf3507%2F20%22&sc=0-26&sk=&cvid=7D84D16878F147E3B8341D5FBD90B8F3)

It returns the triple <URL, name, URL_QUALITY>, representing:

- **URL**: the page of the product (e.g. where the product is sold)
- **name**: the name of the page as it appears on the search engine when you run a search
- **URL_QUALITY**: if the *name* contains the **SKU**: because the name is usually the title of the page, and if the page contains the SKU, there is 99% chance that it is the correct page

## Ideas for improvements (next versions)

- a query like `site:amazon.de  "Modellnummer:HF3507/20"` is much more strict, and it returns few result - usually just one - it could be used to increase the precision of the algorithm (less recall is acceptable) 

## Resources

- sometimes site works, someother times don't, same for domain, check following examples
  - [working fine with domain](https://www.bing.com/search?q=domain%3Aamazon.de+%26%26+intitle%3A%22QE65Q7F%22+%26%26+%22QE65Q7F%22+%26%26+-intitle%3A%22Suchergebnis+auf%22&qs=n&form=QBRE&sp=-1&pq=domain%3Aamazon.de+%26%26+intitle%3A%22qe65q7f%22+%26%26+%22qe65q7f%22+%26%26+-intitle%3A%22suchergebnis+auf%22&sc=0-81&sk=&cvid=D4EDEAFFD462485981DDCFADE7ADDF4B)
  - [non working fine with site](https://www.bing.com/search?q=site%3Aamazon.de+%26%26+intitle%3A%22QE65Q7F%22+%26%26+%22QE65Q7F%22+%26%26+-intitle%3A%22Suchergebnis+auf%22&qs=n&form=QBRE&sp=-1&pq=site%3Aamazon.de+%26%26+intitle%3A%22qe65q7f%22+%26%26+%22qe65q7f%22+%26%26+-intitle%3A%22suchergebnis+auf%22&sc=0-81&sk=&cvid=4C4492D5A4C74F3E91626D2B9EC38DA4)

  ## TODO

  - [ ] Print report - out of tot entries, tot URLs has been found (percentage, and absolute numbers)
  - [ ] To add validation of the column of the spreadsheet: each row should have at least the fields <sku, channel, urlName, urlQuality, url>

---
_Source: https://npm.io/package/add-urls-to-planning-file · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
