摘要: 查看bin目录下的pybot,发现是python脚本 于是想到了将脚本打包,到时候直接运行 #!/usr/local/bin/python3.7 import sys from robot import run_cli run_cli(sys.argv[1:]) 使用pyinstaller打包之后, 阅读全文
posted @ 2022-11-07 16:20 James_Danni 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 因为django本身有模版的概念,直接取值是从django的模版中取值的 而在vue的v-for中想要获取遍历之后的数据, 直接用{{ var }}方式取值,会取到None 这时候就需要进行特殊处理,解决办法为: 1、禁用Django的模版 {% verbatim %} {% endverbatim 阅读全文
posted @ 2022-04-28 13:20 James_Danni 阅读(210) 评论(0) 推荐(0) 编辑
摘要: from django.shortcuts import render from django.http import JsonResponse import json # Create your views here. def home(request): # return render(requ 阅读全文
posted @ 2022-04-16 15:35 James_Danni 阅读(330) 评论(0) 推荐(0) 编辑
摘要: from ui import views as ui_view from django.conf.urls import url urlpatterns = [ # path('admin/', admin.site.urls), url(r'^$', ui_view.home, name='hom 阅读全文
posted @ 2022-04-16 15:02 James_Danni 阅读(105) 评论(0) 推荐(0) 编辑
摘要: import re import paramiko class ShellHandler: def __init__(self, host, user, psw, port): self.ssh = paramiko.SSHClient() self.ssh.set_missing_host_key 阅读全文
posted @ 2021-11-17 14:39 James_Danni 阅读(841) 评论(2) 推荐(0) 编辑
摘要: Scrapy框架的介绍 框架官方文档:https://docs.scrapy.org/en/latest/ 安装: pip3 install Scrapy 安装测试: cmd命令行界面,输入:scrapy -h 框架安装完成; scrapy框架: 分为五个模块+两个中间件(5+2结构): spide 阅读全文
posted @ 2019-11-14 17:10 James_Danni 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 爬虫需要将网页获取的结果保存下来,现在先学习csv保存数据; 最终实现代码: import requests from bs4 import BeautifulSoup import csv def db(): url = "https://www.douban.com/groups/item" h 阅读全文
posted @ 2019-11-13 14:12 James_Danni 阅读(8470) 评论(0) 推荐(0) 编辑
摘要: beautifulsoup 框架介绍 框架官方中文文档:https://www.crummy.com/software/BeautifulSoup/bs4/doc.zh/ 框架基本使用: Beautiful Soup将复杂HTML文档转换成一个复杂的树形结构,每个节点都是Python对象,所有对象可 阅读全文
posted @ 2019-11-13 11:21 James_Danni 阅读(777) 评论(0) 推荐(0) 编辑
摘要: 环境准备:python3.6 pip3 install requests pip3 install beautifulsoup4 美丽汤框架介绍: 1、美丽汤解析网页数据的格式有: 2、美丽汤框架介绍:请跳转到: https://www.cnblogs.com/james-danni/p/11847 阅读全文
posted @ 2019-11-13 11:19 James_Danni 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 1、自行查看Django所对应的python版本 https://docs.djangoproject.com/en/2.2/releases/x.x/ 例如需要查看2.2支持的python版本,就将x.x替换成2.2;以此类推 本次学习笔记基于Django2.2版本,该版本支持python3.5 阅读全文
posted @ 2019-11-11 17:32 James_Danni 阅读(130) 评论(0) 推荐(0) 编辑