Closed dori921 closed 2 years ago
Any update ?
Sorry, I was busy, yeah Updated even after TikTok new implemented bot detection captcha it stops the script at the first page but gladly after it gets URLs, change @willsmith to user-id and it will work like charm
thank you
Sorry, I was busy, yeah Updated even after TikTok new implemented bot detection captcha it stops the script at the first page but gladly after it gets URLs, change @Willsmith to user-id and it will work like charm
Hi! After change to user-id it still download another videos that not video from our user that we specific. If I want to download videos from a user profile only is it can or not?
if you visit a profile it only shows videos and views without a description that's why I kept it get user videos from search results with a description maybe not so accurate result
if u want only videos of that user without description u can change
https://www.tiktok.com/@willsmith
instead of https://www.tiktok.com/search/video?q=@willsmith
and
div.jsx-1906445185.video-feed.compact > div > div > div > div > a
instead of
div.tiktok-bbkab3-DivContainer > div > div > a
and delete
for (var i=0;i<2;i++){ //Loop 2 pages
await page.waitForSelector('button[data-e2e=search-load-more]');
await page.keyboard.press('PageDown');
await page.waitForTimeout('300');
await page.keyboard.press('PageDown');
await page.waitForTimeout('300');
await page.keyboard.press('PageDown');
await page.waitForTimeout('300');
await page.keyboard.press('PageDown');
await page.click('button[data-e2e=search-load-more]')
}
without a description
That work. Thank.
if you visit a profile it only shows videos and views without a description that's why I kept it get user videos from search results with a description maybe not so accurate result
if u want only videos of that user without description u can change
https://www.tiktok.com/@willsmith
instead ofhttps://www.tiktok.com/search/video?q=@willsmith
and
div.jsx-1906445185.video-feed.compact > div > div > div > div > a
instead of
div.tiktok-bbkab3-DivContainer > div > div > a
and delete
for (var i=0;i<2;i++){ //Loop 2 pages await page.waitForSelector('button[data-e2e=search-load-more]'); await page.keyboard.press('PageDown'); await page.waitForTimeout('300'); await page.keyboard.press('PageDown'); await page.waitForTimeout('300'); await page.keyboard.press('PageDown'); await page.waitForTimeout('300'); await page.keyboard.press('PageDown'); await page.click('button[data-e2e=search-load-more]') }
Hi! I have encountered​ another issues. When I do that I can download only 6 videos from a profile. What wrong in the script? Thanks for your time.
I write a new script to download all videos of a single profile but it requires plugins to avoid bot detection of TikTok on this link
https://github.com/Karim-Arab/Tiktok2Youtube-shorts/blob/main/allvideosuser.js
in project location in cmd or terminal :
npm install puppeteer puppeteer-extra
npm install puppeteer-extra-plugin-stealth puppeteer-extra-plugin-adblocker
after editing the profile URL, now use:
node allvideosuser
Goodluck :)
I write a new script to download all videos of a single profile but it requires plugins to avoid bot detection of TikTok on this link
https://github.com/Karim-Arab/Tiktok2Youtube-shorts/blob/main/allvideosuser.js
in project location in cmd or terminal :
- npm install puppeteer puppeteer-extra
- npm install puppeteer-extra-plugin-stealth puppeteer-extra-plugin-adblocker
after editing the profile URL, now use:
node allvideosuser
Goodluck :)
Thanks for your time.
I write a new script to download all videos of a single profile but it requires plugins to avoid bot detection of TikTok on this link
https://github.com/Karim-Arab/Tiktok2Youtube-shorts/blob/main/allvideosuser.js
in project location in cmd or terminal :
- npm install puppeteer puppeteer-extra
- npm install puppeteer-extra-plugin-stealth puppeteer-extra-plugin-adblocker
after editing the profile URL, now use:
node allvideosuser
Goodluck :)
Hi! I have test your new allvideosuser.js I have download videos from a tiktok profile that have video maybe 138 But I get only 61 videos that have done for downloaded. What wrong? Thanks again.
This my output error message:
Done
c:\Users\XXXX\node_modules\puppeteer-core\lib\cjs\puppeteer\common\DOMWorld.js:517
const timeoutError = new Errors_js_1.TimeoutError(waiting for ${options.title} failed: timeout ${options.timeout}ms exceeded
);
^
TimeoutError: waiting for XPath //*[@id="download-block"]/div/a[1]
failed: timeout 30000ms exceeded
at new WaitTask (c:\Users\XXXX\node_modules\puppeteer-core\lib\cjs\puppeteer\common\DOMWorld.js:517:34)
at DOMWorld.waitForXPath (c:\Users\XXXX\node_modules\puppeteer-core\lib\cjs\puppeteer\common\DOMWorld.js:453:26)
at Frame.waitForXPath (c:\Users\XXXX\node_modules\puppeteer-core\lib\cjs\puppeteer\common\FrameManager.js:948:51)
at Page.waitForXPath (c:\Users\XXXX\node_modules\puppeteer-core\lib\cjs\puppeteer\common\Page.js:2410:33)
at main (c:\Users\XXXX\allvideosuser.js:51:16)
PS C:\Users\XXXX>
seems snaptik breaks I update the code with randomize waiting for values and slow it a bit, i can't test due to limited internet where I am it but I am sure it would work fine
seems snaptik breaks I update the code with randomize waiting for values and slow it a bit, i can't test due to limited internet where I am it but I am sure it would work fine
It work. Thanks.
Hey, can u make it download the videos from a specific user ? Thanks