# async_investigator

> Async requests to scrap html websites

Latest version **1.0.3** (published 2022-05-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install async_investigator
pnpm add async_investigator
yarn add async_investigator
bun add async_investigator
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2022-05-26 |
| First published | 2022-05-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | alex |
| Maintainers | alexalves |
| Keywords | nodejs, async, scraping |

## Links

- npm: https://www.npmjs.com/package/async_investigator
- npm.io page: https://npm.io/package/async_investigator

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^3.2.4

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2022-05-26
- 1.0.2 — 2022-05-26
- 1.0.1 — 2022-05-26

## README

# Async Investigator
Async requests to scrap html websites  
```
npm i async_investigator  
```
## use
```
import investigator from "async_investigator";  
  
const websites = [  
    {  
        "reason":"Currency conversion CAD to BRL",  
        "url": "https://www.xe.com/currencyconverter/convert/?Amount=1&From=BRL&To=CAD",  
        "textFound": "1 CAD",  
        "foundCallback": (website, html) => {  
            const x = html.indexOf('1 CAD = ')  
            const subhtml = html.substr(x)  
            const y = subhtml.substr(0, subhtml.indexOf('BRL'))  
            console.log(website.reason, ':', y)  
        },  
        "notFoundCallback": (website, html) => {  
            console.log( website.textFound, 'notFoundCallback')  
        }  
    },  
    {  
        "reason":"Flight ticket Toronto/São Paulo",  
        "url": "https://www.aircanada.com/en-ca/flights-from-toronto-to-sao-paulo",  
        "textFound": "CAD ",  
        "foundCallback": (website, html) => {  
            const x = html.indexOf(website.textFound)  
            const subhtml = html.substr(x)  
            const y = subhtml.substr(0, 9)  
            console.log(website.reason, ':', y)  
        },  
        "notFoundCallback": (website, html) => {  
            console.log( website.textFound, 'notFoundCallback')  
        }  
    }  
]  
  
investigator.get(websites)  

```
## GitHub
https://github.com/alexbelloni/async_investigator

-------------    
<br/>  
Alex Alves

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