摘要: settings.py # -*- coding: utf-8 -*- # Scrapy settings for zhihutupian project # # For simplicity, this file contains only settings considered importan 阅读全文
posted @ 2020-03-20 19:41 催人老 阅读(166) 评论(0) 推荐(0) 编辑
摘要: #spider/first# -*- coding: utf-8 -*- import scrapy from selenium import webdriver from xinwen.items import XinwenItem #百度ai部分 from aip import AipNlp A 阅读全文
posted @ 2020-03-20 09:57 催人老 阅读(355) 评论(0) 推荐(0) 编辑
摘要: from lxml import etree from selenium import webdriver import time from urllib import request dirName ='imgLibs' driver = webdriver.Chrome(r'C:\Users\A 阅读全文
posted @ 2020-03-16 12:33 催人老 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 爬取某导航网页全部网址 进入网站之后需要获取网站正确url 使用Chrome自带检查工具 在网页右键--检查 利用全局搜索(ctrl+f) 12306 获取数据存储文件 list 点击查看文件信息 得到url:http://xxxxx 同时得到response method 为post 在最下方得到 阅读全文
posted @ 2020-03-06 15:35 催人老 阅读(1099) 评论(0) 推荐(0) 编辑
摘要: 1.元素的类型 1.块元素 <h1>~<h6> <p> <div> <ul> <ol> <li> 2.行内元素 <strong> <b> <i> <del> <s> <ins> <u> <a> <span> 行内元素通常嵌套在块元素中使用,而块元素却不能嵌套在行内元素中 例 <p> <strong> 阅读全文
posted @ 2018-04-12 22:14 催人老 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1.设置背景颜色 background-image:url(img/jianbian.jpg) 3.设置背景图像平铺 background-repeat:repeat-x repeat:沿水平和数值两个方向平铺(默认值) no-repeat:不平铺(图像位于元素的左上角,只显示一次) repeat- 阅读全文
posted @ 2018-04-11 23:02 催人老 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 盒子模型:内容,内边距(padding),边框(border),外边距(margin) border-top-width:宽度; border-top-color:颜色; border-top:宽度 样式 颜色 下边框 border-bottom-style:样式; 左边框 border-left- 阅读全文
posted @ 2018-04-10 23:38 催人老 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 创建和删除目录的命令 1.mkdir 选项 dirname dirname 目录 -m 存取权限设置为MODE 存取权限用给定的八进制数字表示 -p 可一次建立多个目录 2.rmdir 选项 dirname 删除目录 -p 递归删除目录 改变文件目录和显示目录内容的命令 1.cd dirname 改 阅读全文
posted @ 2018-04-09 22:58 催人老 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 1 cp命令 cp 选项 源文件或目录 目标文件或目录 将源文件或目录复制到目标文件中 -r 将目录下全部文件复制到目标目录 cp -i /home/mengqc/m*.c /home/liuzh 交互式将m打头的。c文件复制到目标目录里 2.rm命令 rm 选项 文件列表 删除文件或目录 -r 递 阅读全文
posted @ 2018-04-03 23:18 催人老 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 打印到屏幕 #!/usr/bin/python# -*- coding: UTF-8 -*- print "Python 是一个非常棒的语言,不是吗?" Python 是一个非常棒的语言,不是吗? 读取键盘输入 Python提供了两个内置函数从标准输入读入一行文本,默认的标准输入是键盘。如下: ra 阅读全文
posted @ 2018-04-02 22:49 催人老 阅读(107) 评论(0) 推荐(0) 编辑