Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

twitter-puppeteer

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitter-puppeteer - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

58

index.js
#!/usr/bin/env node
const yargs = require("yargs");
const user = require('./user');
const search = require('./search');
const user = require("./user");
const search = require("./search");
!(async() => {
const command_type = process.argv[2];
const command_args = process.argv[3];
switch (command_type) {
case 'profile':
const profile = await user.getProfile(command_args);
console.log(profile);
break
case 'timeline':
const timeline = await user.getTimeline(command_args);
console.log(timeline);
break;
case 'search':
const searchResult = await search.getSearchResult(command_args);
console.log(searchResult);
break;
default:
break;
}
})();
yargs
.scriptName("twitter-puppeteer")
.usage("$0 <cmd> [args]")
.command(
"profile [USER NAME]",
"Download Profile",
(yargs) => {},
async (argv) => {
const { username } = argv;
const profile = await user.getProfile(username);
console.log(JSON.stringify(profile));
}
)
.command(
"timeline [USER NAME]",
"Download Timeline",
(yargs) => {},
async (argv) => {
const { username } = argv;
const timeline = await user.getTimeline(username);
console.log(JSON.stringify(timeline));
}
)
.command(
"search [QUERY]",
"Search Twitter",
(yargs) => {},
async (argv) => {
const { query } = argv;
const searchResult = await search.getSearchResult(query);
console.log(JSON.stringify(searchResult));
}
).argv;
{
"name": "twitter-puppeteer",
"version": "0.0.5",
"version": "0.0.6",
"description": "download all twitter data by scraping without api token using puppeteer.",

@@ -28,3 +28,4 @@ "main": "index.js",

"request": "^2.88.2",
"request-promise": "^4.2.6"
"request-promise": "^4.2.6",
"yargs": "^15.4.1"
},

@@ -31,0 +32,0 @@ "devDependencies": {

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