New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

twitter-downloader

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitter-downloader - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

lib/types/twitter.d.ts

@@ -44,7 +44,7 @@ export interface Twitter {

type: string;
url: string;
image?: string;
expandedUrl: string;
cover?: string;
duration?: string;
variants?: VideoVariants[];
videos?: VideoVariants[];
}

@@ -51,0 +51,0 @@ export interface VideoVariants {

@@ -96,14 +96,14 @@ "use strict";

if (v.type === "photo") {
return { type: v.type, url: v.media_url_https, expandedUrl: v.expanded_url };
return { type: v.type, image: v.media_url_https, expandedUrl: v.expanded_url };
}
else {
const url = v.video_info.variants
.filter((v) => v.content_type === "video/mp4")
.map((v) => {
let quality = v.url.match(/\/([\d]+x[\d]+)\//)[1];
const videos = v.video_info.variants
.filter((video) => video.content_type === "video/mp4")
.map((variants) => {
let quality = variants.url.match(/\/([\d]+x[\d]+)\//)[1];
return {
bitrate: v.bitrate,
content_type: v.content_type,
bitrate: variants.bitrate,
content_type: variants.content_type,
quality,
url: v.url,
url: variants.url,
};

@@ -116,3 +116,3 @@ });

expandedUrl: v.expanded_url,
url,
videos,
};

@@ -119,0 +119,0 @@ }

{
"name": "twitter-downloader",
"version": "1.1.0",
"version": "1.1.1",
"description": "Scraper for download Media from Twitter",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {

@@ -8,0 +7,0 @@ "build": "tsc --build"

@@ -78,2 +78,23 @@ # Twitter Downloader

}
/** Image Media */
{
type: string
image: string
expandedUrl: string
}[]
/** Video Media */
{
type: string
expandedUrl: string
cover: string
duration: string
videos: {
bitrate: number
content_type: string
quality: string
url: string
}[]
}[]
```
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc