posted @ 2018-01-17 14:58
01 2018 档案
摘要:为了安全,lnmp 的大部分版本都是禁止远程连接mysql的开启的话可以按如下步骤:1、首先需要自己在phpmyadmin里添加一个用户 主机为 % 的任意主机(也可以编辑已有的用户)2、并且iptables 里删除DROP 3306端口的规则,iptables教程:https://www.vpser.net/security/linux-iptables.htmluse mysql; CREA...
阅读全文
摘要:https://zhuanlan.zhihu.com/p/28587931 用到的库有“selenium”和“requests”。通过selenium进行模拟登陆,然后将Cookies传入requests,最终用requests进行网站的抓取。优点就是不但规避了“selenium”其本身抓取速度慢的问题(因为仅仅用其作为登陆),又规避了利用requests登陆时需要制作繁琐的Cookies的过程(...
阅读全文
posted @ 2018-01-17 14:55
摘要:解决方案:将获取的cookies保存在本地。下次登陆的时候直接导入本地的cookies。参考链接:How to save and load cookies using python selenium webdriverhttps://stackoverflow.com/questions/15058462/how-to-save-and-load-cookies-using-python-sele...
阅读全文
posted @ 2018-01-17 14:48
摘要:解决方案:这种情况极少。网站如果采用这种反爬虫手段的话很容易误伤真正的用户。如果真的遇到这种情况,只需要隐藏掉selenium中显示你是机器人的信息就可以了。参考链接:Can a website detect when you are using selenium with chromedriver?https://stackoverflow.com/questions/15058462/how-...
阅读全文
posted @ 2018-01-17 14:47
摘要:"".join(s.split())+1最简单的方法>>import re>>p=re.compile('\s+')>>new_string=re.sub(p,'',your_string)这是正则表达式的用法,我觉得更有一般性来自为知笔记(Wiz)
阅读全文
posted @ 2018-01-17 14:46
摘要:搭建 HTTP 服务任务时间:15min ~ 30min下面的步骤,将带大家在服务器上使用 Node 和 Express 搭建一个 HTTP 服务器安装 NodeJS 和 NPM使用下面的命令安装 NodeJS 和 NPMcurl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash - yum install n...
阅读全文
posted @ 2018-01-17 14:37
摘要:l教育版onedrive940405@zt来自为知笔记(Wiz)
阅读全文
posted @ 2018-01-17 14:32
浙公网安备 33010602011771号