摘要: 版本一(基于类视图APIView类) views.py: APIView是继承的Django View视图的。 serializers.py from rest_framework import serializers #导入序列 from .models import User #导入表 版本二( 阅读全文
posted @ 2018-10-31 19:15 lvye001 阅读(654) 评论(3) 推荐(4) 编辑
摘要: import cloudscraper proxies = { "http": "http://127.0.0.1:7890", "https": "http://127.0.0.1:7890", } headers = { 'User-Agent':'Mozilla/5.0 (Windows NT 阅读全文
posted @ 2024-05-08 16:49 lvye001 阅读(129) 评论(0) 推荐(0) 编辑
摘要: import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText def send_email(sender_email, sender_password, recip 阅读全文
posted @ 2024-04-30 17:21 lvye001 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 1,安装selenium模块 pip3 install selenium 2,安装谷歌浏览器 yum install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm -y 3安装chromedriv 阅读全文
posted @ 2024-04-29 17:20 lvye001 阅读(279) 评论(0) 推荐(0) 编辑
摘要: Linux系统安装ffmpeg & 升级ffmpeg 一、介绍 多媒体视频处理工具FFmpeg有非常强大的功能,包括视频采集功能、视频格式转换、视频抓图、给视频加水印等。由于最近要处理音视频格式转换问题,因此需要安装、升级ffmpeg,下面来记录一下踩坑过程。 二、安装 ffmpeg 1、下载并解压 阅读全文
posted @ 2024-04-10 16:18 lvye001 阅读(75) 评论(0) 推荐(0) 编辑
摘要: import os from imagededup.methods import PHash phasher = PHash() def process_file(img_path): # 生成图像目录中所有图像的二值hash编码 encodings = phasher.encode_images( 阅读全文
posted @ 2023-07-10 15:54 lvye001 阅读(151) 评论(0) 推荐(0) 编辑
摘要: from selenium import webdriver from selenium.webdriver import ChromeOptions from selenium.webdriver.common.keys import Keys from selenium.webdriver.su 阅读全文
posted @ 2023-03-17 17:09 lvye001 阅读(21) 评论(0) 推荐(0) 编辑
摘要: import cv2 import os videopath =r"1-1-2-1_fa_diantou+idle+idle_audio.mp4" pic_path = r'F:\2023_02_24\liu_hui\video_cv2\pic' def start_deal(): vc = cv2 阅读全文
posted @ 2023-03-17 17:06 lvye001 阅读(149) 评论(0) 推荐(0) 编辑
摘要: import os mp4_dir_path = r'F:\2023_02_21\du_zhan\转换视频\mp4' gp3_dir_path = r'F:\2023_02_21\du_zhan\转换视频\3gp' for f in os.listdir(mp4_dir_path): mp4_ful 阅读全文
posted @ 2023-02-27 09:39 lvye001 阅读(127) 评论(0) 推荐(0) 编辑
摘要: import requests import re import json import time from xlrd import open_workbook from xlutils.copy import copy class TianYanChaSpider(): def __init__( 阅读全文
posted @ 2022-09-16 08:58 lvye001 阅读(373) 评论(0) 推荐(0) 编辑
摘要: import os import requests from tqdm import tqdm VIDEO_PATH = r'videos' def download(url,fname): # 用流stream的方式获取url的数据 resp = requests.get(url, stream= 阅读全文
posted @ 2022-07-18 09:21 lvye001 阅读(172) 评论(0) 推荐(0) 编辑