0
Videos
6
Members
Vlare Card Farming Cooperative
Nonprofits & Activism
2
Topics
Jun 17, 2020
Creation Date
Browser Interactivity Automation | Topics
Wissotsky Wissotsky
Group Admin
Posted Jun 19, 2020
Using software/scripts to automatically control and use websites
Wissotsky Wissotsky
Group Admin
Posted Jun 19, 2020
#This is also a template of sorts on how to keep stuff organized and accessible to newcomers and just general standardization of the group
This is a first basic example of a script(using Selenium) that will: Go to the page for our group > Sign an existing user in using the information provided in the script > Write "Fortnite Ninja" to the first person in chat list.

#####CODE#####
from selenium import webdriver

#Start browser and go to page
browser = webdriver.Firefox()
browser.get('https://vlare.tv/group/2039')

#Info for logging in
email = "email@example.com"
password = "p@ssw0rd"

#Logging in
LoginPageButton = browser.find_element_by_xpath("/html/body/main/header/nav/a[2]")
LoginPageButton.click()

EmailInput = browser.find_element_by_xpath('//*[@id="signin_email"]')
EmailInput.send_keys(email)

PasswordInput = browser.find_element_by_xpath('//*[@id="signin_password"]')
PasswordInput.send_keys(password)

SignInButton = browser.find_element_by_xpath('//*[@id="sign_in_btn"]')
SignInButton.click()

#Send message to first user in list (Must wait for some time because the webpage needs to load in the chat)
browser.implicitly_wait(25)
OpenChat = browser.find_element_by_xpath('/html/body/main/div[2]/div/div[1]')
OpenChat.click()

OpenChatUser = browser.find_element_by_xpath('/html/body/main/div[2]/div/div[2]/div[1]')
OpenChatUser.click()

UserChatBox = browser.find_element_by_xpath('/html/body/main/div[2]/div[2]/div[2]/span/textarea')
UserChatBox.send_keys("Fortnite Ninja")

ChatSubmitButton = browser.find_element_by_xpath('/html/body/main/div[2]/div[2]/div[2]/span/i')
ChatSubmitButton.click()
#####CODE#####
Wissotsky Wissotsky
Group Admin
Posted Jun 20, 2020
An interactive snippet on sending website mail. Must be logged in already (Use beginning of previous template to log in)

#####CODE#####
#send mail to id
userid = input("User id: ")
messageSubject = input("Message Subject: ")
messageContent = input("Message Content: ")

browser.get("https://vlare.tv/inbox/send/1/{}".format(userid))

SubjectBox = browser.find_element_by_xpath('/html/body/main/section/div/div[1]/div[4]/section/form/div[1]/input[1]')
MessageBox = browser.find_element_by_xpath('/html/body/main/section/div/div[1]/div[4]/section/form/div[2]/div/iframe')
SubjectBox.send_keys(messageSubject)
MessageBox.send_keys(messageContent)

SendButton = browser.find_element_by_xpath('/html/body/main/section/div/div[1]/div[4]/section/form/input')
SendButton.click()
#####CODE#####
Wissotsky Wissotsky
Group Admin
Posted Jun 22, 2020
Cooked up a spicy one here.
Receive Vlare notifications on your phone/desktop(or any other device supported by pushbullet)
This script can be done better but i decided to keep it simple(And you are more than welcome to reiterate on it)
Requires pushbullet.py(https://github.com/rbrcsk/pushbullet.py) and of course selenium

Had to put it up on pastebin because of character limit: https://pastebin.com/f8CCgFiF