Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!

cracked.io | Best Forum Around | Free Premium Accounts




 25775

BandLab 'Infinite Plays' Bot [Selenium SourceCode Java]

by Stranger9000 - 09 June, 2020 - 06:21 PM
This post is by a banned member (Stranger9000) - Unhide
78
Posts
8
Threads
4 Years of service
#1
(This post was last modified: 09 June, 2020 - 06:25 PM by Stranger9000.)
The bot will open the browser, look for the track & play it for 2 seconds, close the browser and restart the process.  To quit the process simply hit the red x at the upper right corner of the browser before it re-runs the program.  This will error out the code and bring the bot to a complete halt.  The rate of plays is roughly 800 plays per hour.  You don't have to play the track for 2 seconds before closing; it should be recorded as a play instantly.

Be sure to modify the driver path to your current WebDriver folder (if you're not using Maven) and don't forget to route the URL directly to your song of choice.
Code:
package bandLabBot;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

public class testBot {
    static WebDriver driver;
    
    public void launchBrowser() {
        System.setProperty("webdriver.gecko.driver", "C:\\WebDriverPath\\YourWebDriver.exe");
        driver = new FirefoxDriver();
        driver.get("https://www.bandlab.com/YOUR-SONG-HERE");
            
        }

    public static void main(String[] args) throws InterruptedException {
        testBot obj = new testBot();
        int x = 1;
        
        while(x<2) {
            obj.launchBrowser();
            WebDriverWait wait = new WebDriverWait(driver, 10);
            WebElement clickPlay = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("/html/body/main/div/div[1]/div[3]/div/revision-tile/header/div[1]/div[1]")));
            clickPlay.isDisplayed();
            clickPlay.click();
            Thread.sleep(2000);
            driver.close();
            
        }
        
    }

}
-------------------------------------

Please leave a like and rep+ and be sure to leave comments, I like reading those.
This post is by a banned member (darkforce123321) - Unhide
22
Posts
0
Threads
4 Years of service
#2
(This post was last modified: 10 June, 2020 - 10:55 AM by darkforce123321.)
Nice :)
I have a few annotations. The "integer checks" in the loop head do nothing, the condition is always true.
You could also write
Code:
while(true) {...}
in this case.

It is just a suggestion but you could avoid the "closing error" by catching the interruption exception instead of throwing it.
Code:
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
                System.out.println("Browser was closed / Tool was interrupted.");
                //e.printStackTrace();
                interrupted = true;
            } finally {
                //Close driver here, if you want.
                driver.close();
            }

To interrupt the complete tool by clicking the "x", interrupt the loop.
Code:
        boolean isInterrupted = false;
        while(x<2 && !isInterrupted) {...}

The "clickPlay.isDisplayed();" does nothing in this case. The explcit wait part
Code:
wait.until
 is only passed, if the time is over or the element is found so you need to assign it and/or put it into a if/else if you want to check if the element is there before clicking.
Code:
            boolean isDisplayed = clickPlay.isDisplayed();
            if(isDisplayed) {
                clickPlay.click();
            }

Greets, df.
This post is by a banned member (Stranger9000) - Unhide
78
Posts
8
Threads
4 Years of service
#3
(10 June, 2020 - 10:32 AM)darkforce123321 Wrote: Show More
Nice :)
I have a few annotations. The "integer checks" in the loop head do nothing, the condition is always true.
You could also write
Code:
while(true) {...}
in this case.

It is just a suggestion but you could avoid the "closing error" by catching the interruption exception instead of throwing it.
Code:
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
                System.out.println("Browser was closed / Tool was interrupted.");
                //e.printStackTrace();
                interrupted = true;
            } finally {
                //Close driver here, if you want.
                driver.close();
            }

To interrupt the complete tool by clicking the "x", interrupt the loop.
Code:
        boolean isInterrupted = false;
        while(x<2 && !isInterrupted) {...}

The "clickPlay.isDisplayed();" does nothing in this case. The explcit wait part
Code:
wait.until
 is only passed, if the time is over or the element is found so you need to assign it and/or put it into a if/else if you want to check if the element is there before clicking.
Code:
            boolean isDisplayed = clickPlay.isDisplayed();
            if(isDisplayed) {
                clickPlay.click();
            }

Greets, df.

Thanks for the Like DF and as always thanks for the tip!  I'm a little brain-drained atm but curious enough to do some rewriting right now.  My previous code had noticeably slowed down my computer to the point i had to give it a quick restart (probably to clear cache or something) haha.  If i get this correct, your code might help stop the program from running in the background.  I'll throw an update later to fix the OP.

kek kek kek
This post is by a banned member (DavidEloko) - Unhide
3
Posts
0
Threads
1 Year of service
#4
how i can installed the bots on bandlab please
  1. and what kind of application i can use to run this bot
This post is by a banned member (Stranger9000) - Unhide
78
Posts
8
Threads
4 Years of service
#5
(10 May, 2022 - 05:48 PM)DavidEloko Wrote: Show More
how i can installed the bots on bandlab please
  1. and what kind of application i can use to run this bot

Learn tutorial for setting up Selenium Automation then copy/paste code then modify code a bit then hit 'run'
This post is by a banned member (DavidEloko) - Unhide
3
Posts
0
Threads
1 Year of service
#6
(10 May, 2022 - 08:36 PM)Stranger9000 Wrote: Show More
(10 May, 2022 - 05:48 PM)DavidEloko Wrote: Show More
How I can get a bots of bandlab followers please
  • I can get your whatsapp number or Instagram account?
  • sir can you help me plz

Learn tutorial for setting up Selenium Automation then copy/paste code then modify code a bit then hit 'run'
This post is by a banned member (DavidEloko) - Unhide
3
Posts
0
Threads
1 Year of service
#7
bro your code doesn't work
  • I get error on java eclipse can you post the full script here please
This post is by a banned member (hasi912) - Unhide

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)