摘要: 用数据库的时候,难免会删除数据,会发现设置的主键增长不是按照正常顺序排列,中间有断隔比如这样。 以我这个情况举例 处理方法的原理:删除原有的自增ID,重新建立新的自增ID。 ALTER TABLE `news` DROP `NewsID`;ALTER TABLE `news` ADD `NewsID 阅读全文
posted @ 2018-12-03 22:02 心脏咚个不停 阅读(1829) 评论(0) 推荐(0) 编辑
摘要: 目前由于phantomjs已经不维护了,而新版的Chrome(59+)推出了Headless模式,对爬虫来说尤其是定时任务的爬虫截屏之类的是一大好事。 不过按照网络上的一些方法来写的话,会报下面的错误: 后来经过分析,他们运行python是在mac或者linux下进行的,win下由于高版本的chro 阅读全文
posted @ 2018-11-16 10:46 心脏咚个不停 阅读(986) 评论(0) 推荐(0) 编辑
摘要: 使用selenium访问新浪微博的时候 浏览器总会有个通知,需要点击 类似下面这样 下面使用chromeoptions来修改浏览器的设置 from selenium import webdriverimport time options = webdriver.ChromeOptions()pref 阅读全文
posted @ 2018-11-16 10:44 心脏咚个不停 阅读(2886) 评论(0) 推荐(0) 编辑
摘要: 【问题描述】 1.从myslq(5.7.19-0ubuntu0.16.04.1)中导出sql脚本,导入到mysql(5.5.27)中,报如下错误:Row size too large. The maximum row size for the used table type, not countin 阅读全文
posted @ 2018-10-29 18:30 心脏咚个不停 阅读(2947) 评论(0) 推荐(0) 编辑
摘要: 对爬虫数据进行自然语言清洗时用到的一些正则表达式 标签中的所有属性匹配(排除src,href等指定参数) 参考链接 1 2 3 4 5 6 7 8 9 10 11 12 13 14 html标签的所有参数 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 阅读全文
posted @ 2018-10-09 17:07 心脏咚个不停 阅读(1417) 评论(0) 推荐(0) 编辑
摘要: 一、pycharm字体放大的设置 File —> setting —> Keymap —>在搜寻框中输入:increase —> Increase Font Size(双击) —> 在弹出的对话框中选择Add Mouse Shortcut 在弹出的对话框中同时按住ctrl键和鼠标滚轮向上滑。 二、P 阅读全文
posted @ 2018-09-19 20:57 心脏咚个不停 阅读(16236) 评论(3) 推荐(6) 编辑
摘要: # -*- coding:utf-8 -*- #!python3 import os import base64 sss ="""base64的编码""" print(len(sss)) imagedata = base64.b64decode(sss) print(imagedata) file 阅读全文
posted @ 2018-09-17 19:43 心脏咚个不停 阅读(3070) 评论(2) 推荐(0) 编辑
摘要: [CentOS_7.4]Linux编译安装ffmpeg 安装过程: 下载安装源,配置,编译,安装,设置环境变量。 # wget http://www.ffmpeg.org/releases/ffmpeg-3.1.tar.gz # tar -zxvf ffmpeg-3.1.tar.gz # cd ff 阅读全文
posted @ 2018-09-11 10:54 心脏咚个不停 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-09-11 00:10 心脏咚个不停 阅读(195) 评论(0) 推荐(0) 编辑
摘要: echo 'export PATH="/home/conda/ls/bin:$PATH"'>>~/.bashrc source ~/.bashrc python 阅读全文
posted @ 2018-09-10 20:30 心脏咚个不停 阅读(471) 评论(0) 推荐(0) 编辑