from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
# Path to the ChromeDriver executable
chrome_driver_path = 'path/to/chromedriver'
# Set Chrome options
chrome_options = Options()
chrome_options.add_argument("--headless") # Run Chrome in headless mode
# Start the WebDriver
driver = webdriver.Chrome(service=Service(chrome_driver_path), options=chrome_options)
# Replace with your PHPBB forum URL
forum_url = "https://f1carreras.net"
# Replace with your forum username and password
username = "Admin"
password = "XXXXXXXXXX"
# Navigate to the login page
driver.get(f"{forum_url}/ucp.php?mode=login")
# Find the username and password input fields, and enter the credentials
username_field = driver.find_element(By.NAME, "username")
username_field.send_keys(username)
password_field = driver.find_element(By.NAME, "password")
password_field.send_keys(password)
# Submit the login form
login_button = driver.find_element(By.NAME, "login[]")
login_button.send_keys(Keys.RETURN)
# Wait for the login process to complete (you may need to adjust the delay if needed)
driver.implicitly_wait(5)
# Check if login was successful
if "You have been successfully logged in" in driver.page_source:
print("Login successful!")
else:
print("Login failed!")
# Close the browser
driver.quit()
Once I run the python script I get this output -->
Any idea of the error message? Would you able to provide your python code for login into the forum? (remove sensitive data) ... Thanks.
!
Message from: Mochomo
NOS MUDAMOS A TRACKER TORRENT -- LEER Y REGISTRO -> AQUI
WE ARE MOVING TO A TORRENT TRACKER -- READ AND SIGN UP -> HERE
Hey… just now seeing this 2nd page. I replied but the site lost it and wanted me to log in again. . Just happens a second time too. Anyway, I’ll send you some code.
Also, I’m guessing you will have or need a file containing the pieces of info needed to make a post…?
Area: practice
Title: topic title
Torrent url:
Magnet url:
Other stuff:
Then code should process this file, log in, make post, etc. I’ll send code tonight!
Hi SennaF1, yes I received it, thanks.
I haven't had some free time to work on the code updates. Most likely this Friday I will be able to work on it. Keep you posted.
!
Message from: Mochomo
NOS MUDAMOS A TRACKER TORRENT -- LEER Y REGISTRO -> AQUI
WE ARE MOVING TO A TORRENT TRACKER -- READ AND SIGN UP -> HERE
Hey SennaF1, sorry for the delay, I was tied with work and family. Using your example I finally made the proper updates to the code, now I'm able to login -- Now I have to work on the code for creating a new topic. I will let you know how it goes on the upcoming days. Thanks again for your help.
!
Message from: Mochomo
NOS MUDAMOS A TRACKER TORRENT -- LEER Y REGISTRO -> AQUI
WE ARE MOVING TO A TORRENT TRACKER -- READ AND SIGN UP -> HERE
Hey.. Did a web search and maybe you should Try 3 tick marks at each end
bbcode = '''HI WORLD'''
OK, So the site actually interpreted my code, hopefully you understand. Just use 3 tick marks instead of 1
Also test using double quotes instead of 3 ticks: "TEST"