tiktok-scraper icon indicating copy to clipboard operation
tiktok-scraper copied to clipboard

Blacklist Users by Username

Open DemonteiroWisc opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. Problem where I download videos from certain users that I do not want.

Describe the solution you'd like When downloading videos from TikTok, be able to block certain users (by username) videos from being downloaded. Essentially a blacklist of usernames. For example, if I were to blacklist @addisonre then none of @addisonre videos would be downloaded when I download videos using the scraper.

DemonteiroWisc avatar Mar 26 '21 19:03 DemonteiroWisc

Wouldn't it make more sense to have this as an input filter on your end of the application? If you're using node.js it would be simple enough to create an array of strings containing your blacklist and then check to make sure incoming requests do not contain a username in that array.

DevDavey avatar Jul 01 '21 19:07 DevDavey

For example, in my case when returning the hashtags from a video I didn't want to return any of the variations on "#foryou, #4u, #foryou" etc so I created a blacklist to filter them out from my array.

example

In your case, the code would be even simpler as you're only checking a single string and not an entire array. You would also run your code before tiktok-scraper is even called and if a match is found return the request with an error code.

DevDavey avatar Jul 01 '21 19:07 DevDavey