Real-time software update module calls the Web Crawler

Real-time software update module calls the Web Crawler


My Blog [my blog]: New blog Zero cloud - Yun Yi campus plan

You can learn Oh! ! !


1. Real-time update ideas

Now the definition of this software version number, each time you open the software crawls the specified page content (pre-set), if the version number on the page! = Current version number, software updates automatically jump to the page, and destruction procedures.

That does not update to the latest version, it can not be used. (Also may be modified to be used is not updated)
Will destroy () removed


2. Code Analysis

1. Define the version number is: the GUI-1.0.2
2. then crawled webpage: http: //www.xingly.cn/version.html this amend its own
website content into the latest version.

1. build their ownOnline update pagewithThe latest version website
2. The need to use Lean module Reads page text function


3. The source -E

.版本 2
.支持库 internet
.支持库 eAPI

.程序集 窗口程序集_启动窗口
.程序集变量 源码, 文本型
.程序集变量 版本号, 文本型

.子程序 __启动窗口_创建完毕
版本号 = “GUI-1.0.2”
源码 = 到文本 (HTTP读文件 (“http://www.xingly.cn/version.html”))
.如果 (文本_取出中间文本 (源码, “<title>”, “</title>) ≠ 版本号)
    信息框 (“当前版本号:” + 版本号 + “    最新版本号:” + 文本_取出中间文本 (源码, “<title>”, “</title>), 1, “”, )
    信息框 (“非最新版本,请更新至最新版本!”, 0, “错误警告,请更新!”, #错误图标)
    打开指定网址 (“http://www.xingly.cn/version.html”)
    销毁 ()

.否则
    信息框 (“当前版本号:” + 版本号 + “    最新版本号:” + 文本_取出中间文本 (源码, “<title>”, “</title>), 1, “检查更新中......”, )
    信息框 (“已是最新版本!”, 0, “欢迎使用”, )

4. Test Screenshot

Here Insert Picture Description

Here Insert Picture Description
Here Insert Picture Description

Published 45 original articles · won praise 46 · views 8308

Guess you like

Origin blog.csdn.net/xg987599519/article/details/104214898