摘要: import time import os import requests from requests.exceptions import RequestException import re import json from multiprocessing import Pool # 获取网页的h 阅读全文
posted @ 2020-03-26 12:05 飞蝎儿 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 用户 增: mysql> create user 'nxr'@'10.0.0.%' identified by '123'; 查: mysql> desc mysql.user; > authentication_string mysql> select user ,host ,authentica 阅读全文
posted @ 2019-11-14 17:25 飞蝎儿 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 1.xpath 什么是xpath? xml是用来存储和传输数据使用的 和html的差异: (1) html用来显示数据,xml是用来传输数据的 (2) html标签是固定的,xml标签是自定义的 XPath 是一门在 XML 文档中查找信息的语言,他是一种路径表达式 常见的路径表达式 // :不考虑 阅读全文
posted @ 2019-08-18 14:45 飞蝎儿 阅读(237) 评论(0) 推荐(0) 编辑
摘要: from lxml import etree import time import json import urllib.request item_list = [] # 创建一个列表存储获取的信息 # 构造request对象 def handler_request(url, page): headers = { "user-agent": "Mozilla/5.0 (Windows NT 10. 阅读全文
posted @ 2019-08-16 17:43 飞蝎儿 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Linux的目录 /dev 管理设备 cpu /media dvd u盘 Linux 常用命令 用户管理 useradd: 添加用户 格式:useradd 用户名 useradd -d 指定目录 用户名 示例:groupadd 用户组 use... 阅读全文
posted @ 2019-08-15 19:40 飞蝎儿 阅读(162) 评论(0) 推荐(0) 编辑
摘要: import urllib.request import urllib.parse from bs4 import BeautifulSoup import json class ZhiLianSpider(object): url = "https://sou.zhaopin.com/?" def __init__(self, jl, kw, start_page, en... 阅读全文
posted @ 2019-08-15 19:30 飞蝎儿 阅读(663) 评论(0) 推荐(0) 编辑
摘要: # 爬取糗图上的图片import re import urllib.request import os def handler_request(url, page): url = url + str(page) + "/" headers = { "user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) Apple\ WebKit/537.36 (KH 阅读全文
posted @ 2019-08-11 15:51 飞蝎儿 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 正则表达式解析 为什么引入正则表达式? (正则匹配)用来匹配一类具有相同规则的字符串 (正则替换)将匹配得到的字符串进行替换 规则: 单字符: . : 除换行以外所有的字符 []:[nxr] [a-z] 匹配中括号中任意一个字符 \d:数字 0-9 \D:非数字 \w:数字,字... 阅读全文
posted @ 2019-08-11 11:45 飞蝎儿 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 单例模式class MySingleton: __obj = None __init_flag = True def __new__(cls, *args, **kwargs): if not cls.__obj: cls.__obj = super().__new__(cls) return cls.__obj ... 阅读全文
posted @ 2019-06-24 11:40 飞蝎儿 阅读(98) 评论(0) 推荐(0) 编辑
摘要: show wifiname netsh>wlan show profile wifiname: TP-LINK_14 show Wi-Fi password: netsh>wlan show profile TP-LINK_14 key=clear key Content :******** 阅读全文
posted @ 2019-06-23 20:45 飞蝎儿 阅读(201) 评论(0) 推荐(0) 编辑