自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 问答 (3)
  • 收藏
  • 关注

原创 爬新闻,记录图片、文字位置

模板代码: import lxml.etreehtml = lxml.etree.HTML(resp.text) # 网页nodes = html.xpath("//div[@class='text']//*") # 匹配新闻内容下的所有节点for i in nodes: # 文字 text = i.text if tex...

2019-02-01 10:08:03 272

原创 微信公众号上传、下载、删除,临时素材、永久素材、图文消息的接口整理

临时素材 上传 /media/upload? 下载 /media/get?永久素材 上传 /material/add_material? 下载 /material/get_material? 删除 /material/del_material?图文消息 ...

2019-01-16 10:41:18 2649

原创 seo优化

seo优化方式有很多其中一种是在各种平台引入外链例如:羽月官方网站http://www.yu-yuechina.com/http://www.yu-yuechina.cn/

2019-01-09 14:20:12 185 2

原创 Python通过ssh连接MySQL

机器A通过机器B登录机器C的MySQL import pymysqlfrom sshtunnel import SSHTunnelForwarder server = SSHTunnelForwarder(    ssh_address_or_host=('机器B的IP', 22), # 指定ssh登录的跳转机的address    ssh_username=...

2018-10-10 11:31:19 5219 1

原创 python time模块

import timeimport calendar""" 时间元组(年、月、日、时、分、秒、一周的第几日、一年的第几日、夏令时) 一周的第几日: 0-6 一年的第几日: 1-366 夏令时: -1, 0, 1"""""" python中时间日期格式化符号: --------------------------...

2018-09-30 11:52:58 1191

原创 Centos 7 定时任务多次启动

systemctl start crondsystemctl stop crondsystemctl restart crondsystemctl reload crond(1)停止crontab,systemctl stop crond(2)查看cron进程数ps -A | grep cron如有多个使用kill进行杀掉(3)启动crontab,systemctl start c...

2018-09-12 10:07:40 393

原创 MySQL复制表结构

复制表,包括字段、备注、索引、主键外键、存储引擎等。CREATE TABLE IF NOT EXISTS article_copy (LIKE article) 只复制字段CREATE  TABLE IF NOT EXISTS article_copy SELECT * FROM article;    ...

2018-09-03 10:06:36 503

原创 随机数

import random random.randint(1, 3)# 1, 2, 3

2018-08-28 15:21:30 209

原创 正则表达式,忽略大小写

import reurl = ‘abc.gif’res = re.search('.*(.GIF$)', url, re.I)  

2018-08-28 10:57:54 2662

原创 当前时间戳

 import time a = time.time()print(int(a))

2018-08-28 10:00:38 384

原创 时间戳转日期

import timedef a(s):    timeArray = time.localtime(s)     otherStyleTime = time.strftime("%Y--%m--%d %H:%M:%S", timeArray)        print(otherStyleTime) a(1535267253)https://unixtime.51...

2018-08-26 15:08:23 135

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除