摘要: var tempForm = document.createElement("form"); tempForm.id = "tempForm1"; tempForm.method = "post"; tempForm.action = url; tempForm.target = "_self"; 阅读全文
posted @ 2021-02-26 10:30 棂信 阅读(229) 评论(0) 推荐(0) 编辑
摘要: var path = HttpContext.Server.MapPath($"~/Temp/文件xls导出{DateTime.Now.ToString("yyyyMMddHHmmssfff")}.xls"); 获取datatable数据... try { Workbook newBook1 = n 阅读全文
posted @ 2020-11-28 14:54 棂信 阅读(243) 评论(0) 推荐(0) 编辑
摘要: using System.ServiceProcess; string serviceName = "WeChat"; string processName = "WeChat"; private void Test1() { List<string> ls = new List<string>() 阅读全文
posted @ 2020-11-28 14:44 棂信 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 发送端: using System.Runtime.InteropServices; //DllImport /*发送消息的结构体*/ [DllImport("User32.dll", EntryPoint = "SendMessage")] private static extern int Se 阅读全文
posted @ 2020-11-28 14:41 棂信 阅读(308) 评论(0) 推荐(0) 编辑
摘要: using System.Windows.Interop;using System.Runtime.InteropServices; //DllImport /*通过这个方法,可以找到主进程的窗体*/ [DllImport("User32.dll", EntryPoint = "FindWindow 阅读全文
posted @ 2020-11-28 14:32 棂信 阅读(447) 评论(0) 推荐(0) 编辑
摘要: using System.Windows.Interop; this.SourceInitialized += new EventHandler(MainWindow_SourceInitialized); protected override void OnSourceInitialized(Ev 阅读全文
posted @ 2020-11-28 14:26 棂信 阅读(524) 评论(0) 推荐(0) 编辑
摘要: pip install selenium //安装 下载geckodriver.exe 放到Python目录,在系统变量添加目录 报错:permission denied(权限不足) pip install --upgrade selenium :由于版本不匹配导致,更新selenium版本 访问页 阅读全文
posted @ 2020-09-30 15:28 棂信 阅读(580) 评论(0) 推荐(0) 编辑
摘要: 安装: pip install requests pip install beautifulsoup4 pip3 install lxml 无需引用 pip3 install easygui pip3 install selenium 引用: import requests 网页请求 from bs 阅读全文
posted @ 2020-09-26 10:08 棂信 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 安装python3 解析器: pip3 install lxml 显式指定解析器: bf = BeautifulSoup(res.text,"lxml") 阅读全文
posted @ 2020-09-23 09:09 棂信 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 设置requests返回值编码: 获取返回值编码:res.encoding :ISO-8859-1 获取文本内容编码:res.apparent_encoding :utf-8 新的字符串str1用于接收编码后的字符串: str1 = res.text.encode(res.encoding).dec 阅读全文
posted @ 2020-09-22 19:33 棂信 阅读(380) 评论(0) 推荐(0) 编辑