摘要: 1.通过Request的headers参数修改 1 import urllib.request 2 import urllib.parse 3 import json 4 5 content = input("请输入翻译的内容:") 6 7 url = 'http://fanyi.youdao.co 阅读全文
posted @ 2020-06-30 15:35 hanjianfei 阅读(4156) 评论(0) 推荐(1) 编辑
摘要: import urllib.request import urllib.parse import json content = input("请输入翻译的内容:") url = 'http://fanyi.youdao.com/translate?smartresult=dict&smartresu 阅读全文
posted @ 2020-06-30 13:06 hanjianfei 阅读(704) 评论(0) 推荐(1) 编辑
摘要: #!/usr/bin/python # -*- coding: UTF-8 -*- i = ['a', 'b'] l = [1, 2] print dict([i,l]) 以上实例输出结果为: {'a': 'b', 1: 2} 阅读全文
posted @ 2019-12-17 15:09 hanjianfei 阅读(201) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash dirdate=`date +%Y%m%d` mkdir $dirdate 添加定时任务 crontab -e * 24 * * * /root/date.sh wq 保存 阅读全文
posted @ 2019-09-03 18:35 hanjianfei 阅读(4201) 评论(0) 推荐(0) 编辑
摘要: 防火墙: systemctl stop firewalld systemctl disable firewalld systemctl list-unit-files | grep firewalld ftp服务 启动ftp和开机自启动命令 /bin/systemctl start vsftpd.service systemctl enable vsftpd.service ps -ef |... 阅读全文
posted @ 2019-09-03 18:11 hanjianfei 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 首先Oracle官网下载安装包: http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html 安装解压缩到/usr/local/oracle mkdir /usr/local/oracle unzip /usr/local/oracle/instantclient-basic-linux. 阅读全文
posted @ 2019-09-03 16:22 hanjianfei 阅读(19349) 评论(0) 推荐(0) 编辑
摘要: 检查是否安装expect which expect 如果没有安装, yum install expect -y vi distribute_file.sh #!/usr/bin/expect -f #chmod 777 distribute_file.sh password= path=$1 topath=$2 while read -r ipline do expect<<-END spawn 阅读全文
posted @ 2019-09-03 15:32 hanjianfei 阅读(244) 评论(0) 推荐(0) 编辑