import requests from bs4 import BeautifulSoup from selenium import webdriver import time import os from datetime import datetime import csv from selenium.webdriver.common.keys import Keys import random from selenium.webdriver import ActionChains import datetime from selenium.webdriver.support.wait import WebDriverWait import json import hashlib import base64 import hmac from urllib.parse import quote_plus import socket import http.server import socketserver PORT = 8001 ''' 更新记录:在1.1基础上新增利润和利润率过滤,符合要求的且没货的,且没加入书单的,点击加入书单 ''' #服务器地址 send_data = '192.144.138.159' #发送数据ip img_port = 'http://192.144.138.159:8001/' #监听标志数据 msg_data = '11111111' #dingding_secret = 'SECddf0771b94ecaf9d5c0e8f9d633a60191e9086600efd906111e747253ad3fa0e' #dingding_url = 'https://oapi.dingtalk.com/robot/send?access_token=2d80410f60ba98bebf0e3837ceeb61ba1d7f2d9478e61831f3c6860c64f164de' #dingding_url = 'https://oapi.dingtalk.com/robot/send?access_token=0360861418cad3cbeb4e7893082fae4846670ba5069ae04f508f39afccdc853f' #dingding_secret = 'SEC37646b8ed66773dc82805bad7729007e7c5201f10a7b114c5c23afd5c71142a9' dingding_url = 'https://oapi.dingtalk.com/robot/send?access_token=625d06b35b4c6466373882f785fe3d173a3bd5775174651f0af134fc6d467058' dingding_secret = 'SECc88e8dfd12589d4ec03054e84058262f07198595a2c10b9abc7503220fbdd251' quchong_url = "http://125.94.215.54:5555/receive_data" ''' 8-29 目前会存在的问题: 1.下单瞬间失败,还是发送消息了 2.提高下单速度 3.没下单的书自动删除 ''' xiadan_data = [] erweima = '' xiadan_book = ''