Selenium安装使用

selenium能真是的模拟打开一个浏览器,模拟鼠标事件,提供选择器,控制cookie等等。 安装 由于使用了conda,安装就很方便了。 conda install selenium 安装chrome驱动……

阅读全文

Scrapy常用命令

新建一个工程 scrapy startproject spider_name 构建爬虫 scrapy genspider name domain 运行爬虫 scrapy runspider 爬虫名称 启动项目 scrapy crawl xxx……

阅读全文

Anaconda常用命令

查看虚拟环境 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ##创建虚拟环境 conda create -n env-name python=X.X ##切换虚拟环境 conda activate env-name ##关闭虚拟环境 deactivate ##删除虚拟环境 conda remove -n env-name --all ##查看存在的虚拟环境 conda env list……

阅读全文

Powershell美化

oh-my-posh使用和主题选择 oh-my-posh 是一个开源、低调的 PowerShell 主题框架。 下载安装 在powershell中执行 1 2 3 4 Install-Module posh-git -Scope CurrentUser Install-Module oh-my-posh -Scope CurrentUser Import-Module posh-git Import-Module oh-my-posh 选择主题 oh-my-pos……

阅读全文

Windows通过pip安装scrapy

Windows通过pip安装scrapy Scrapy需要超多的依赖,而pip instarll scrapy并不会下载好全部依赖。我在安装twisted时出现问题。 1 error: Microsoft Visual C++ 14.0 is……

阅读全文

apt-get update和upgrade和dist-upgrade的区别

1 2 3 4 5 6 7 8 update update is used to resynchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.list. For example, when using a Debian archive, this command retrieves and scans the Packages.gz files, so that information about new and updated packages is available. An update should always be performed before an upgrade or dist-upgrade. Please be aware that the overall progress meter will be……

阅读全文

Debian安装python38

源码安装 1、安装依赖包 1 sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus build-essential libncursesw5-dev libgdbm-dev libc6-dev zlib1g-dev libsqlite3-dev tk-dev libssl-dev openssl libffi-dev 2、下载python3.8源码 1 2 3 4 5 6 7 ##更新 sudo apt-get update ##下载 wget https://www.python.org/downloads/release/python-380/ ##解压 tar -xvf Python-3.8.0.tar.xz cd Python-3.8.0/ 3、配置,编……

阅读全文

流畅的python学习笔记 2

1、列表推导 列表循环:dummy = [ord(symbol) for symbol in symbols] 传统for循环: 1 2 for symbol in symbols: ... codes.append(ord(symbol)) 带条件的列表推导:beyond_ascii = [ord(s) for s in symbols if ord(s) > 127] 笛卡尔积:tshirt……

阅读全文