![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
漂洋过海的鱼a
这个作者很懒,什么都没留下…
展开
-
Python通过SSH隧道连接MySQL/ElasticSearch/Redis等
1. 使用pip install sshtunnel命令安装sshtunnel库2. 话不多说,上代码from sqlalchemy import create_enginefrom elasticsearch import Elasticsearchfrom pandasticsearch import DataFramefrom sshtunnel import SSHTunnelForwarderimport pymysqlimport pandas as pdclass MyObj原创 2021-07-27 16:25:56 · 808 阅读 · 0 评论 -
Python使用新版Edge进行selenium测试自动化
下载驱动 https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/,选择自己浏览器对应的版本下载解压,把解压后的文件夹添加进环境变量path或者记下绝对路径使用pip命令安装两个包:pip install msedge-selenium-tools selenium右键桌面浏览器图标>属性,找到可执行文件的目标位置,我这里是C:\Users\lenovo\AppData\Local\Microsoft\Edge.原创 2020-11-04 16:28:03 · 7197 阅读 · 0 评论 -
Python爬取微博短视频
#!usr/bin/env python3#-*- coding: UTF-8 -*-__auth__='lz'import requests, jsonfrom urllib.parse import urlencodefrom urllib.parse import quote,unquoteimport reimport timebase_url = 'https://m.weibo.cn/api/container/getIndex?'header = { "User原创 2020-07-14 16:16:12 · 1053 阅读 · 1 评论