def test_add_new_contact(self): account_type = 'mcp' account_option = 'address' load_page(self) login(self, account_type) my_account(self, account_option) add_new_contacts(self)
def registration(): if current_user.is_authenticated: return redirect("/user") form = RegisterForm() if form.validate_on_submit(): db_sess = db_session.create_session() count = len( list(db_sess.query(User).filter(User.email == form.email.data))) db_sess.close() reg(form) login(form.email.data, form.password.data) return redirect('/') return render_template('registration.html', form=form)
def authorization(): if current_user.is_authenticated: return redirect("/user") form = LoginForm() if request.method == "GET": return render_template('authorization.html', form=form) if request.method == "POST": if login(form.email.data, form.password.data) is True: return redirect("/") if login(form.email.data, form.password.data) == "BAN": return render_template('authorization.html', form=form, flag_ban=True) return render_template('authorization.html', form=form, flag=True)
def iterate_and_spam(start_at): total_blocks = (row_count_deduplicated() / 15) + 1 block = 0 while block < total_blocks: try: driver.close() except: pass driver = login.login(EMAILS[block], PASSWORD) spam.spam(driver, DELAY, start_at) block = block + 1 start_at = block*15
options = webdriver.ChromeOptions() options.add_experimental_option('prefs', {'intl.accept_languages': 'en,en_US'}) driver = webdriver.Chrome(chromeDriver, chrome_options=options) time.sleep(1) # Settings comments = [ 'Nice shot!', 'I love your profile!', 'Your feed is an inspiration', 'Just incredible', 'What camera did you use?', 'Love your posts!', 'Looks awesome)', 'Getting inspired by you..', 'Yes!', 'I can feel your passion...' ] # Find from modules import find_from_commentators, like, comment, watch_stories, login login.login(driver, USERNAME, PASSWORD) # find_by_hashtag.find(driver, ['city', 'nature'], 5) # find_from_subs.find(driver, ['bosslogic'], 5) # find_from_subsribed.find(driver, ['bosslogic'], 5) # find_from_likers.find(driver, 'posts', [["ByYPVnZgH7F"]], 5) # find_from_likers.find(driver, 'accs', [['bosslogic', '19tones', # 'buzova86', 'tommy.vision', # 'mikaberra', 'bemorephotos', # 'eduard_ov', 'fursty', # 'josselin', 'five__photo'], 5], 5) # find_from_commentators.find(driver, 'posts', [['Byd_CaXAMtF']], 5) find_from_commentators.find(driver, 'accs', [[ 'kai.boet', '_photobylotte', 'sordiya_n', 'paramonovaalina', 'jon.snip', 'mattmarcheski', 'piar_perm_', 'perm_one_love', 'perm_onlive', 'natakeell', 'aksy_jaxy', 'aksy_jaxy', 'dimos_b', 'dhisvn', 'jocelynkristanto' ], 5], 5)
#!/usr/bin/env python # -*- coding:utf-8 -*- # Auther: pangguoping import os,sys BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) #day5-homework目录 #print(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # 添加环境变量 sys.path.append(BASE_DIR) from modules.login import login if __name__ == '__main__': login()
import aiohttp import asyncio import os import shutil import sys import time import imageio import zipfile from modules import login from modules import update from modules import rank update.update() login_session = login.login() if sys.platform == 'win32': loop = asyncio.ProactorEventLoop() asyncio.set_event_loop(loop) dir = os.path.join('.', 'pixiv', '') tempdir = os.path.join('.', 'temp') adult = '0' cookies = {} headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36', 'Referer': 'https://www.pixiv.net/' } ImgID = [] ImgID2 = [] ImgUrl = []
import webbrowser import json import os from modules.creds import getCreds from modules.login import login from modules.get_users import getUsers if __name__ == '__main__': credentials = getCreds() options = webdriver.ChromeOptions() options.add_argument('headless') driver = webdriver.Chrome(options=options) login(driver, credentials) credentials['username'] = driver.find_element_by_xpath( '//*[@id="react-root"]/section/nav/div[2]/div/div/div[3]/div/div[5]/span/img' ).get_attribute('alt').split("'")[0] driver.get('https://www.instagram.com/' + credentials['username']) followers, varId = getUsers(driver, 'followers') following, _ = getUsers(driver, 'following', varId) infoDict = {} for person in followers + following: infoDict[person[0]] = person[1:] followers = [f[0] for f in followers]
import os import json import vk_api import requests from modules.start import start from modules.login import login from modules.prim_generate import prim_generate from modules.get_msg import get_msg from modules.mythread import MyThread from collections import deque if __name__ == '__main__': th = [] work = [] vk = start(vk_api, json) key, server, ts = login(vk) primery = prim_generate(json) users = {} try: with open('users.json', 'r') as f: scored = json.load(f) except: scored = dict() cpu = os.cpu_count() print("Укажите количество потоков для работы программы(по умолчанию:{})". format(cpu)) print('---' * 20) i = input() if (i != ""): cpu = int(i) print('---' * 20)