用于自动更新CC Cleaner和Adobe Flash Player的Python代码

问题描述 投票:0回答:1
最近最近几个月,我的计算机一直处于运行状态告诉我更新Flash Player,CCleaner总是过时并且通常需要对Bleachbit或Nvidia进行更新。

[我知道https://ninite.com曾经进行过自动更新,但是它们不再用于&,仅用于高级会员/专业会员,这与CCleaner相同。不断检查更新,下载文件,进行我的下载,通过安装程序进行安装等都是很费时间的。这是可以花费的时间。

与这些问题相关的相关问题可以在Stack Exchange和其他站点上找到:

Two Instances of Adobe Flash PlayerFlash Update Notifications

仅包括这些内容,以供其他人参考,因为他们实际上并未解决我试图解决此问题的尝试。加上其中一半已经过时。

我一直在学习PHP和Javascript,但到目前为止还没有学到很多python。任何人都可以给我一个大致的起点,以了解如何构建python代码来检查系统上这些不同应用程序的更新。

我正在使用Windows 10,带有firefox开发人员版。不是在寻找完整的脚本,而只是指针的起点和有关如何解决此问题的帮助或有价值的辩论。

一些可以帮助我构建脚本的问题和资源:Python List installed programsAsynchronous Web CrawlerCustom Exception HandlingManage all maintenance-work on my pcAutomate the Boring Stuff with PythonPreparing & Automating stuffProcess handlingUrllib Docs

这是我到目前为止的脚本

try: import os import logging import selenium except: print("Error importing initials") else: try: from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.expected_conditions import presence_of_element_located except: print("Error importing from") from selenium.webdriver.firefox import Options from selenium.webdriver.firefox.firefox_binary import FirefoxBinary

我知道这是不正确的,但是我无法获取Sublime txt 3来输出python错误以及我使用过的任何形式的在线Python验证工具都会吐出一个到达进口硒时立即出错。

我想构建一个脚本,每两周可以双击一次,打开Firefox,检查哪些应用程序已过时,然后根据需要进行更新。

我已经将Adobe Flash Player设置为自动更新,但是它只是忽略了我并采取p ***,请发表评论或分享有帮助的文章。

想想我可能必须安装gecko驱动程序api,但是对此100%肯定。

这是到目前为止,通过pip install安装了硒。 Python 3.7已安装。设法使Sublime文本编辑器3开始通过tools > build system > Python 3将错误的内容输出到构建文件中,现在再次卡住了。将会随着我的了解而更新。

import os import logging import selenium from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import NoSuchElementException def user_input_progs(programs, params): # User Select Parameters. def is_element_present(self, how, what): # Test if C drive is present or been renamed. # Search for the programs in the os/c:directory. # Test programs. os.path.isdir(C) # def runFFtest(): # fallback to chrome, safari, opera.

再次卡住。 

刚刚找到这些资源来尝试获取程序的版本号:PyWin32 get Version number of an ApplicationSO Q? How to Access File PropertiesSO Q? Finding the Version of an Application Through Python

我需要做的是在我的OS上创建一个程序路径的文件路径数组,这些程序需要定期进行更新,最好使用某种UI来编辑或更新此列表,搜索“我的OS C驱动器:所有程序文件”。 exe文件,并将其与所选文件匹配,使用URLLib或webdriver&Beautyfull Soup刮擦这些公司的网站,以对照当前安装的版本号检查版本号,然后在必要时获取下载并自动执行安装过程。更多资源:

[尝试通过pip安装来安装win32api,但找不到正确的版本来安装这些版本:pywin32, pypiwin32, pypiwin32-223, pywin32-227仍需要更多研究...

python updates software-update firefox-quantum
1个回答
0
投票
如果不是那么简单,请原谅,但是您是否不能将程序设置为在其设置中自动更新?*对,我重新阅读了您的问题,看到您提到CCleaner如果不购买Pro版本就无法自动更新。抱歉,没关系哈哈
© www.soinside.com 2019 - 2024. All rights reserved.