98 lines
3.5 KiB
Text
Executable file
98 lines
3.5 KiB
Text
Executable file
|
|
To automate the process of uploading 100 videos to Rumble and dynamically assigning names and tags, you can use a combination of Python and Selenium for web automation. Here's a high-level overview of how you can achieve this:
|
|
|
|
Install Required Libraries:
|
|
Selenium for browser automation.
|
|
pandas for handling video data like names and tags.
|
|
ChromeDriver or any other WebDriver that is compatible with your browser.
|
|
|
|
Prepare Your Data:
|
|
Create a CSV file or a list containing the paths to your videos along with their corresponding names and tags.
|
|
|
|
Write the Automation Script:
|
|
Use Selenium to open the Rumble website, log in, and navigate to the video upload section.
|
|
Loop through your list of videos, uploading each one and filling out the necessary details.
|
|
|
|
Example Script
|
|
|
|
Here is a simplified example using Python and Selenium:
|
|
|
|
python
|
|
|
|
import time
|
|
import pandas as pd
|
|
from selenium import webdriver
|
|
from selenium.webdriver.common.by import By
|
|
from selenium.webdriver.common.keys import Keys
|
|
from selenium.webdriver.support.ui import WebDriverWait
|
|
from selenium.webdriver.support import expected_conditions as EC
|
|
|
|
# Load your video data
|
|
data = pd.read_csv('video_data.csv') # Ensure your CSV has columns: 'path', 'title', 'tags'
|
|
|
|
# Setup Selenium WebDriver
|
|
driver = webdriver.Chrome() # Make sure you have ChromeDriver installed and in your PATH
|
|
driver.get("https://rumble.com")
|
|
|
|
# Log in to Rumble
|
|
username = "your_username"
|
|
password = "your_password"
|
|
|
|
login_button = driver.find_element(By.LINK_TEXT, "Login")
|
|
login_button.click()
|
|
|
|
username_field = WebDriverWait(driver, 10).until(
|
|
EC.presence_of_element_located((By.ID, "username_field"))
|
|
)
|
|
username_field.send_keys(username)
|
|
|
|
password_field = driver.find_element(By.ID, "password_field")
|
|
password_field.send_keys(password)
|
|
password_field.send_keys(Keys.RETURN)
|
|
|
|
# Wait for login to complete
|
|
WebDriverWait(driver, 10).until(
|
|
EC.presence_of_element_located((By.LINK_TEXT, "Upload"))
|
|
)
|
|
|
|
# Loop through videos and upload
|
|
for index, row in data.iterrows():
|
|
driver.get("https://rumble.com/upload")
|
|
|
|
# Wait for the upload page to load
|
|
WebDriverWait(driver, 10).until(
|
|
EC.presence_of_element_located((By.ID, "upload_field"))
|
|
)
|
|
|
|
# Upload video
|
|
upload_field = driver.find_element(By.ID, "upload_field")
|
|
upload_field.send_keys(row['path'])
|
|
|
|
# Enter title
|
|
title_field = driver.find_element(By.ID, "title_field")
|
|
title_field.send_keys(row['title'])
|
|
|
|
# Enter tags
|
|
tags_field = driver.find_element(By.ID, "tags_field")
|
|
tags_field.send_keys(row['tags'])
|
|
|
|
# Submit the form
|
|
submit_button = driver.find_element(By.ID, "submit_button")
|
|
submit_button.click()
|
|
|
|
# Wait for the upload to complete before proceeding
|
|
time.sleep(60) # Adjust sleep time based on average upload duration
|
|
|
|
driver.quit()
|
|
|
|
Additional Considerations
|
|
|
|
Handling CAPTCHA: Automating the login process might involve dealing with CAPTCHA, which can be tricky. You may need to solve it manually or use services that solve CAPTCHA.
|
|
|
|
Error Handling: Implement error handling to manage scenarios where the upload fails or the page doesn't load as expected.
|
|
|
|
Throttling: Be mindful of any upload rate limits Rumble might have. You may need to introduce delays between uploads.
|
|
|
|
Browser Headless Mode: For a more seamless experience, consider running the browser in headless mode, especially if you plan to run this script on a server.
|
|
|
|
Before running the script, ensure you comply with Rumble's terms of service and automation policies.
|