- Joined
- Feb 11, 2019
- Messages
- 1
- Reaction score
- 1
This script is based off this YouTube Search thread originally posted here https://forum.9hits.com/viewtopic.php?f=8&t=76&p=374&hilit=youtube#p374
With some tweaks, applying the macro script will give a more humanizing feel to it. Below is a description of what it does:
▌Wait for page to load (15 seconds)
▌Click play (plays from beginning of video)
▌Waits a few seconds
▌Automatically jumps to bottom of page
▌Clicks "Show More" (loads similar videos)
▌Scrolls down 7 times (simulates natural mouse scroll)
▌Jumps back to top to finish watching the video
just copy and paste this into the "Macro" section. If you want to add some more organic referrer links, please refer to the original post in the link above.
►ENJOY◄
//Wait for page load
await Delay(7000);
while(await IsLoading()) await Delay(1000);
ClickById("ytd-player");
await Delay(5000);
SendMouseWheel(0, -10000);
await Delay(3000);
await Delay(2000);
ClickById("continuations")
await Delay(2000);
//check for our target if found or not. I would like to click to any video has title contain motivation
var myTarget = GenerateXpath("a", "text", "%motivation");
var found = false;
var pageCount = 0;
while(!found)
{
found = await GetAttribute(myTarget, "href");
//if found the target, do click it
if(found){
ClickByXpath(motivation);
await Delay(5000); //wait for the video load
//click to the time playing process
await Delay(Random(5000, 10000));
ClickByClass("ytp-load-progress");
// do more interaction....
//.....
//----------
break;
}
//if not found, scroll up to laod more result, and check again
SendMouseWheel(5000, -300);
await Delay(800);
//suppose we only scroll down for 5 times.
if(pageCount >5) break;
pageCount++;
}
//if not found, scroll up to laod more result, and check again
SendMouseWheel(-5000, 300);
await Delay(800);
//suppose we only scroll down for 5 times.
if(pageCount <10)
pageCount--;
ScrollTo(0, 0)
With some tweaks, applying the macro script will give a more humanizing feel to it. Below is a description of what it does:
▌Wait for page to load (15 seconds)
▌Click play (plays from beginning of video)
▌Waits a few seconds
▌Automatically jumps to bottom of page
▌Clicks "Show More" (loads similar videos)
▌Scrolls down 7 times (simulates natural mouse scroll)
▌Jumps back to top to finish watching the video
just copy and paste this into the "Macro" section. If you want to add some more organic referrer links, please refer to the original post in the link above.
►ENJOY◄
//Wait for page load
await Delay(7000);
while(await IsLoading()) await Delay(1000);
ClickById("ytd-player");
await Delay(5000);
SendMouseWheel(0, -10000);
await Delay(3000);
await Delay(2000);
ClickById("continuations")
await Delay(2000);
//check for our target if found or not. I would like to click to any video has title contain motivation
var myTarget = GenerateXpath("a", "text", "%motivation");
var found = false;
var pageCount = 0;
while(!found)
{
found = await GetAttribute(myTarget, "href");
//if found the target, do click it
if(found){
ClickByXpath(motivation);
await Delay(5000); //wait for the video load
//click to the time playing process
await Delay(Random(5000, 10000));
ClickByClass("ytp-load-progress");
// do more interaction....
//.....
//----------
break;
}
//if not found, scroll up to laod more result, and check again
SendMouseWheel(5000, -300);
await Delay(800);
//suppose we only scroll down for 5 times.
if(pageCount >5) break;
pageCount++;
}
//if not found, scroll up to laod more result, and check again
SendMouseWheel(-5000, 300);
await Delay(800);
//suppose we only scroll down for 5 times.
if(pageCount <10)
pageCount--;
ScrollTo(0, 0)