摘要: 安装 conda : 1 $ cd ~ && rm -rf ./Anaconda3 # 删除原来的anaconda 2 # 自行清除环境变量里的anaconda信息 3 $ wget "https://repo.anaconda.com/miniconda/Miniconda3-latest-Lin 阅读全文
posted @ 2022-05-12 08:58 F·灬小人物 阅读(191) 评论(0) 推荐(0) 编辑
摘要: drf ubuntu服务器下使用 supervisor 和 celery supervisor 的卸载过程: sudo apt purge supervisor whereis supervisord如果有用 pip 安装的,用pip uninstall supervisor 再卸载一遍 查找 su 阅读全文
posted @ 2021-09-27 11:24 F·灬小人物 阅读(815) 评论(1) 推荐(0) 编辑
摘要: 一 : GitHub 将项目部署到 GitHub 上,先在GitHub 上创建一个项目,只填写名字。 在项目路径下运行 git init ,因为在vscode中默认已经对项目进行了该操作已存在 .git 文件,所以省略此操作。 然后使用 git add . 将修改的文件放入暂存区, 使用 git c 阅读全文
posted @ 2021-04-02 16:03 F·灬小人物 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 # -*- coding: utf-8 -*- 2 3 import smtplib, ssl 4 from email.mime.text import MIMEText 5 from email.mime.multipart import MIMEMultipart 6 7 8 de 阅读全文
posted @ 2021-03-29 16:49 F·灬小人物 阅读(118) 评论(0) 推荐(0) 编辑
摘要: imaplib 获取邮件,email解析邮件config文件中存有路径 1 # config.py 2 FILE_PATH_PREFIX = os.getcwd() + '/static/' 3 FILE_PATH_PREFIX_ALIAS = "/static/" 4 FILE_DOMAIN_PR 阅读全文
posted @ 2021-03-26 15:27 F·灬小人物 阅读(2514) 评论(0) 推荐(0) 编辑
摘要: 文档参考github:https://github.com/fzlee/alipay/blob/master/docs/init.md 沙箱环境配置:https://opendocs.alipay.com/open/200/105311 1、进入沙箱环境进行配置,有对应的APPID和支付宝网关 2、 阅读全文
posted @ 2021-03-26 11:44 F·灬小人物 阅读(1240) 评论(0) 推荐(2) 编辑
摘要: 所有操作都在 MongoDB 可视化工具 Robo 3T 软件下演示操作 一:使用 insert 插入文档: 插入一条数据与多条数据的格式: 1 db.<集合>.insertOne(<JSON对象>) 2 db.<集合>.insertMany([<JSON 1>, <JSON 2>, ...<JSO 阅读全文
posted @ 2020-08-27 17:26 F·灬小人物 阅读(752) 评论(0) 推荐(0) 编辑
摘要: 今日头条抓取页面: 分析街拍页面的 ajax 请求: 通过在 XHR 中查看内容,获取 url 链接,params 参数信息,将两者进行拼接后取得完整 url 地址。data 中的 article_url 为各详情页的链接地址。 代码显示: 1 # 获取街拍页面; 2 def one_page_in 阅读全文
posted @ 2019-09-29 17:27 F·灬小人物 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 使用 进程池Pool 提高爬取数据的速度。 python限定了多进程要调用的函数不能是类方法,需把多进程调用的函数放到类外面,或者变成静态函数。 但静态函数不能被该类的方法调用( self.ProcessWorker 形式),需在外部调用:如 mc = MyClass(), mc.ProcessWo 阅读全文
posted @ 2019-09-27 17:20 F·灬小人物 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 爬虫:请求网站并爬取数据的自动化程序。 基本流程: Request: Response: 解析方式: Urllib:python 内置的 HTTP 请求库 urllib.request:请求模块; urllib.error:异常处理模块; urllib.parse:url 解析模块; urllib. 阅读全文
posted @ 2019-09-26 09:43 F·灬小人物 阅读(125) 评论(0) 推荐(0) 编辑