Skip to content

gabbersdev/x-scrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

X

X is a multi-scrapper of the platforms:

  • Twitter / X
  • TikTok

Installing

npm install x-scrapper

Example

Twitter:

const twitter = require("x-scrapper").Twitter
   
twitter.getVideoInfo("https://twitter.com/memesbreakcore/status/1684331516825042944") // returns a Promise
.then((res) => {
   console.log(res) // Video info.
   console.log(res.media.formats[0].url) // Get the video .mp4 url (you can download it.)
})

Tiktok:

const tiktok = require("x-scrapper").Tiktok

tiktok.getVideoInfo("https://www.tiktok.com/@oldtimehawkey/video/7259942195296210218") // returns a Promise
.then((res) => {
	console.log(res) // Video info.
	res.downloadVideo() // Return the tiktok video without watermark as a buffer. (You can't get the direct .mp4 url, you need to download it.)
	.then((buffer) => {
		console.log(buffer)
	})
})

About

Twitter and TikTok info scrapper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published