此脚本为 python 脚本,实现原理为利用 selenium 定位相关元素,再配合点击事件完成浏览器的自动化.

Overview

Introduce

此脚本为 python 脚本,实现原理为利用 selenium 定位相关元素,再配合点击事件完成浏览器的自动化.

本打卡脚本适用于利用青柠疫服-高校疫情防空平台 https://wxyqfk.zhxy.net/#/poster 的每日疫情打卡


Usage

Download

可以利用 git 将此仓库下载到本地

git clone https://github.com/N0el4kLs/yqfkAutoCheck.git

Pre-use

安装脚本相关依赖

pip install -r requirements.txt
#pip3 install -r requirements.txt

info.ini Setting

用户需要在使用前先完善 info.ini 文件.

设置学校代码

选择自己的学校,点击确认

urlyxdm=xxxx 中的 xxxx 为学校代码 示例中的学院代码为 10646

完善配置文件中的[Url]部分

[Url]
loginpage = https://wxyqfk.zhxy.net/?yxdm=10646#/login

打卡用户信息设置

配置示例:

[PeopleList]
people = example 
// 这里填写用户表示,以此来查找用户的 LoginId SchoolCard 以及 PassWd
// 如果有多个用户,用户与用户之间用逗号隔开: people = example1,example2,example3

[LoginId]
example = 测试


[SchoolCard]
example = 123456789

[PassWd]
examole = 123456admin

Code Supplement

验证码

由于本人在实现识别图片验证码功能时是调用了别人的接口,所以此处代码需要用户自己填充.

填充代码解构: 输入:图片的路径的, 返回值: 为验证码.

需要修改的代码在QNcheck.py109-116

def getveriycode(self,imagedata):
        '''
        还原base64 图片信息,并获取图片验证码
        '''
        self.decodeImag(imagedata)
        
        # img_path = ./verifycode.png
        return USEROWNFUNC(r'./verifycode.png')  # 替换USEROWNFUNCTION(r'./verifycode.png') 为用户填充代码

邮件功能

本脚本提供了邮件发送功能,以提醒用户今日的打卡情况 此处使用的qq邮箱,所以需要用户填充相关信息 需要填充的代码位于 e_mail.py7-8

self.__my_sender =''   #发件人邮箱账号
self.__my_pass = ''    #发件人邮箱密码

QNcheck.py140中填入接受邮件的邮箱.

login_email = LoginEmail('user email') # 将 user eamil 更改为 接受邮件的邮箱

定位功能

QNcheck.py16-17行完善经纬度信息.

self.latitude = xxx    // 纬度
self.longitude = xxx  // 经度

RUN

运行脚本

python QNcheck.py
#python3 QNcheck.py
You might also like...
Parse feeds in Python

feedparser - Parse Atom and RSS feeds in Python. Copyright 2010-2020 Kurt McKee [email protected] Copyright 2002-2008 Mark Pilgrim feedparser

News, full-text, and article metadata extraction in Python 3. Advanced docs:

Newspaper3k: Article scraping & curation Inspired by requests for its simplicity and powered by lxml for its speed: "Newspaper is an amazing python li

Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization.
Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization.

Pattern Pattern is a web mining module for Python. It has tools for: Data Mining: web services (Google, Twitter, Wikipedia), web crawler, HTML DOM par

A Python module to bypass Cloudflare's anti-bot page.

cloudscraper A simple Python module to bypass Cloudflare's anti-bot page (also known as "I'm Under Attack Mode", or IUAM), implemented with Requests.

A Smart, Automatic, Fast and Lightweight Web Scraper for Python
A Smart, Automatic, Fast and Lightweight Web Scraper for Python

AutoScraper: A Smart, Automatic, Fast and Lightweight Web Scraper for Python This project is made for automatic web scraping to make scraping easy. It

Async Python 3.6+ web scraping micro-framework based on asyncio
Async Python 3.6+ web scraping micro-framework based on asyncio

Ruia 🕸️ Async Python 3.6+ web scraping micro-framework based on asyncio. ⚡ Write less, run faster. Overview Ruia is an async web scraping micro-frame

Transistor, a Python web scraping framework for intelligent use cases.
Transistor, a Python web scraping framework for intelligent use cases.

Web data collection and storage for intelligent use cases. transistor About The web is full of data. Transistor is a web scraping framework for collec

Html Content / Article Extractor, web scrapping lib in Python

Python-Goose - Article Extractor Intro Goose was originally an article extractor written in Java that has most recently (Aug2011) been converted to a

A pure-python HTML screen-scraping library

Scrapely Scrapely is a library for extracting structured data from HTML pages. Given some example web pages and the data to be extracted, scrapely con

Owner
N0el4kLs
Just a Web Security Fresher
N0el4kLs
Using Selenium with Python to Web Scrap Popular Youtube Tech Channels.

Web Scrapping Popular Youtube Tech Channels with Selenium Data Mining, Data Wrangling, and Exploratory Data Analysis About the Data Web scrapi

David Rusho 0 Aug 18, 2021
Here I provide the source code for doing web scraping using the python library, it is Selenium.

Here I provide the source code for doing web scraping using the python library, it is Selenium.

M Khaidar 1 Nov 13, 2021
Web Scraping images using Selenium and Python

Web Scraping images using Selenium and Python A propos de ce document This is a markdown document about Web scraping images and videos using Selenium

Nafaa BOUGRAINE 3 Jul 1, 2022
Web-Scraping using Selenium Master

Web-Scraping using Selenium What is the need of Selenium? Some websites don't like to be scrapped and in that case you need to disguise your webscrapi

Md Rashidul Islam 1 Oct 26, 2021
Facebook Group Scraping Using Beautiful Soup & Selenium

Extract Facebook group posts that are related to a specific topic and write them to a .json file.

Fatima Ghadieh 14 Aug 12, 2022
Google Maps crawler using Selenium

Google Maps Crawler using Selenium Built as part of the Antifragile Dev Project Selenium crawler that browses Google Maps as a regular user and stores

Guilherme Latrova 46 Dec 16, 2022
A Python library for automating interaction with websites.

Home page https://mechanicalsoup.readthedocs.io/ Overview A Python library for automating interaction with websites. MechanicalSoup automatically stor

null 4.3k Jan 7, 2023
A Powerful Spider(Web Crawler) System in Python.

pyspider A Powerful Spider(Web Crawler) System in Python. Write script in Python Powerful WebUI with script editor, task monitor, project manager and

Roy Binux 15.7k Jan 4, 2023
Using Python and Pushshift.io to Track stocks on the WallStreetBets subreddit

wallstreetbets-tracker Using Python and Pushshift.io to Track stocks on the WallStreetBets subreddit.

null 91 Dec 8, 2022
Scrapy, a fast high-level web crawling & scraping framework for Python.

Scrapy Overview Scrapy is a fast high-level web crawling and web scraping framework, used to crawl websites and extract structured data from their pag

Scrapy project 45.5k Jan 7, 2023