配置scrapy环境 分别pip install Zope.Interface、Twisted、w3lib、lxml、pyOpenSSL、Scrapy 新建爬虫项目,pycharm运行 我的项目名称为RadioCrawl文件夹为 Paste_Image.png 新建main.pyfrom scrap ...
分类:
其他好文 时间:
2017-10-14 16:50:54
阅读次数:
275
1.用 scrapy 新建一个 sun0769 项目 scrapy startproject sun0769 2.在 items.py 中确定要爬去的内容 3.快速创建 CrawlSpider模板 scrapy genspider -t crawl dongguan wz.sun0769.com 注 ...
分类:
Web程序 时间:
2017-10-06 00:24:42
阅读次数:
311
脏矩形 有时候用CAShapeLayer或者其他矢量图形图层替代Core Graphics并不是那么切实可行。比如我们的绘图应用:我们用线条完美地完成了矢量绘制。但是设想一下如果我们能进一步提高应用的性能,让它就像一个黑板一样工作,然后用『粉笔』来绘制线条。模拟粉笔最简单的方法就是用一个『线刷』图片 ...
分类:
其他好文 时间:
2017-10-05 23:10:55
阅读次数:
181
using System; using System.Drawing; using System.Windows.Forms; namespace aaaa { public partial class Form1 : Form { public Form1() { InitializeCompon... ...
import java.applet.Applet; import java.awt.*; public class Exam4_7 extends Applet { public void paint(Graphics g) { int x0=10,y0=10,dx=15,dy=20,N=15,M ...
分类:
其他好文 时间:
2017-10-02 23:04:11
阅读次数:
206
urllib.request.rechieve("www",filename="") urllib.request.cleanup() a=urllib.request.urlopen() a.info() a.getcode() a.geturl() *********************** ...
分类:
Web程序 时间:
2017-10-02 13:28:28
阅读次数:
299
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using ... ...
配置sharepoint 爬网内容源,如我们有4台前端服务器,集群域名为eds.jd.com,2台用于爬网前端服务器,集群域名为crawl.eds.jd.com 配置内容源的时候,将地址配为: 结果一直搜索不出任何数据,将地址改为crawl.eds.jd.com也不行。 最后没办法,将地址改为机器名 ...
分类:
其他好文 时间:
2017-09-27 18:56:18
阅读次数:
140
1实例: 下载一首英文的歌词或文章,将所有,.?!等替换为空格,将所有大写转换为小写,统计某几个单词出现的次数,分隔出一个一个的单词。 g='''Say something, I'm giving up on you. I'll be the one, if you want me to. Anyw ...
分类:
其他好文 时间:
2017-09-22 13:05:16
阅读次数:
134
CentOS 的官方源去掉了一些与版权有关的软件,因此想要安装这些软件或者手动下载安装,或者使用其他源. 下面我推荐常用的两个源, 这两个源基本可以满足一般服务器的使用需求. 1.首先, 添加源之前要确定系统架构及版本 查看系统版本: 以看出来,系统版本是7.3.1611 架构是x86_64 64位 ...
分类:
系统相关 时间:
2017-09-13 17:51:25
阅读次数:
306