The new year has begun again , Spring Festival also began one after another , But this year is still a special case , I hope you will be safe when you go home , Wash hands frequently , Put on the mask , People in high-risk areas can not go home for the Spring Festival , For the safety of family and friends .
Railway 12306 Ticket grabbing code :
# -*- coding=utf-8 -*- import argparse import sys def parser_arguments(argv):
""" It shouldn't be defined here , Put it here first :param argv: :return: """ parser = argparse.ArgumentParser()
parser.add_argument("operate", type=str, help="r: Running the ticket grabbing program , c: filter cdn, t:
Test email and server sauce ,server We need to turn on the switch ") return parser.parse_args(argv) if __name__ ==
'__main__': args = parser_arguments(sys.argv[1:]) if args.operate == "r": from
init import select_ticket_info elif
args.operate == "t": from config.emailConf import sendEmail from
config.serverchanConf import sendServerChan sendEmail(u" Booking assistant test it ")
sendServerChan(" Booking assistant test it ") elif args.operate == "c": from agency.cdn_utils
import filterCdn filterCdn()