![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
文章平均质量分 79
V__KING__
这个作者很懒,什么都没留下…
展开
-
BeautifulSoup抓取html内容并输出Markdown
参考:pip install BeautifulSoup4pip install fake-useragentpip install requests# -*- coding:utf-8 -*-import html2textimport requestsfrom bs4 import BeautifulSoupimport uuidfrom fake_useragent import UserAgentimport osua = UserAgent()# headers = {原创 2020-11-30 23:45:30 · 649 阅读 · 1 评论 -
python pty模块 - 作用1 - 虚拟一个串口
pty模块是一个虚拟终端库。也可以虚拟出一个串口。在嵌入式开发过程中,你一定有这样一种需求:想在虚拟机上调试串口的通信。那么这个pty库是可以满足你的需求的。#coding=utf-8import ptyimport osimport selectdef mkpty(): #Open a new tty master1, slave = pty.openpty() slaveName1 = os.ttyname(slave) master2, slave =原创 2020-11-18 15:58:35 · 3053 阅读 · 0 评论