File tree Expand file tree Collapse file tree 7 files changed +9
-13
lines changed Expand file tree Collapse file tree 7 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ class Docker < UrlScraper
96
96
97
97
def get_latest_version ( opts )
98
98
doc = fetch_doc ( 'https://docs.docker.com/engine/release-notes/' , opts )
99
- latest_version = doc . at_css ( '.DocSearch-content > h2 > a' ) . content . strip
99
+ latest_version = doc . at_css ( 'h2.scroll-mt-20 > a' ) . content . strip
100
100
latest_version . rpartition ( ' ' ) [ -1 ]
101
101
end
102
102
end
Original file line number Diff line number Diff line change @@ -47,8 +47,7 @@ class Meteor < UrlScraper
47
47
end
48
48
49
49
def get_latest_version ( opts )
50
- doc = fetch_doc ( 'https://docs.meteor.com/#/full/' , opts )
51
- doc . at_css ( 'select.version-select > option' ) . content
50
+ get_npm_version ( 'meteor' , opts )
52
51
end
53
52
end
54
53
end
Original file line number Diff line number Diff line change @@ -23,9 +23,7 @@ class Nix < UrlScraper
23
23
24
24
def get_latest_version ( opts )
25
25
doc = fetch_doc ( 'https://nixos.org/manual/nix/stable/' , opts )
26
- json = JSON . parse ( doc . at_css ( 'body' ) [ 'data-nix-channels' ] )
27
- channel = json . find { |c | c [ 'channel' ] == 'stable' }
28
- channel [ 'version' ]
26
+ doc . at_css ( 'a.active' ) [ 'href' ] . scan ( /([0-9.]+)/ ) [ 0 ] [ 0 ]
29
27
end
30
28
end
31
29
end
Original file line number Diff line number Diff line change @@ -77,8 +77,8 @@ class Phpunit < UrlScraper
77
77
78
78
def get_latest_version ( opts )
79
79
doc = fetch_doc ( 'https://phpunit.readthedocs.io/' , opts )
80
- label = doc . at_css ( '.rst-current- version' ) . content . strip
81
- label . scan ( /v: ([0-9.]+)/ ) [ 0 ] [ 0 ]
80
+ label = doc . at_css ( 'meta[name="readthedocs- version-slug"]' ) [ " content" ]
81
+ label
82
82
end
83
83
84
84
end
Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ class Redis < UrlScraper
22
22
23
23
def get_latest_version ( opts )
24
24
body = fetch ( 'http://download.redis.io/redis-stable/00-RELEASENOTES' , opts )
25
- body = body . lines [ 1 ..-1 ] . join
26
- body . scan ( /Redis ([0-9.]+)/ ) [ 0 ] [ 0 ]
25
+ body . scan ( /Redis Community Edition ([0-9.]+)/ ) [ 0 ] [ 0 ]
27
26
end
28
27
29
28
private
Original file line number Diff line number Diff line change @@ -20,13 +20,13 @@ class Sass < UrlScraper
20
20
© 2006–2024 the Sass team, and numerous contributors< br >
21
21
Licensed under the MIT License.
22
22
HTML
23
-
24
- private
25
23
26
24
def get_latest_version ( opts )
27
25
get_npm_version ( 'sass' , opts )
28
26
end
29
27
28
+ private
29
+
30
30
def parse ( response )
31
31
response . body . gsub! '<span class="widont"> </span>' , ' '
32
32
end
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class Trio < UrlScraper
25
25
26
26
def get_latest_version ( opts )
27
27
doc = fetch_doc ( 'https://trio.readthedocs.io/en/stable/' , opts )
28
- doc . at_css ( '.rst-other-versions a[href^="/en/v"] ' ) . content [ 1 ..-1 ]
28
+ doc . at_css ( 'div.trio-version ' ) . content [ 0 ..-1 ]
29
29
end
30
30
end
31
31
end
You can’t perform that action at this time.
0 commit comments