python自学

Python
博客园固定分类文章抓取

import pymysql import requests import re import random import time import json import html import codecs conn = pymysql.connect(host=’127.0.0.1′, user…

Python
python图片压缩

import requests from PIL import Image import os import flask, json import random def get_size(file): # 获取文件大小:KB size = os.path.getsize(file) return s…