# node-mediax

> node-mediax is a node module that allows you to scrape Twitter to retrieve image URLs and info with specified URLs.

Latest version **0.0.3** (published 2023-11-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-mediax
pnpm add node-mediax
yarn add node-mediax
bun add node-mediax
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2023-11-13 |
| First published | 2023-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | romy saputra |
| Maintainers | romysaputrasihanandaa |
| Keywords | twitter, scrapping, media, url |

## Links

- npm: https://www.npmjs.com/package/node-mediax
- Repository: https://github.com/romysaputrasihananda/node-mediax
- Homepage: https://github.com/romysaputrasihananda/node-mediax#readme
- Issues: https://github.com/romysaputrasihananda/node-mediax/issues
- npm.io page: https://npm.io/package/node-mediax

## Dependencies (2)

- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.12
- [puppeteer](https://npm.io/package/puppeteer.md) ^21.4.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.0.3 (latest) — 2023-11-13
- 0.0.2 — 2023-11-09

## README

# node-mediax

node-mediax is a node module that allows you to scrape Twitter to retrieve image URLs and info with specified URLs.

### Getting Started

```sh
npm i node-mediax
# yarn add node-mediax
```

### Usage:

#### 1. Get info

```javascript
import Mediax from "node-mediax";

const data = await Mediax.get(
  "https://twitter.com/amortentia0213/status/1710162301326938255"
);
console.log(data);
```

##### Output

```json
{
  "username": "@amortentia0213",
  "avatar": "https://pbs.twimg.com/profile_images/1651244772646854658/LssoZYlz.jpg",
  "verified": false,
  "createAt": "2023-10-06T05:17:20.000Z",
  "tweet": "230929  #TGIFreday\n\n#Freya #프레야 #フレヤ #JKT48Freya Jayawardana",
  "media": [
    {
      "url": "https://pbs.twimg.com/media/F7u3iB-boAAzYT9?format=jpg&name=4096x4096",
      "type": "image"
    },
    {
      "url": "https://pbs.twimg.com/media/F7u3iB-aQAAgrHo?format=jpg&name=4096x4096",
      "type": "image"
    },
    {
      "url": "https://pbs.twimg.com/media/F7u3iB8awAA1QOJ?format=jpg&name=4096x4096",
      "type": "image"
    }
  ],
  "views": "32.4K",
  "reposts": "371",
  "quotes": "5",
  "likes": "2,640",
  "bookmarks": "72"
}
```

<br/>

#### 2. Save media

```javascript
import Mediax from "node-mediax";

await Mediax.save(
  "data",
  "https://twitter.com/amortentia0213/status/1710162301326938255"
);
```

##### Output

```json
[
  {
    "url": "https://pbs.twimg.com/media/F7u3iB-boAAzYT9?format=jpg&name=4096x4096",
    "message": "save on data/F7u3iB-boAAzYT9.jpg"
  },
  {
    "url": "https://pbs.twimg.com/media/F7u3iB8awAA1QOJ?format=jpg&name=4096x4096",
    "message": "save on data/F7u3iB8awAA1QOJ.jpg"
  },
  {
    "url": "https://pbs.twimg.com/media/F7u3iB-aQAAgrHo?format=jpg&name=4096x4096",
    "message": "save on data/F7u3iB-aQAAgrHo.jpg"
  }
]
```

##### Sample image

- **data/F7u3iB-boAAzYT9.jpg**
  ![](/data/F7u3iB-boAAzYT9.jpg)

- **data/F7u3iB8awAA1QOJ.jpg**
  ![](/data/F7u3iB8awAA1QOJ.jpg)

- **data/F7u3iB-aQAAgrHo.jpg**
  ![](/data/F7u3iB-aQAAgrHo.jpg)

<br/>

With node-mediax, you can easily access images from Twitter and integrate them into your projects. Be sure to comply with Twitter's usage rules and policies.

## License

This project is licensed under the [MIT License](LICENSE).

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