玩古网,有垃圾发钓鱼网站,搞一搞学一学
用的selenium抓页面元素,填入随机qq账号,随机字符密码,塞点假数据
# coding: utf-8 from selenium import webdriver from time import sleep from os.path import join import random import requests class A(object): def open(self): self.get("http://gujian7.com/") print("进入傻屌鱼网站") # print(self.page_source) sleep(2) def denglu(self): print("正在输入用户名密码") browser.find_element_by_name("u").clear() browser.find_element_by_name("u").send_keys("".join(random.sample('1234567890', 9)) + "@qq.com") browser.find_element_by_name("p").clear() browser.find_element_by_name("p").send_keys("".join(random.sample('1234567890abcdefghijklmnopqrstuvwxyz', random.randint(6, 22)))) browser.find_element_by_id("loginbtn").click() sleep(2) print("登录成功") browser = webdriver.Chrome() a = A print("正在打开浏览器") while True: a.open(browser) a.denglu(browser)