
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
webpage_update_checker
Advanced tools
$ vim Gemfile
# Add a line
# gem 'webpage_update_checker'
$ bundle install
or
$ gem install webpage_update_checker
require 'webpage_update_checker'
checker = WebpageUpdateChecker::Client.new
target_page_md5 = WebpageUpdateChecker::Methods::Md5.new(uri: 'http://www.ne.jp/asahi/pursuits/ootsuki/pc/X68k/x680x0.xhtml')
checker.current_comparison_value(target_page_md5) #=> fb2eeb524e6b5637ef7fa4bed48f1d67
require 'webpage_update_checker'
checker = WebpageUpdateChecker::Client.new
target_page_last_modified = WebpageUpdateChecker::Methods::LastModified.new(uri: 'http://www.ne.jp/asahi/pursuits/ootsuki/pc/X68k/x680x0.xhtml')
checker.current_comparison_value(target_page_last_modified) #=> 2008-03-17 16:05:01 +0000
require 'webpage_update_checker'
checker = WebpageUpdateChecker::Client.new
target_page_http_status_code = WebpageUpdateChecker::Methods::HttpStatusCode.new(uri: 'http://www.ne.jp/asahi/pursuits/ootsuki/pc/X68k/x680x0.xhtml')
checker.current_comparison_value(target_page_http_status_code) #=> 200
require 'webpage_update_checker'
checker = WebpageUpdateChecker::Client.new
target_page_md5 = WebpageUpdateChecker::Methods::Md5.new(uri: 'http://www.ne.jp/asahi/pursuits/ootsuki/pc/X68k/x680x0.xhtml')
checker.current_comparison_value(target_page_md5) #=> fb2eeb524e6b5637ef7fa4bed48f1d67
checker.updated?(target_page_md5, previous_comparison_value: 'fb2eeb524e6b5637ef7fa4bed48f1d67') #=> false (not updated)
checker.updated?(target_page_md5, previous_comparison_value: '12345678901234567890123456789012') #=> true (updated)
Lazy Time
comparision means to compare by not accurate datetime but ABOUT datetimeLast-Modified
is 2008-03-18 01:05:01 +0000
and lazy_seconds
is set as '60 * 5', if now getting Last-Modified
is 2008-03-18 01:07:01 +0000
it does NOT regard as 'Updated'
Last-Modified
is 2008-03-18 01:08:02 +0000
it DOES regard as 'Updated'require 'webpage_update_checker'
checker = WebpageUpdateChecker::Client.new
current_time_object = WebpageUpdateChecker::Methods::LastModified.new(uri: 'http://www.ne.jp/asahi/pursuits/ootsuki/pc/X68k/x680x0.xhtml')
previous_comparision_value = '2008-03-18 01:00:01 +0900'
lazy_seconds = 60 * 5
checker.lazy_time_updated?(current_time_object, previous_comparison_value: previous_comparision_value, lazy_seconds: lazy_seconds) #=> false
You can use these Methods
.
You can use these methods in each Methods
.
#updated?(checked_object, previous_comparison_value:)
#=> true or false
#lazy_time_updated?(checked_object, previous_comparison_value:, lazy_seconds:)
#=> true or false
#current_comparison_value(checked_object)
#=> object such as Time (LastModified), String (MD5, SHA512...) or Integer (HTTP status code)
On v1.3.0, the method name that current_diff_value
was changed to current_comparison_value
and the keyword argument name that previous_diff_value
was changed to previous_comparison_value
.
So please use current_comparison_value
method and previous_comparison_value
keyword argument becuase current_diff_value
and previous_diff_value
are deprecated now.
FAQs
Unknown package
We found that webpage_update_checker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.