Created
July 5, 2019 02:45
-
-
Save shouc/6974896cf648140554cd44af145e8d30 to your computer and use it in GitHub Desktop.
Badoo auto star and social media account extraction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
############################################ | |
USERNAME = "YOUR_USERNAME" | |
PASSWORD = "YOUR_PASSWORD" | |
CHROME_DRIVER = "YOUR_PATH_TO_CHROME_DRIVER" | |
############################################ | |
from selenium.webdriver.common.keys import Keys | |
from selenium import webdriver | |
import time | |
executable_path = CHROME_DRIVER | |
driver = webdriver.Chrome(executable_path=executable_path) | |
driver.get('https://us1.badoo.com/zh-Hant/signin/?f=top') | |
driver.find_element_by_class_name('js-signin-login').send_keys(USERNAME) | |
driver.find_element_by_class_name('js-signin-password').send_keys(PASSWORD) | |
driver.find_element_by_name('post').click() | |
counter = 0 | |
time.sleep(18) | |
while True: | |
try: | |
userDesc = driver.find_element_by_class_name('encounters-card__sidebar-scroll').text | |
for i in ['snap', 'Snap', 'Wechat', 'wechat', 'wx', 'ins', 'INS', 'Ins', 'ig']: | |
if i in userDesc: | |
print("=" * 40) | |
print(userDesc) | |
driver.get_screenshot_as_file('badoo/%s.png' % time.time()) | |
print("=" * 40) | |
driver.find_element_by_class_name('js-profile-header-vote-yes').click() | |
time.sleep(2) | |
counter+=1 | |
if counter > 500: | |
break | |
except Exception as e: | |
print(e) | |
driver.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment