Socket
Socket
Sign inDemoInstall

acuter

Package Overview
Dependencies
54
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

cli.js

18

index.js

@@ -96,2 +96,19 @@ 'use strict';

function videoPreview(tweetURL) {
if (typeof tweetURL !== 'string' && isURL(tweetURL) === false) {
return Promise.reject(new Error('url required'));
}
var url = tweetURL;
return got(url).then(function (res) {
var $ = cheerio.load(res.body);
var getMediaLink = matchRegEx(($('.PlayableMedia-player').attr('style'))) || null;
return getMediaLink;
}).catch(function (err) {
if (err.statusCode === 404) {
err.message = 'Link do not contain any video preview';
}
throw err;
});
}
exports.profile = profileImage;

@@ -102,1 +119,2 @@ exports.cover = coverImage;

exports.gif = gifLink;
exports.vidPrev = videoPreview;

2

package.json
{
"name": "acuter",
"version": "1.0.0",
"version": "1.0.1",
"description": "NodeJS API for Twitter media",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -97,2 +97,15 @@ <h1 align="center">

✔ <code>Preview __```link```__ of a __```video```__ available on twitter : </code>
__Example :__
```js
const acuter = require('acuter');
acuter.vidPrev('https://twitter.com/video../738..028').then(gifLink => {
console.log(gifLink);
// => https://o.twimg.com/../proxy.jpg...SAFSDFUYY
});
```
## Related

@@ -99,0 +112,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc