Skip to content

Commit 1c8a122

Browse files
authored
fix: adjust feed configs to not use deprecated syntax and cleanup (#248)
* fix: config handling * test: improve error messages for fetched config * feat: migrate to published_at * feat: migrate from link to url * feat: migrate to post_process array syntax * feat: remove broken configs * fix: syntax changed on adfc pms * chore: use html2rss from master branch * style: apply rubocop autocorrections * spec: prevent frozen string error * feat: sanitize_html is called automatically for description
1 parent 6aadc0c commit 1c8a122

109 files changed

Lines changed: 272 additions & 373 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ source 'https://rubygems.org'
44

55
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
66

7+
gem 'html2rss', github: 'html2rss/html2rss', branch: :master
8+
79
group :development do
810
# gem 'html2rss-generator', path: '../generator'
911
gem 'html2rss-generator', github: 'html2rss/generator', branch: :main

Gemfile.lock

Lines changed: 113 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
22
remote: https://github.com/html2rss/generator
3-
revision: 3a00f3c618ba6e548334180e53f3a3506da090a3
3+
revision: 05bca799648034e8937e08baaa47b03af4aed5b0
44
branch: main
55
specs:
66
html2rss-generator (0.1.0)
@@ -10,6 +10,29 @@ GIT
1010
tty-markdown
1111
tty-prompt
1212

13+
GIT
14+
remote: https://github.com/html2rss/html2rss
15+
revision: 70540c7d2accdfab85fb52d3839b31a615ffe3b3
16+
branch: master
17+
specs:
18+
html2rss (0.17.0)
19+
addressable (~> 2.7)
20+
dry-validation
21+
faraday (> 2.0.1, < 3.0)
22+
faraday-follow_redirects
23+
kramdown
24+
mime-types (> 3.0)
25+
nokogiri (>= 1.10, < 2.0)
26+
parallel
27+
puppeteer-ruby
28+
regexp_parser
29+
reverse_markdown (~> 3.0)
30+
rss
31+
sanitize
32+
thor
33+
tzinfo
34+
zeitwerk
35+
1336
PATH
1437
remote: .
1538
specs:
@@ -21,11 +44,48 @@ GEM
2144
specs:
2245
addressable (2.8.7)
2346
public_suffix (>= 2.0.2, < 7.0)
24-
ast (2.4.2)
25-
concurrent-ruby (1.3.4)
47+
ast (2.4.3)
48+
base64 (0.2.0)
49+
bigdecimal (3.1.9)
50+
concurrent-ruby (1.3.5)
2651
crass (1.0.6)
27-
diff-lcs (1.5.1)
28-
faraday (2.12.2)
52+
diff-lcs (1.6.2)
53+
dry-configurable (1.3.0)
54+
dry-core (~> 1.1)
55+
zeitwerk (~> 2.6)
56+
dry-core (1.1.0)
57+
concurrent-ruby (~> 1.0)
58+
logger
59+
zeitwerk (~> 2.6)
60+
dry-inflector (1.2.0)
61+
dry-initializer (3.2.0)
62+
dry-logic (1.6.0)
63+
bigdecimal
64+
concurrent-ruby (~> 1.0)
65+
dry-core (~> 1.1)
66+
zeitwerk (~> 2.6)
67+
dry-schema (1.14.1)
68+
concurrent-ruby (~> 1.0)
69+
dry-configurable (~> 1.0, >= 1.0.1)
70+
dry-core (~> 1.1)
71+
dry-initializer (~> 3.2)
72+
dry-logic (~> 1.5)
73+
dry-types (~> 1.8)
74+
zeitwerk (~> 2.6)
75+
dry-types (1.8.2)
76+
bigdecimal (~> 3.0)
77+
concurrent-ruby (~> 1.0)
78+
dry-core (~> 1.0)
79+
dry-inflector (~> 1.0)
80+
dry-logic (~> 1.4)
81+
zeitwerk (~> 2.6)
82+
dry-validation (1.11.1)
83+
concurrent-ruby (~> 1.0)
84+
dry-core (~> 1.1)
85+
dry-initializer (~> 3.2)
86+
dry-schema (~> 1.14)
87+
zeitwerk (~> 2.6)
88+
faraday (2.13.1)
2989
faraday-net_http (>= 2.0, < 3.5)
3090
json
3191
logger
@@ -34,95 +94,84 @@ GEM
3494
faraday-net_http (3.4.0)
3595
net-http (>= 0.5.0)
3696
hashie (5.0.0)
37-
html2rss (0.16.0)
38-
addressable (~> 2.7)
39-
faraday (> 2.0.1, < 3.0)
40-
faraday-follow_redirects
41-
kramdown
42-
mime-types (> 3.0)
43-
nokogiri (>= 1.10, < 2.0)
44-
parallel
45-
puppeteer-ruby
46-
regexp_parser
47-
reverse_markdown (~> 3.0)
48-
rss
49-
sanitize (~> 6.0)
50-
thor
51-
tzinfo
52-
zeitwerk (~> 2.6.0)
5397
htmlbeautifier (1.4.3)
54-
json (2.9.1)
98+
json (2.12.2)
5599
kramdown (2.5.1)
56100
rexml (>= 3.3.9)
57-
language_server-protocol (3.17.0.3)
58-
logger (1.6.4)
59-
mime-types (3.6.0)
101+
language_server-protocol (3.17.0.5)
102+
lint_roller (1.1.0)
103+
logger (1.7.0)
104+
mime-types (3.7.0)
60105
logger
61-
mime-types-data (~> 3.2015)
62-
mime-types-data (3.2024.1203)
106+
mime-types-data (~> 3.2025, >= 3.2025.0507)
107+
mime-types-data (3.2025.0527)
63108
net-http (0.6.0)
64109
uri
65-
nokogiri (1.16.7-arm64-darwin)
110+
nokogiri (1.18.8-arm64-darwin)
66111
racc (~> 1.4)
67-
nokogiri (1.16.7-x86_64-darwin)
112+
nokogiri (1.18.8-x86_64-darwin)
68113
racc (~> 1.4)
69-
nokogiri (1.16.7-x86_64-linux)
114+
nokogiri (1.18.8-x86_64-linux-gnu)
70115
racc (~> 1.4)
71-
parallel (1.26.3)
72-
parser (3.3.4.2)
116+
parallel (1.27.0)
117+
parser (3.3.8.0)
73118
ast (~> 2.4.1)
74119
racc
75120
pastel (0.8.0)
76121
tty-color (~> 0.5)
77-
public_suffix (6.0.1)
122+
prism (1.4.0)
123+
public_suffix (6.0.2)
78124
puppeteer-ruby (0.45.6)
79125
concurrent-ruby (>= 1.1, < 1.4)
80126
mime-types (>= 3.0)
81127
websocket-driver (>= 0.6.0)
82128
racc (1.8.1)
83129
rainbow (3.1.1)
84-
regexp_parser (2.9.3)
130+
regexp_parser (2.10.0)
85131
reverse_markdown (3.0.0)
86132
nokogiri
87-
rexml (3.4.0)
88-
rouge (4.3.0)
89-
rspec (3.13.0)
133+
rexml (3.4.1)
134+
rouge (4.5.2)
135+
rspec (3.13.1)
90136
rspec-core (~> 3.13.0)
91137
rspec-expectations (~> 3.13.0)
92138
rspec-mocks (~> 3.13.0)
93-
rspec-core (3.13.0)
139+
rspec-core (3.13.4)
94140
rspec-support (~> 3.13.0)
95-
rspec-expectations (3.13.1)
141+
rspec-expectations (3.13.5)
96142
diff-lcs (>= 1.2.0, < 2.0)
97143
rspec-support (~> 3.13.0)
98-
rspec-mocks (3.13.1)
144+
rspec-mocks (3.13.5)
99145
diff-lcs (>= 1.2.0, < 2.0)
100146
rspec-support (~> 3.13.0)
101-
rspec-support (3.13.1)
147+
rspec-support (3.13.4)
102148
rss (0.3.1)
103149
rexml
104-
rubocop (1.65.1)
150+
rubocop (1.75.8)
105151
json (~> 2.3)
106-
language_server-protocol (>= 3.17.0)
152+
language_server-protocol (~> 3.17.0.2)
153+
lint_roller (~> 1.1.0)
107154
parallel (~> 1.10)
108155
parser (>= 3.3.0.2)
109156
rainbow (>= 2.2.2, < 4.0)
110-
regexp_parser (>= 2.4, < 3.0)
111-
rexml (>= 3.2.5, < 4.0)
112-
rubocop-ast (>= 1.31.1, < 2.0)
157+
regexp_parser (>= 2.9.3, < 3.0)
158+
rubocop-ast (>= 1.44.0, < 2.0)
113159
ruby-progressbar (~> 1.7)
114-
unicode-display_width (>= 2.4.0, < 3.0)
115-
rubocop-ast (1.32.0)
116-
parser (>= 3.3.1.0)
117-
rubocop-performance (1.21.1)
118-
rubocop (>= 1.48.1, < 2.0)
119-
rubocop-ast (>= 1.31.1, < 2.0)
120-
rubocop-rspec (3.0.4)
121-
rubocop (~> 1.61)
160+
unicode-display_width (>= 2.4.0, < 4.0)
161+
rubocop-ast (1.44.1)
162+
parser (>= 3.3.7.2)
163+
prism (~> 1.4)
164+
rubocop-performance (1.25.0)
165+
lint_roller (~> 1.1)
166+
rubocop (>= 1.75.0, < 2.0)
167+
rubocop-ast (>= 1.38.0, < 2.0)
168+
rubocop-rspec (3.6.0)
169+
lint_roller (~> 1.1)
170+
rubocop (~> 1.72, >= 1.72.1)
122171
ruby-progressbar (1.13.0)
123-
sanitize (6.1.3)
172+
sanitize (7.0.0)
124173
crass (~> 1.0.2)
125-
nokogiri (>= 1.12.0)
174+
nokogiri (>= 1.16.8)
126175
strings (0.2.1)
127176
strings-ansi (~> 0.2)
128177
unicode-display_width (>= 1.5, < 3.0)
@@ -148,21 +197,24 @@ GEM
148197
tty-screen (0.8.2)
149198
tzinfo (2.0.6)
150199
concurrent-ruby (~> 1.0)
151-
unicode-display_width (2.5.0)
200+
unicode-display_width (2.6.0)
152201
unicode_utils (1.4.0)
153-
uri (1.0.2)
154-
websocket-driver (0.7.6)
202+
uri (1.0.3)
203+
websocket-driver (0.8.0)
204+
base64
155205
websocket-extensions (>= 0.1.0)
156206
websocket-extensions (0.1.5)
157207
wisper (2.0.1)
158-
zeitwerk (2.6.18)
208+
zeitwerk (2.7.3)
159209

160210
PLATFORMS
161211
arm64-darwin-23
212+
arm64-darwin-24
162213
x86_64-darwin-20
163214
x86_64-linux
164215

165216
DEPENDENCIES
217+
html2rss!
166218
html2rss-configs!
167219
html2rss-generator!
168220
nokogiri
@@ -172,4 +224,4 @@ DEPENDENCIES
172224
rubocop-rspec
173225

174226
BUNDLED WITH
175-
2.5.17
227+
2.6.6

lib/html2rss/configs/adfc.de/pressemitteilungen.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ channel:
55
language: de
66
selectors:
77
items:
8-
selector: ".articleteasercontainer .articleteaser"
8+
selector: "#articleteasercontainer-columns .articleteaser"
99
title:
10-
selector: ".articleteaser-header-container h4"
11-
link:
10+
selector: ".articleteaser-header-container a"
11+
url:
1212
selector: "a:first"
1313
extractor: "href"
1414
description:
1515
selector: ".articleteaser-header-container p"
16-
extractor: "html"
17-
post_process:
18-
- name: sanitize_html

lib/html2rss/configs/apnews.com/hub.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ selectors:
99
selector: ".PagePromo"
1010
title:
1111
selector: h3
12-
link:
12+
url:
1313
selector: a:first
1414
extractor: href
1515
description:

lib/html2rss/configs/avherald.com/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ selectors:
99
selector: "table table a"
1010
title:
1111
selector: span
12-
link:
12+
url:
1313
extractor: href

lib/html2rss/configs/bbc.co.uk/available_episodes.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ selectors:
77
selector: ".highlight-box-wrapper > div"
88
title:
99
selector: ".programme__title"
10-
link:
10+
url:
1111
selector: ".programme__titles > a"
1212
extractor: "href"
1313
description:
1414
selector: ".programme__synopsis"
15-
post_process:
16-
name: sanitize_html

lib/html2rss/configs/bbc.com/mundo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ selectors:
99
selector: '[data-testid="topic-promos"] > li'
1010
title:
1111
selector: a
12-
link:
12+
url:
1313
selector: a:first
1414
extractor: href
1515
description:

lib/html2rss/configs/bbc.com/news_stories.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

lib/html2rss/configs/canarianweekly.com/front.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ selectors:
88
selector: ".article__entry"
99
title:
1010
selector: "h5 > a"
11-
link:
11+
url:
1212
selector: "h5 > a"
1313
extractor: "href"

lib/html2rss/configs/cinemascore.com/index.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ selectors:
99
title:
1010
selector: "title"
1111
post_process:
12-
name: "template"
13-
string: "%s (%s) [Rated %s] (%s)"
14-
methods:
15-
- self
16-
- grade
17-
- mpaa_rating
18-
- year
12+
- name: "template"
13+
string: "%s (%s) [Rated %s] (%s)"
14+
methods:
15+
- self
16+
- grade
17+
- mpaa_rating
18+
- year
1919
grade:
2020
selector: "grade"
2121
movie_title:
2222
selector: "movie_title"
23-
link:
23+
url:
2424
post_process:
2525
- name: "template"
2626
string: "https://www.metacritic.com/search/movie/%{movie_title}/results"

0 commit comments

Comments
 (0)