karim0sec / Bulk-Tiktoks-Downloader

Simple Script to bulk download TikTok clips without a watermark, used node js and puppeteer headless browser to titles + append #shorts and save videos
MIT License
80 stars 33 forks source link

Can't pass video description as mp4 title #9

Closed i6c closed 2 years ago

i6c commented 2 years ago

Hi. So I defined the video des variable before the save function but it doesn't save with the video description as the name . Can you help me with this , the var for saving I put is (path+videoDes+'.mp4'); but it only saves as '.mp4' with no title.

dori921 commented 2 years ago

Hey @i6c . Did u solve it ?

karim0sec commented 2 years ago

i just notice that tiktok added description now in profile nice, now it will be saved in names.txt

uses new syntax node allvideosuser url profile link

i6c commented 2 years ago

@Karim-Arab ok, this is tedious on having to manually upload this videos because it is saved in names.txt , i have to manually upload this all and go copy paste from names.txt

karim0sec commented 2 years ago

i can't make it fully automated because youtube must have api key and has limations, you can use zapier or alternatives to automate this task https://prnt.sc/9qcfCfL4j26W

the point of script not only reuse for shorts but also insta&facebook reels and snapchat spotlight

dori921 commented 2 years ago

You don't have to use API for upload, here is a script you can implement on your script. I've tried to do by myself but i don't have the right knowledge.

i6c commented 2 years ago

@Karim-Arab I don't know much of js, mainly Python bro. But maybe we can make read names.txt each line and rename each video file accordingly . And use selenium if there really is no other way

karim0sec commented 2 years ago

@i6c it's tricky because have to strip windows illegal chars from descriptions but here we go

replace for (var i=videoDes.length; i--;) { videoDes[i] = videoDes[i] + ' #shorts' + "\r\n" ;};

with

for (var i = 0; i < videoDes.length; i++) {
videoDes[i] = videoDes[i].replace(/[|&;$%@"{}<>.:'*/()+#!`,]/g, "").substring(0,255)}; videoDes.unshift(0) console.log(videoDes);

delete this

let link = (urls[i]).slice(-19)

instead of this

(path+link+'.mp4')

change to this

(path+videoDes[i].slice(0)+'.mp4')

now you can download it with description file name instead of unique identifier