2019年12月15日
selenium能真是的模拟打开一个浏览器,模拟鼠标事件,提供选择器,控制cookie等等。 安装 由于使用了conda,安装就很方便了。 conda install selenium 安装chrome驱动……
阅读全文
2019年12月14日
新建一个工程 scrapy startproject spider_name 构建爬虫 scrapy genspider name domain 运行爬虫 scrapy runspider 爬虫名称 启动项目 scrapy crawl xxx……
阅读全文
2019年12月14日
查看虚拟环境 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……
阅读全文
2019年12月13日
打开注册表编辑器 方法:【win+R】打开运行框,输入“regedit”进入 目标文件夹 该路径下由很多文件夹,找到相应的文件夹。 HKEY_LOCAL_MACHINE……
阅读全文
2019年12月12日
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……
阅读全文
2019年12月10日
Windows通过pip安装scrapy Scrapy需要超多的依赖,而pip instarll scrapy并不会下载好全部依赖。我在安装twisted时出现问题。 1 error: Microsoft Visual C++ 14.0 is……
阅读全文
2019年12月7日
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……
阅读全文
2019年12月7日
源码安装 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、配置,编……
阅读全文
2019年12月7日
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……
阅读全文