Multi/Others - YouTube auto subscribe and like | Tools | Crax

Welcome To Crax.Pro Forum!

Check our new Marketplace at Crax.Shop

   Login! SignUp Now!
  • We are in solidarity with our brothers and sisters in Palestine. Free Palestine. To learn more visit this Page

  • Crax.Pro domain has been taken down!

    Alternatives: Craxpro.io | Craxpro.com

Multi/Others YouTube auto subscribe and like

Multi/Others YouTube auto subscribe and like

LV
0
 

Sihara

Member
Joined
Oct 25, 2023
Threads
6
Likes
3
Credits
364ยฉ
Cash
0$
Screenshot 2023 10 25 20 19 54 979 comgoogleandroidyoutube

Download:

PHP:
<?php

use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\WebDriverBy;
use Facebook\WebDriver\WebDriverExpectedCondition;
use Facebook\WebDriver\WebDriverWait;

require_once('vendor/autoload.php'); // Make sure to include your Selenium PHP bindings

$email = 'darshu@gmail.com';  // enter your email
$password = 'dash123';  // enter your password

$options = [
    'args' => ['--headless', '--disable-gpu', '--window-size=1920x1080']
];

$driver = RemoteWebDriver::create('http://localhost:4444/wd/hub', \Facebook\WebDriver\Remote\DesiredCapabilities::chrome(), 5000, 10000, null, null, $options);

$wait = new WebDriverWait($driver, 20);
$url = 'https://accounts.google.com/AddSession?continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Den-GB%26next%3D%252F&hl=en-GB&passive=false&service=youtube&uilel=0';
$driver->get($url);

$wait->until(WebDriverExpectedCondition::visibilityOfElementLocated(WebDriverBy::name('identifier')))->sendKeys($email);
$wait->until(WebDriverExpectedCondition::visibilityOfElementLocated(WebDriverBy::name('Passwd')))->sendKeys($password);
sleep(3);

$url = 'https://youtu.be/9VpeTiz81gc'; // replace with your required URL to auto like the video
$driver->get($url);
$driver->findElement(WebDriverBy::cssSelector('#movie_player > div.ytp-chrome-bottom > div.ytp-chrome-controls > div.ytp-left-controls > button'))->click();
sleep(1);
$driver->findElement(WebDriverBy::xpath('/html/body/ytd-app/div[1]/ytd-page-manager/ytd-watch-flexy/div[5]/div[1]/div/div[2]/ytd-watch-metadata/div/div[2]/div[2]/div/div/ytd-menu-renderer/div[1]/ytd-segmented-like-dislike-button-renderer/div[1]/ytd-toggle-button-renderer/yt-button-shape/button/yt-touch-feedback-shape/div/div[2]'))->click();
sleep(4);

// The below code auto-subs after hitting the like
$driver->findElement(WebDriverBy::xpath('/html/body/ytd-app/div[1]/ytd-page-manager/ytd-watch-flexy/div[5]/div[1]/div/div[2]/ytd-watch-metadata/div/div[2]/div[1]/div/ytd-subscribe-button-renderer/yt-button-shape/button/yt-touch-feedback-shape/div/div[2]'))->click();
sleep(3);

// The below code opens the community tab of the channel and hits like for the first post
$driver->findElement(WebDriverBy::xpath('/html/body/ytd-app/div[1]/ytd-page-manager/ytd-watch-flexy/div[5]/div[1]/div/div[2]/ytd-watch-metadata/div/div[2]/div[2]/div/div/ytd-menu-renderer/div[1]/ytd-segmented-like-dislike-button-renderer/div[1]/ytd-toggle-button-renderer/yt-button-shape/button/yt-touch-feedback-shape/div/div[2]'))->click();
sleep(4);

$driver->quit();

?>
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Top Bottom