Skip to content

Instantly share code, notes, and snippets.

@dev4Fun
Created September 10, 2020 03:22
Show Gist options
  • Select an option

  • Save dev4Fun/ec60c534a252e7331376afbdd16d4218 to your computer and use it in GitHub Desktop.

Select an option

Save dev4Fun/ec60c534a252e7331376afbdd16d4218 to your computer and use it in GitHub Desktop.
from selenium.webdriver.remote.webdriver import WebDriver
class AutoLikeBot:
def __init__(self, driver: WebDriver, post_filter, running_strategy):
self.driver = driver
self.post_filter = post_filter
self.running_strategy = running_strategy
def like_from_explore(self):
# like posts from explore using filter and strategy
pass
def log_in(self):
pass
def fetch_posts_from_explore(self, max_id=0):
pass
def like_post(self, post):
pass
def load_pre_from_url(self, url):
# helper to load response from the page
pass
# we will be opening tabs quite often so following methods will be used a lot
def open_and_switch_to_tab(self, url):
pass
def close_and_open_tab(self, tab_index=0):
pass
def wait_until(self, condition, timeout=5):
# helper to wait for element appearance
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment