摘要:
# -*- coding: utf-8 -*- """ Created on Wed May 9 14:12:25 2018 @author: JJ """ #12306账号 myuser="" mypasswd="" import urllib.request import re import ssl import urllib.parse import http.cookiejar imp... 阅读全文
该文被密码保护。 阅读全文
摘要:
数据库(右键打开位置,找到users点进去,第一个.db即文件列表,内含hd5),复制到同一目录: 阅读全文
摘要:
#!coding=utf-8 import requests import re import time import json from requests.packages.urllib3.exceptions import InsecureRequestWarning import pandas as pd requests.packages.urllib3.disable_warnings... 阅读全文
摘要:
import pymysql db = pymysql.connect(host='localhost', user='root', password='pz2212', port=3306, db='spiders') cursor = db.cursor() data = { 'id': '20120001', 'name': 'Bob', 'age': 20 } t... 阅读全文
摘要:
import mitmproxy.http from mitmproxy import ctx, http class Joker: def request(self, flow: mitmproxy.http.HTTPFlow): if flow.request.host != "www.baidu.com" or not flow.request.path.sta... 阅读全文
摘要:
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as ec from seleni... 阅读全文
摘要:
#!python3 #updateProduce.py-更正指定产品 成本价格(第二列) import openpyxl wb=openpyxl.load_workbook('produceSales.xlsx') sheet=wb.active #或sheet=wb['Sheet'] # 需要更新成本价格的产品,字典格式 PRICE_UPDATES = {'Garlic': 3.07, ... 阅读全文
摘要:
import requests from pyquery import PyQuery as pq url='https://www.zhihu.com/explore' headers={ 'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Geck... 阅读全文
摘要:
grid = [['.', '.', '.', '.', '.', '.'], ['.', 'O', 'O', '.', '.', '.'], ['O', 'O', 'O', 'O', '.', '.'], ['O', 'O', 'O', 'O', 阅读全文