• 欢迎访问小杰博客网站
  • 欢迎访问小杰博客网站哦

2016年03月的内容

Laravel 命令行安装vendor的插件

1、https://getcomposer.org/download/ 下载composer,安装完成 打开cmd,输入 composer –version 查看是否安装成功 2、修改下载源 composer config -g repo.packagist co……

Laravel – No supported encrypter found. The cipher or key length are invalid.

A user was trying to install Laravel under WAMP and got the following error: RuntimeException in compiled.php line 6904: No supported encrypter found. The cipher and / or ke……

同时运行多个scrapy爬虫的几种方法(自定义scrapy项目命令)

试想一下,前面做的实验和例子都只有一个spider。然而,现实的开发的爬虫肯定不止一个。既然这样,那么就会有如下几个问题:1、在同一个项目中怎么创建多个爬虫的呢?2、多个爬虫的时候是怎么将他们运行起来呢? 说明:本文章是基于前面几篇文章和实验的基础上完成的。如果您错过了,或者有疑惑的地方可以在此查看: 安装python爬虫scrapy踩过的那……

Can’t connect to local MySQL server through socket

线上运行时发现一个问题: python manage.py runserver _mysql_exceptions.OperationalError: (2002, “Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ ……

scrapy批量执行爬虫代码

#-*- coding: UTF-8 -*- # 一些没爬取成功的网站重新做一遍 import time   import MySQLdb   import MySQLdb.cursors import json import sys from scrapy.commands import ScrapyCommand   fr……

Twisted adbapi:Twisted 关系数据库支持

【摘要】 Twisted 是一个异步网络框架,不幸的是大部分数据库api实现只有阻塞式接口,twisted.enterprise.adbapi为此产生,它是DB-API 2.0 API的非阻塞接口,可以访问各种关系数据库。 假定你已经了解:     Python     如何写一个简单的 Twis……

批量删除文档里面的注释、空行

批量删除文档里面的注释、空行 把正则表达式 (/\*{1,2}[\s\S]*?\*/)|(//[\s\S]*?\n)|(<!-[\s\S]*?–>)|(\n[\s| ]*\r) 替换成 空就行了 ……