python - 让 Python 检测一个站点是否在 PC 上处于活动状态
问题描述
好的,所以我正在制作一个脚本,如果您访问某个站点,它会在 Windows 10 中为您提供通知。
举个例子:你去这样的网站:twitter.com,然后 Python 脚本会检测到它并运行另一个脚本(通知脚本)。
这是通知脚本:
import time
from win10toast import ToastNotifier
toaster = ToastNotifier()
toaster.show_toast("Distracting",
"You are now going on a disstracting site.",
icon_path=None,
duration=5,
threaded=True)
解决方案
推荐阅读
- css - 样式中的 HTL 条件
- sql-server - 在 SQL Select 语句中读取 XML 值
- flutter - 最新文档未在 Firestore 中列出
- node.js - 将 Strapi 部署到 Heroku 时出现应用程序错误,但构建成功?
- python - 函数中的 task.loop 没有显示任何错误,但也无法正常工作
- python - 将张量向量附加到张量矩阵
- python-3.x - Keras-Tuner 运行时错误
- c++ - 嵌套调用的线程安全
- java - 外键在springboot jpa中为null一对多
- python - 如何在不使用 hist() 函数的情况下创建值及其计数的直方图?