精品美女吧 爬虫 Verson: 23.04.16 Blog: http://www.h4ck.org.cn **************************************************************************************************** USAGE: spider -h <help> -a <all> -q <search> -e <early stop> Arguments: -a <download all site images> -h <display help text, just this> Option Arguments: -p <image download path> -r <random index category list> -c <single category url> -e <early stop, work in site crawl mode only> -s <site url eg: https://www.jpxgmn.net (no last backslash "/")> ****************************************************************************************************
requests SSLCertVerificationError

Traceback (most recent call last): File "requests\adapters.py", line 439, in send File "urllib3\connectionpool.py", line 785, in urlopen File "urllib3\util\retry.py", line 592, in increment urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.jpmn8.cc', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)')))
jinjia2 UnrecognizedImageError()
Stable Diffusion AI 图像生成
之前在明眸如初,看到了一篇文章,关于ai生成图片的。恰好比较感兴趣,于是就想着尝试一下。其实整体的安装步骤,已经这篇文章已经写的比较清楚了。可以照搬,一般问题不大。这里记录下我的安装方法。
由于系统的anaconda比较老旧,安装的python版本也不对应,导致通过conda创建的虚拟环境安装失败了,Stable Diffusion web UI推荐的python环境为3.10.6,所以直接下载了这个版本安装,下载地址:https://www.python.org/downloads/windows/,由于电脑上的python版本比较多,也不想把这个东西加到系统变量的path内,所以可以直接通过运行指定的python可执行文件创建venv。
修改 Uptime-Kuma主题样式
虽然Uptime-Kuma有自定义css代码的地方,但是作为一个不会前端的全栈工程师,想要修改下样式感觉亚历山大。极其不友好啊,于是就想着看有没有现成的代码可以抄一下,搜索了一下找到了这个网站:https://docs.theme-park.dev/themes/uptime-kuma/
若依Django框架soft-delete导致的数据查询异常
在model中定义一个设备分组:
class DeviceGroup(CoreModel): name = models.CharField(blank=False, null=False, max_length=64, help_text='名称') dept = models.ForeignKey(Dept, blank=True, null=True, on_delete=models.CASCADE, help_text='部门') parent = models.ForeignKey('self', null=True, blank=True, related_name='children', verbose_name='上级分组', on_delete=models.SET_NULL) is_root = models.BooleanField(default=False, help_text='是否根目录') index = models.IntegerField(default=0, help_text='排序索引') function_field = models.JSONField(blank=True, null=True, help_text='默认代码') function_text = models.TextField(blank=True, null=True, help_text='默认代码文本') is_show = models.BooleanField(default=True, help_text='是否显示')
爱看美女网爬虫【群辉Docker】【23.03.02】
在群辉下通过pyinstaller编译py文件会出现各种问题。首先是没有binutils,如果要安装这个工具包,需要安装包管理器ipkg。在确定系统处理器架构之后即可安装对应的包管理下,命令如下:
wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/stable/syno-i686-bootstrap_1.2-7_i686.xsh chmod +x syno-i686-bootstrap_1.2-7_i686.xsh sh syno-i686-bootstrap_1.2-7_i686.xsh
安装完成之后即可通过ipkg进行包管理了,
ipkg install binutils
Python生成Pdf报告
生成报告这个功能应该也有很多办法。因为我不会前端相关的开发,所以只能尝试用python来生成pdf报告。在实际使用的过程中发现现有的操作pdf的库体验都不是很好。所以改变策略尝试两步来实现pdf生成:
1.通过jinja2库操作doc文档根据模板生成相关的word文档
2.通过openoffice或者其他的命令行工具生成pdf,这是常规做法。还有另外一个办法就是通过oss的pdf转换功能生成pdf,这么做的好处是生成完了直接可以顺便生成一个下载链接,可以直接使用。