摘要:
import requests import json import os ''' 上传文件进行压缩并获取返回压缩后的图片地址 ''' def get_down_url(file_path): url = 'https://tinypng.com/web/shrink' with open(file 阅读全文
posted @ 2020-06-05 13:06
前端小鑫同学
阅读(11)
评论(0)
推荐(0)
摘要:
示例 : from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium. 阅读全文
posted @ 2020-06-05 13:06
前端小鑫同学
阅读(14)
评论(0)
推荐(0)
摘要:
Scrapyd-DOC [TOC] 安装 pip install scrapyd API daemonstatus.json 检查服务的负载状态 示例请求: curl http://localhost:6800/daemonstatus.json 响应示例: { "status": "ok", "r 阅读全文
posted @ 2020-06-05 13:05
前端小鑫同学
阅读(24)
评论(0)
推荐(0)
摘要:
Requests # 导入requests包 import requests # get请求 r = requests.get('https://www.toutiao.com/stream/widget/local_weather/data/?city=北京') # 输出文本内容 print(r. 阅读全文
posted @ 2020-06-05 13:04
前端小鑫同学
阅读(12)
评论(0)
推荐(0)
摘要:
from requests_html import HTMLSession from urllib.request import unquote import os ''' redmine系统通过bug号解析页面内容及下载附件 ''' base_url = '' cookies = dict( _r 阅读全文
posted @ 2020-06-05 13:04
前端小鑫同学
阅读(9)
评论(0)
推荐(0)
摘要:
Python字典Dictionary 特点: 1.可变容器模型; 2.存储任意类型对象; 3.key不一定唯一,如重复按最后出现的计算; 4.键必须不可变,所以可以用数字,字符串或元组充当,所以用列表就不行 格式:{'k1':'v1','k2':'v2','k3':'v3'} 基本操作 定义一个字典 阅读全文
posted @ 2020-06-05 13:03
前端小鑫同学
阅读(15)
评论(0)
推荐(0)
摘要:
mongod --auth --dbpath="/usr/local/mongodb/data" --logpath="/usr/local/mongodb/logs/mongod.log" --install #创建admin数据表 use admin #创建管理用户的用户 db.createUs 阅读全文
posted @ 2020-06-05 13:03
前端小鑫同学
阅读(6)
评论(0)
推荐(0)
摘要:
''' 将浏览器复制后的请求头转为字典 ''' def headers_raw_to_dict(headers_raw): if headers_raw is None: return None headers = headers_raw.splitlines() headers_tuples = 阅读全文
posted @ 2020-06-05 13:02
前端小鑫同学
阅读(21)
评论(0)
推荐(0)
摘要:
环境:ubuntu-14.04.3(预装python3.4) 1.flask(Web框架) 2.gunicorn(python Wsgi http server) 1.安装 sudo pip3 install gunicorn 2.修改入口文件 from werkzeug.contrib.fixer 阅读全文
posted @ 2020-06-05 13:01
前端小鑫同学
阅读(19)
评论(0)
推荐(0)
摘要:
cos sdk 安装 sdkname = cos-python-sdk-v5 腾讯云COSV5Python SDK, 目前可以支持Python2.6与Python2.7 pip安装指南: pip install -U cos-python-sdk-v5 cos最新可用地域,参照 https://ww 阅读全文
posted @ 2020-06-05 13:00
前端小鑫同学
阅读(55)
评论(0)
推荐(0)

浙公网安备 33010602011771号