requests.ConnectionError 网络连接错误异常,如DNS查失、拒绝连接等
requests.HTTPError HTTP错误异常
requests.URLRequired URL缺失异常
requests.TooManyRedirects 超过最大重定向次数,产生重定向异常
requests.ConnectTimeout 连接远程服务器超时异常
requests.Timeout 请求URL超时,产生超时异常

raise_for_status() 如果不是200,产生异常requests.HTTPError

爬虫通用代码框架
import requests
def getHTMLText(url):

  try:
       r = requests.get(url,timeout=30)
       r.raise_for_status()
       r.encoding = r.apparent_encoding
       return r.text
  except:
       return "产生异常"

if name == "__main__":

  url = "http://www.baidu.com"
  print(getHTMLText(url))

import requests 导入模块
r = requests.get("http://www.baidu.com",timeout=30) 发送请求
r.status_code 查看返回值 200 表示可以访问,404表示无法访问
r.text 查看页面内容 ,可能是乱码
r.encoding 猜测页面编码,默认是 'ISO-8859-1'
r.apparent_encoding 查看获取到的内容编码,是 'utf-8'
r.encoding = 'utf-8' 改变页面编码位 'utf-8'
r.text 再次查看页面内容,可以正常显示

1,安装命令:
pip3 install --upgrade pip
pip3 install auto-editor

2,使用命令:
auto-editor C:path\to\your\video.mp4
auto-editor C:path\to\your\video.mp4 --export_to_premiere
auto-editor C:/Users/PC-2020/Desktop/123456.mp4 --export_to_final_cut_pro
auto-editor C:/Users/PC-2020/Desktop/123456.mp4 --export_to_resolve

开源项目地址
https://github.com/WyattBlue/auto-editor

wget -O install.sh https://download.bt.cn/install/install_6.0.sh && sh install.sh ed8484bec

外网面板地址: http://[240e:350:d87:0:20c:29ff:fe68:5904]:21550/7782c3d1
内网面板地址: http://192.168.1.2:21550/7782c3d1
username: slfd392t
password: f7146909

cd /sur/local/
wget https://github.com/imki911/ArDNSPod/archive/refs/heads/master.zip

!/bin/bash

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
endDate=date +"%Y-%m-%d %H:%M:%S"
echo "---------------------------------[$endDate]---------------------------------"
cd /usr/local/ArDNSPod-master
sh ddnspod.sh

cd /usr/local/bin/&& mkdir ddns && cd ./ddns/ && yum install -y wget && wget https://github.com/jeessy2/ddns-go/releases/download/v5.0.3/ddns-go_5.0.3_linux_x86_64.tar.gz && tar -vzxf ddns-go_5.0.3_linux_x86_64.tar.gz && firewall-cmd --zone=public --add-port=9876/tcp --permanent && firewall-cmd --reload && sudo ./ddns-go -s install &&

cd /usr/local/bin/
mkdir ddns
cd ./ddns/
yum install -y wget
wget https://github.com/jeessy2/ddns-go/releases/download/v5.0.3/ddns-go_5.0.3_linux_x86_64.tar.gz
tar -vzxf ddns-go_5.0.3_linux_x86_64.tar.gz
firewall-cmd --zone=public --add-port=9876/tcp --permanent
firewall-cmd --reload
sudo ./ddns-go -s install

systemctl status ddns-go

firewall-cmd --list-ports