<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[getcomputerstyle的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/getcomputerstyle</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; getcomputerstyle]]></copyright><item><title><![CDATA[django设置samesite]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/115372835</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/115372835</guid><author>getcomputerstyle</author><pubDate>Thu, 01 Apr 2021 14:10:19 +0800</pubDate><description><![CDATA[较新版本的chrome会因samesite策略而禁止跨域的cookie
解决方法在项目中的setting.py设置：
SESSION_COOKIE_SAMESITE = 'None'
SESSION_COOKIE_SECURE = True

网上的方法都不行，看了一下官网的文档，注意要把SESSION_COOKIE_SAMESITE设置为字符串"None"

...]]></description><category></category></item><item><title><![CDATA[softmock-基于mitmproxy实现系统性管理maplocal]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/113780490</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/113780490</guid><author>getcomputerstyle</author><pubDate>Wed, 10 Feb 2021 11:31:12 +0800</pubDate><description><![CDATA[softmock
介绍
softmock 是一个拦截 http/https 到本地的工具。
请求拦截到本地之后，可以进行修改、新增等操作，使下次请求直接返回到本地的数据。而不依赖远程服务器。
softmock 是从 抓包工具mitmproxy 经过修改，重构实现
前端地址：softmock-template
快速上手
1.安装准备
在使用之前请先使 python 的版本至少为 python3.8
python 官网
2.安装
pip install softmock

3.使用
监听 host
softmo]]></description><category></category></item><item><title><![CDATA[uniapp 页面跳转出现闪屏、短暂白屏的解决办法]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/105065090</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/105065090</guid><author>getcomputerstyle</author><pubDate>Tue, 24 Mar 2020 10:04:00 +0800</pubDate><description><![CDATA[在项目pages.json里设置页面的背景色和页面中page或container的背景色一致即可解决这个问题。


{  

    "path": "pages/ecosystem/index",  

    "style": {  

        "navigationBarTitleText": "生态",  

        "app-plus": {  

           ...]]></description><category></category></item><item><title><![CDATA[python ahttp：简单、高效、异步requests请求模块]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/103014896</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/103014896</guid><author>getcomputerstyle</author><pubDate>Mon, 11 Nov 2019 18:41:23 +0800</pubDate><description><![CDATA[ahttp：简单、高效、异步requests请求模块
ahttp 是一个所有的http连接请求均使用协程的方式。 使请求过程中 IO 操作交给其他硬件，而CPU专注于处理计算型任务，可以大量的节约等待的时间。
适用版本： PYTHON 3.7
快速开始
安装
你可以通过以下方式快速安装：
pip install ahttp

单个请求
使用是非常简单的：
import ahttp 

url = ...]]></description><category></category></item><item><title><![CDATA[centos 安装 requests-html render报错]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/102612461</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/102612461</guid><author>getcomputerstyle</author><pubDate>Thu, 17 Oct 2019 18:24:02 +0800</pubDate><description><![CDATA[报错的原因有很多，以下是针对已经安装chrome但是执行报错的解决方法：

安装依赖，执行以下命令


yum install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXS...]]></description><category></category></item><item><title><![CDATA[Mac ssh记住ip和密码]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/101565260</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/101565260</guid><author>getcomputerstyle</author><pubDate>Sat, 28 Sep 2019 01:13:34 +0800</pubDate><description><![CDATA[需求
mac的terminal很方便进行远程ssh链接，但是却每一次????都要输入密码，很麻烦，尤其是管理多台服务器的时候。
所以如果能记住密码是再好不过了，直接进行连接和登录。
解决方案
Linux系统是自带Python 2.7的，Mac OS也不例外，可以在终端中输入 python -V以查看python的版本
由于Python具有很好的易操作性，所以可以使用Python来实现ssh的快捷登录。
...]]></description><category></category></item><item><title><![CDATA[微信小程序客服消息中文乱码踩的坑]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/91472356</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/91472356</guid><author>getcomputerstyle</author><pubDate>Tue, 11 Jun 2019 21:50:49 +0800</pubDate><description><![CDATA[一般很少遇到字符编码的问题，默认都是utf8，但是这次小程序却是遇到了小程序的客服前端不解码的问题。
收到一大堆经过unicode编码的中文，看了一下文档，小程序不像正常的解析中文的程序，会默认把unicode进行转码，所以在用django处理的时候注意对中文的转码：
    requests.post(url, data=json.dumps({
            "touser":ope...]]></description><category></category></item><item><title><![CDATA[python使用位运算实现整数加法运算]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/90636279</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/90636279</guid><author>getcomputerstyle</author><pubDate>Tue, 28 May 2019 12:20:11 +0800</pubDate><description><![CDATA[位运算是二进制的一种基础运算，在生产中经常用来加密。下面是使用Python位运算来实现加法运算：

主要用到三个位运算符：异或^，和与&amp;、左移位&lt;&lt;。对于异或，同位置数字不同则为1，相同则为0：


2^1 = 3  ==&gt; 0010 ^ 0001 = 0011
2^2 = 0  ==&gt; 0010 ^ 0010 = 0000
3^5 = 6  ==&gt; 0011...]]></description><category></category></item><item><title><![CDATA[2019年DigitalOcean最新优惠券赠送100美元]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/89076385</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/89076385</guid><author>getcomputerstyle</author><pubDate>Sun, 07 Apr 2019 22:14:14 +0800</pubDate><description><![CDATA[https://www.digitalocean.com/?refcode=bacf96ec0bc8





注册后，账户里会有100美元。
]]></description><category></category></item><item><title><![CDATA[Centos7.X   Django+uwsgi+nginx配置]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/88856913</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/88856913</guid><author>getcomputerstyle</author><pubDate>Wed, 27 Mar 2019 23:11:52 +0800</pubDate><description><![CDATA[1.安装

pip install uwsgi django

nginx安装请参考其他博文

安装的uwsgi创建一个全局环境的命令：

ln -s /usr/local/python3/bin/uwsgi /usr/bin/

2.配置

1.新建一个名字为test的django项目

python3 -m djangostartproject /var/www/test

2.在test项...]]></description><category></category></item><item><title><![CDATA[CentOS 7.X 安装Mysql8.0和NodeJS]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/88837501</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/88837501</guid><author>getcomputerstyle</author><pubDate>Wed, 27 Mar 2019 19:43:53 +0800</pubDate><description><![CDATA[安装Mysql

1.下载Mysql

去mysql官网下载最新的mysql


https://dev.mysql.com/downloads/mysql/#downloads

Select Operating System选择 Linux-Generic

64位的选择(mysql-8.0.15-linux-glibc2.12-x86_64.tar)

开始下载

2.解压


tar -...]]></description><category></category></item><item><title><![CDATA[iphone ios使用fiddler手机抓包https不能安装证书]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/88753373</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/88753373</guid><author>getcomputerstyle</author><pubDate>Fri, 22 Mar 2019 23:21:04 +0800</pubDate><description><![CDATA[除手机自带的safari浏览器外都不能正确的安装证书，所以只能用safari打开证书即可解决。
]]></description><category></category></item><item><title><![CDATA[mysql插入数据报Incorrect string value: '\\xF0\\x9F\\x8C\\xBC\\xE5\\xB0...' for column错误]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/88724362</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/88724362</guid><author>getcomputerstyle</author><pubDate>Thu, 21 Mar 2019 20:08:21 +0800</pubDate><description><![CDATA[这个错误是因为数据库字段的charset是utf8，但却插入了含有四个字节单位的字符引起的，通常是emoji表情。

解决办法：

1.修改数据库的character为 utf8mb4 并且 collate 为 utf8mb4_unicode_ci 以至支持四个字节的字符

2.普通utf8仅支持3个字节的字符，所以过滤插入数据库中的字符串。Python如下


from functools im...]]></description><category></category></item><item><title><![CDATA[centos startx报错Errors from xkbcomp are not fatal to the X server]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/84938344</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/84938344</guid><author>getcomputerstyle</author><pubDate>Mon, 10 Dec 2018 13:17:49 +0800</pubDate><description><![CDATA[最近在做淘宝联盟的自动登录，需要图形界面跳过验证码。安装了图形界面报错如下：

(==) Log file: &quot;/var/log/Xorg.0.log&quot;, Time: Mon Dec 10 13:05:11 2018
(==) Using config directory: &quot;/etc/X11/xorg.conf.d&quot;
(==) Using system config directory &quot;/us...]]></description><category></category></item><item><title><![CDATA[解决新版2.X django url路由不能匹配正则路径]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/82469963</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/82469963</guid><author>getcomputerstyle</author><pubDate>Thu, 06 Sep 2018 23:31:55 +0800</pubDate><description><![CDATA[
from django.urls import path, re_path #导入re_path

urlpatterns = [
    path('admin/', admin.site.urls),
	re_path(r'\d/\d/', test.test), #使用re_path代替path 即可匹配正则
]

 ]]></description><category></category></item><item><title><![CDATA[wxpy识别语音消息]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/78488763</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/78488763</guid><author>getcomputerstyle</author><pubDate>Thu, 09 Nov 2017 13:41:59 +0800</pubDate><description><![CDATA[wxpy识别语音消息1.wxpywxpy是一个模拟微信网页版登录，从而实现的一系列将微信网页版功能自动化的一个模块。github：https://github.com/youfou/wxpy2.前期准备
目前的wxpy还没有内置语音处理的功能，接入wxpy之后，别人发送语音消息，是以一个语音文件的形式发送来的
不同于手机微信语音的是，手机上语音格式默认是amr格式，而网页版微信的语音发过来是mp3格]]></description><category></category></item><item><title><![CDATA[ahttp：基于协程的 Http 请求库]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/78453337</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/78453337</guid><author>getcomputerstyle</author><pubDate>Sun, 05 Nov 2017 22:46:35 +0800</pubDate><description><![CDATA[ahttp：基于协程的 Http 请求库ahttp 是一个使用 aiohttp 和 asyncio 为基础进行封装的库，所有的http连接请求均使用协程的方式。 使请求过程中 IO 操作交给其他硬件，而CPU专注于处理计算型任务，可以大量的节约等待的时间。快速上手安装你可以通过以下方式快速安装：pip install ahttp
使用使用是非常简单的：import ahttpurls = []]></description><category></category></item><item><title><![CDATA[Grequests VS aiohttp+asyncio]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/78446892</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/78446892</guid><author>getcomputerstyle</author><pubDate>Sat, 04 Nov 2017 22:59:56 +0800</pubDate><description><![CDATA[1. grequests
什么是grequests 
grequests 是基于 requests 和 gevent 的一个第三方库，详细使用请见 github 地址 ，和aiohttp相同的是，同样是使用的纯协程
使用 grequests 获取 51wady.com 的电影列表。源码获得后，此处不在分析源码，只获取这个页面的字符数，代码如下：
import grequests,timenowtim]]></description><category></category></item><item><title><![CDATA[使用 aiohttp 和 asyncio 进行异步请求]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/78438246</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/78438246</guid><author>getcomputerstyle</author><pubDate>Fri, 03 Nov 2017 18:20:40 +0800</pubDate><description><![CDATA[使用协程的异步请求以其低时消耗和对硬件的高利用而著称，翻看了很多论坛，发现协程在进行爬虫以及高频网络请求时的耗时比单多进程和单多线程还要好。本文将使用requests和使用aiohttp+asyncio进行比较，比较一下具体使用协程和不使用协程能差距多少。
本文测试所使用目标网址是廖雪峰老师python3教程的评论页 目前一共有2318页。
1.使用requests获取单个网址
import]]></description><category></category></item><item><title><![CDATA[CentOS安装邮件服务器]]></title><link>https://blog.youkuaiyun.com/getcomputerstyle/article/details/78309443</link><guid>https://blog.youkuaiyun.com/getcomputerstyle/article/details/78309443</guid><author>getcomputerstyle</author><pubDate>Sun, 22 Oct 2017 13:06:06 +0800</pubDate><description><![CDATA[系统要求


Warning

阿里云封禁了邮件服务所必须的 25 端口，因此您不能使用阿里云来部署邮件服务器。



Warning

iRedMail 只针对全新安装的操作系统设计，它要求你的操作系统上 没有 事先 安装邮件服务相关的组件，例如 MySQL，OpenLDAP，Postfix，Amavisd，等。 iRedMail 会自动安装和配置邮件服务所需的组件，因此如]]></description><category></category></item></channel></rss>