原创 selenium自動化模擬
代碼如下: pip install selenium from selenium import webdriver import time # 創建一個瀏覽器對象 path = r'E:\360\Google\Chrome\chrom
原创 飛言情讀物抓取---bs4使用
代碼如下: import os import urllib.request import time from bs4 import BeautifulSoup def get_request(url): headers =
原创 flask-增刪改查
1.增加數據(就相當於增加一個實例對象) user1 = User(name='long',email='[email protected]',password='3456789',role_id=1) db.session.add(
原创 urllib使用及代理池
import urllib.request import re import time import os headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0;
原创 selenium 常用方法介紹
獲取當前頁面的url 方法:current_url 實例:driver.current_url 獲取元素座標 方法:location 解釋:首先查找到你要獲取元素的,然後調用location方法 實例:driver.find
原创 普通方法, 類方法 classmethod 與 靜態方法staticmethod 使用和區別.屬性函數property特性
普通方法, 類方法 classmethod 與 靜態方法staticmethod 使用和區別.屬性函數property特性 類方法: 使用時使用classmethod裝飾器裝飾的方法 優點: 簡潔的創建對象 對外提
原创 裝飾器 生成器 迭代器 類中析構方法
網絡傳輸的三要素: 1,IP 2,端口號3,傳輸協議(TCP / UDP) TCP:面向連接可靠交互數據以管道流形式傳輸可以傳輸大文件 UDP:面向無連接不可靠交互數據是以數據包形式傳輸大小限於64KB以內只能
原创 flask 詳解
flask中文文檔官網:http://docs.jinkan.org/docs/flask/quickstart.html#debug-mode flask 是一個微框架, 微說明flask是一個輕量級的框架. flas
原创 Foxmail不能收到163郵件的解決辦法
進入網頁版網易郵箱 找到設置 查看自己的pop設置 點擊進去會顯示如下: 均爲勾選狀態 接着點擊客戶端授權密碼 設置爲打開狀態,此 授權碼 就是你登錄Foxmail的密碼
原创 spider動態頁面 抓取方式
中間件重寫, 登錄起始開啓有頭模擬,保存cookies後,開啓無頭模擬 示例: class SeleniumDownloaderMiddleware(object): def __init__(self):
原创 Jmeter性能測試簡單使用詳解
Jmeter性能測試 一 Jmeter簡單使用 1、創建一個線程組 添加之後如下所示: 參數解釋: Number of Threads (users):虛擬用戶數,一個虛擬用戶佔用一個進程或線程,設置多少虛擬用戶數在這裏也就是
原创 手動驗證碼的登錄操作
import requests from bs4 import BeautifulSoup # 要使用會話。 s = requests.Session() url = 'https://so.gushiwen.org/user/log
原创 視覺映射配置項(轉)
VisualMapOpts:視覺映射配置項 class pyecharts.options.VisualMapOpts class VisualMapOpts( # 是否顯示視覺映射配置 is_show: boo
原创 matplotlib 簡單用法詳解(轉)
原文鏈接:https://blog.csdn.net/cheng9981/article/details/60583273/ import matplotlib.pyplot as plt