02 2020 档案

摘要:附 pip install pycryptodome 阅读全文
posted @ 2020-02-24 11:01 jswf 阅读(433) 评论(0) 推荐(0) 编辑
摘要:from lxml import etree import requests from urllib import request import time import os from queue import Queue import threading import re from multip 阅读全文
posted @ 2020-02-23 15:43 jswf 阅读(638) 评论(0) 推荐(0) 编辑
摘要:附 https://blog.csdn.net/weixin_43430036/article/details/84871624 # -*- coding: utf-8 -*- from urllib import request import scrapy import json from sel 阅读全文
posted @ 2020-02-23 12:31 jswf 阅读(426) 评论(0) 推荐(0) 编辑
摘要:chrome.exe --remote-debugging-port=9222 --user-data-dir="C:\selenum\AutomationProfile" 此条命令复制到命令行,打开端口为9222的浏览器 ,勿关闭 (此前应先配置环境变量 否则无chrome.exe此命令) chr 阅读全文
posted @ 2020-02-21 17:00 jswf 阅读(430) 评论(0) 推荐(0) 编辑
摘要:from scrapy import signals import random class Test001UseragentMiddleware(object): USER_AGENT=[ "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 阅读全文
posted @ 2020-02-21 11:23 jswf 阅读(355) 评论(0) 推荐(0) 编辑
摘要:设置键名和键值 set [key] [value] get [key] 列表操作 lpush [key] [value] 从左侧向列表中添加值 rpush [key] [value] 从右侧向列表中添加值 lrange [key] [start] [end] 从左侧遍历列表 从初始位置到末尾位置遍历 阅读全文
posted @ 2020-02-19 20:32 jswf 阅读(168) 评论(0) 推荐(0) 编辑
摘要:附 https://blog.csdn.net/weixin_43527241/article/details/88723408 常用命令 redis-server redis.windows.conf 启动服务器 redis-server --service-install redis.windo 阅读全文
posted @ 2020-02-19 18:11 jswf 阅读(116) 评论(0) 推荐(0) 编辑
摘要:操作命令 建立项目scrapy startproject [项目名] You can start your first spider with: cd jxnsh scrapy genspider example example.com 构建爬虫文件 先转到项目目录下 正常情况下再执行scrapy 阅读全文
posted @ 2020-02-18 22:03 jswf 阅读(699) 评论(0) 推荐(0) 编辑
摘要:初版 # -*- coding: utf-8 -*- import scrapy import requests from lxml import etree from selenium import webdriver from scrapy.http.response.html import H 阅读全文
posted @ 2020-02-17 20:57 jswf 阅读(206) 评论(0) 推荐(0) 编辑
摘要:1 # -*- coding: utf-8 -*- 2 import scrapy 3 import requests 4 from lxml import etree 5 from selenium import webdriver 6 from scrapy.http.response.html 阅读全文
posted @ 2020-02-17 16:33 jswf 阅读(283) 评论(0) 推荐(0) 编辑
摘要:from lxml import etree import requests from urllib import request import time import os from queue import Queue import threading import re class Procu 阅读全文
posted @ 2020-02-16 15:07 jswf 阅读(178) 评论(0) 推荐(0) 编辑
摘要:from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.by import By from selen 阅读全文
posted @ 2020-02-16 14:57 jswf 阅读(198) 评论(0) 推荐(0) 编辑
摘要:from lxml import etree import requests from urllib import request import time import os number = 0 def get_page(): for x in range(1,20): url = "https: 阅读全文
posted @ 2020-02-13 15:12 jswf 阅读(721) 评论(0) 推荐(0) 编辑
摘要:import re text = "apple is $20.09,orange is $100.99" #ret = re.findall(".*\$\d+\.*\d*", text) #会找出所有匹配项 以list形式返回 #ret = re.sub("\$","㊙", text,1) #会替换 阅读全文
posted @ 2020-02-11 21:57 jswf 阅读(238) 评论(0) 推荐(0) 编辑
摘要:from bs4 import BeautifulSoup text = """ <ul id="navList" class="w1"> <li><a id="blog_nav_sitehome" class="menu" href="https://www.cnblogs.com/">博客园</ 阅读全文
posted @ 2020-02-11 11:36 jswf 阅读(174) 评论(0) 推荐(0) 编辑
摘要:from lxml import etree import requests #一般访问网页需要有request请求 请求有请求头 只需要模仿请求头 就能访问到网页内容 baseurl0 = "https://www.ygdy8.net" headers = { "User-Agent": "Moz 阅读全文
posted @ 2020-02-10 19:10 jswf 阅读(416) 评论(0) 推荐(0) 编辑
摘要:1 from lxml import etree 2 text = "<div><p>nmsl</p><span>nmsl</span></div>" 3 def htmlstree(text): 4 html = etree.HTML(text) 5 result = etree.tostring 阅读全文
posted @ 2020-02-09 17:36 jswf 阅读(736) 评论(0) 推荐(0) 编辑
摘要:1.urllib库的几个基础方法 from urllib import request,parse request.urlretrieve("http://www.baidu.com","index.html") #可快捷的将网页源码保存到本地 req=request.Request("http:/ 阅读全文
posted @ 2020-02-08 20:25 jswf 阅读(611) 评论(0) 推荐(0) 编辑
摘要:参考https://www.cnblogs.com/wsws/p/10007890.html Xshell6 (一个强大的安全终端模拟软件)为linux操作界面可操作mysql数据库 Xftp6 (是一款灵活且便捷的SFTP/FTP客户端) 为远程文件管理 xshell 以下为操作界面 操作流程 打 阅读全文
posted @ 2020-02-02 14:37 jswf 阅读(172) 评论(0) 推荐(0) 编辑
摘要:首先对 php 连接数据库语句同一 配置 通过 include "config.php"; 导入 $conn = mysqli_connect("127.0.0.1","root","123","ts"); 其他文件导入后即获取到$conn变量 四个参数 ip地址 mysql用户名 mysql密码 阅读全文
posted @ 2020-02-02 14:06 jswf 阅读(1334) 评论(0) 推荐(0) 编辑
摘要:1 <!-- 时钟控件 --> <div id="clockdiv"><canvas id="dom" width="180" height="180">您的浏览器不兼容canvas</canvas></div> <script type="text/javascript" src="https:/ 阅读全文
posted @ 2020-02-02 13:25 jswf 阅读(244) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示