html2rss 0.32.4 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/lib/html2rss/article/deduplicator.rb +5 -2
- data/lib/html2rss/article/enclosure.rb +185 -25
- data/lib/html2rss/article/title.rb +203 -0
- data/lib/html2rss/article.rb +79 -13
- data/lib/html2rss/auto_source/README.md +16 -8
- data/lib/html2rss/auto_source/cleanup.rb +127 -53
- data/lib/html2rss/auto_source/corroboration.rb +167 -0
- data/lib/html2rss/auto_source/page_links/anchor_claims.rb +82 -0
- data/lib/html2rss/auto_source/page_links/card_units.rb +77 -0
- data/lib/html2rss/auto_source/page_links/label_binding.rb +79 -0
- data/lib/html2rss/auto_source/page_links/sponsored_cards.rb +147 -0
- data/lib/html2rss/auto_source/page_links.rb +164 -0
- data/lib/html2rss/auto_source/scraper/html.rb +11 -45
- data/lib/html2rss/auto_source/scraper/json_document.rb +3 -6
- data/lib/html2rss/auto_source/scraper/json_state/article_normalizer.rb +202 -125
- data/lib/html2rss/auto_source/scraper/json_state/candidate_detector.rb +27 -38
- data/lib/html2rss/auto_source/scraper/json_state/document_scanner.rb +123 -123
- data/lib/html2rss/auto_source/scraper/json_state/value_finder.rb +27 -35
- data/lib/html2rss/auto_source/scraper/json_state.rb +4 -9
- data/lib/html2rss/auto_source/scraper/meta_oembed.rb +27 -5
- data/lib/html2rss/auto_source/scraper/microdata.rb +233 -248
- data/lib/html2rss/auto_source/scraper/microformats2.rb +10 -4
- data/lib/html2rss/auto_source/scraper/native_feed.rb +28 -18
- data/lib/html2rss/auto_source/scraper/schema/category_extractor.rb +7 -2
- data/lib/html2rss/auto_source/scraper/schema/item_list.rb +5 -3
- data/lib/html2rss/auto_source/scraper/schema/thing.rb +140 -22
- data/lib/html2rss/auto_source/scraper/schema.rb +52 -8
- data/lib/html2rss/auto_source/scraper/semantic_html/entry_deduplicator.rb +3 -9
- data/lib/html2rss/auto_source/scraper/semantic_html.rb +12 -20
- data/lib/html2rss/auto_source/scraper/sitemap/parser.rb +1 -4
- data/lib/html2rss/auto_source/scraper/sitemap.rb +7 -14
- data/lib/html2rss/auto_source/scraper/wordpress_api/page_scope.rb +2 -2
- data/lib/html2rss/auto_source/scraper/wordpress_api/posts_endpoint.rb +1 -3
- data/lib/html2rss/auto_source/scraper/wordpress_api.rb +7 -7
- data/lib/html2rss/auto_source/scraper/xhr_articles.rb +2 -4
- data/lib/html2rss/auto_source/scraper.rb +10 -13
- data/lib/html2rss/auto_source/segment.rb +19 -5
- data/lib/html2rss/auto_source/segmenter/cluster.rb +18 -22
- data/lib/html2rss/auto_source/segmenter/list.rb +35 -59
- data/lib/html2rss/auto_source/segmenter/primary_link.rb +29 -4
- data/lib/html2rss/auto_source/segmenter/semantic.rb +23 -19
- data/lib/html2rss/auto_source/segmenter.rb +4 -8
- data/lib/html2rss/auto_source.rb +81 -26
- data/lib/html2rss/batch.rb +24 -32
- data/lib/html2rss/capture/README.md +6 -3
- data/lib/html2rss/capture.rb +51 -59
- data/lib/html2rss/channel.rb +30 -12
- data/lib/html2rss/cli/render.rb +97 -96
- data/lib/html2rss/cli/validate.rb +2 -4
- data/lib/html2rss/cli.rb +55 -38
- data/lib/html2rss/config/auto_source_contract.rb +52 -45
- data/lib/html2rss/config/issue_mapper.rb +4 -1
- data/lib/html2rss/config/request_controls.rb +16 -5
- data/lib/html2rss/config/schema.rb +23 -15
- data/lib/html2rss/config/selectors_validator.rb +3 -2
- data/lib/html2rss/config/validation_issue.rb +4 -1
- data/lib/html2rss/config/validator.rb +14 -3
- data/lib/html2rss/config.rb +54 -28
- data/lib/html2rss/contract_error.rb +9 -0
- data/lib/html2rss/defaults.rb +25 -38
- data/lib/html2rss/doctor/botasaurus.rb +18 -22
- data/lib/html2rss/error.rb +17 -3
- data/lib/html2rss/error_kind.rb +39 -0
- data/lib/html2rss/feed_builder/item_presentation.rb +22 -9
- data/lib/html2rss/feed_builder/json_feed/item.rb +2 -1
- data/lib/html2rss/feed_builder/json_feed.rb +2 -2
- data/lib/html2rss/feed_builder/rss/stylesheet.rb +3 -3
- data/lib/html2rss/feed_builder/rss.rb +50 -7
- data/lib/html2rss/feed_builder.rb +2 -1
- data/lib/html2rss/feed_pipeline/README.md +1 -1
- data/lib/html2rss/feed_pipeline/auto_fallback.rb +16 -34
- data/lib/html2rss/feed_pipeline/strategy_plan.rb +3 -3
- data/lib/html2rss/feed_pipeline.rb +40 -27
- data/lib/html2rss/feed_resolution/README.md +1 -1
- data/lib/html2rss/feed_resolution/candidate_generator.rb +6 -8
- data/lib/html2rss/feed_resolution/options.rb +3 -7
- data/lib/html2rss/feed_resolution/policy.rb +29 -33
- data/lib/html2rss/feed_resolution/probe.rb +6 -4
- data/lib/html2rss/feed_resolution/scorer.rb +29 -29
- data/lib/html2rss/feed_resolution.rb +16 -21
- data/lib/html2rss/feed_result.rb +11 -6
- data/lib/html2rss/hash_util.rb +91 -90
- data/lib/html2rss/html/article_extractor/category_extractor.rb +7 -10
- data/lib/html2rss/html/article_extractor/date_extractor.rb +1 -1
- data/lib/html2rss/html/article_extractor/enclosure_extractor.rb +12 -33
- data/lib/html2rss/html/article_extractor/heading_extractor.rb +2 -3
- data/lib/html2rss/html/article_extractor/id_generator.rb +7 -10
- data/lib/html2rss/html/article_extractor/image_extractor.rb +9 -1
- data/lib/html2rss/html/article_extractor.rb +19 -47
- data/lib/html2rss/html/article_rules/category.rb +3 -3
- data/lib/html2rss/html/article_rules/description.rb +6 -15
- data/lib/html2rss/html/article_rules/enclosure.rb +70 -42
- data/lib/html2rss/html/article_rules/image.rb +30 -16
- data/lib/html2rss/html/feed_link.rb +7 -9
- data/lib/html2rss/html/navigator/text_extractor.rb +26 -16
- data/lib/html2rss/html/navigator.rb +39 -9
- data/lib/html2rss/html/probe.rb +55 -51
- data/lib/html2rss/html/rendering/description_builder.rb +46 -32
- data/lib/html2rss/html/rendering.rb +2 -9
- data/lib/html2rss/html/sst_article_extractor.rb +55 -145
- data/lib/html2rss/html/title_pieces/kicker.rb +147 -0
- data/lib/html2rss/html/title_pieces/nodes.rb +107 -0
- data/lib/html2rss/html/title_pieces/nokogiri_nodes.rb +70 -0
- data/lib/html2rss/html/title_pieces/sst_nodes.rb +71 -0
- data/lib/html2rss/html/title_pieces.rb +169 -0
- data/lib/html2rss/html/visibility.rb +56 -0
- data/lib/html2rss/html.rb +2 -0
- data/lib/html2rss/link_destination/destination_facts.rb +17 -1
- data/lib/html2rss/link_destination/noise_policy.rb +11 -10
- data/lib/html2rss/link_destination/path_classifier.rb +111 -42
- data/lib/html2rss/link_destination/sponsorship/label_text.rb +82 -0
- data/lib/html2rss/link_destination/sponsorship.rb +184 -0
- data/lib/html2rss/link_destination/text_classifier.rb +104 -8
- data/lib/html2rss/mcp/README.md +13 -1
- data/lib/html2rss/mcp/config_argument.rb +14 -4
- data/lib/html2rss/mcp/contract.rb +20 -9
- data/lib/html2rss/mcp/outcome.rb +18 -17
- data/lib/html2rss/mcp/runtime.rb +53 -23
- data/lib/html2rss/mcp/server/tools.rb +9 -9
- data/lib/html2rss/mcp/server.rb +13 -4
- data/lib/html2rss/option.rb +48 -0
- data/lib/html2rss/page_recon/README.md +1 -1
- data/lib/html2rss/page_recon/diagnostics.rb +9 -9
- data/lib/html2rss/page_recon.rb +0 -4
- data/lib/html2rss/recon.rb +19 -23
- data/lib/html2rss/request_service/blocked_surface.rb +5 -8
- data/lib/html2rss/request_service/botasaurus_contract.rb +25 -3
- data/lib/html2rss/request_service/botasaurus_strategy.rb +44 -12
- data/lib/html2rss/request_service/budget.rb +3 -24
- data/lib/html2rss/request_service/compressed_body.rb +36 -48
- data/lib/html2rss/request_service/context.rb +16 -17
- data/lib/html2rss/request_service/cookie_jar.rb +89 -0
- data/lib/html2rss/request_service/cookie_store.rb +79 -0
- data/lib/html2rss/request_service/feed_advertisement.rb +72 -0
- data/lib/html2rss/request_service/httpx_strategy.rb +7 -3
- data/lib/html2rss/request_service/local_file_strategy.rb +2 -3
- data/lib/html2rss/request_service/network_guard.rb +3 -2
- data/lib/html2rss/request_service/policy.rb +55 -36
- data/lib/html2rss/request_service/replay_breaker.rb +56 -0
- data/lib/html2rss/request_service/response.rb +33 -19
- data/lib/html2rss/request_service/response_cache.rb +109 -0
- data/lib/html2rss/request_service/response_caching.rb +95 -0
- data/lib/html2rss/request_service/strategy.rb +5 -11
- data/lib/html2rss/request_service.rb +71 -12
- data/lib/html2rss/request_session/pager/base.rb +3 -10
- data/lib/html2rss/request_session/pager/custom_selector.rb +4 -4
- data/lib/html2rss/request_session/pager/offset.rb +1 -7
- data/lib/html2rss/request_session/pager/rel_next.rb +1 -1
- data/lib/html2rss/request_session/pager/url_template.rb +1 -7
- data/lib/html2rss/request_session/pager.rb +1 -1
- data/lib/html2rss/request_session.rb +6 -2
- data/lib/html2rss/scoring/cluster_scorer.rb +1 -1
- data/lib/html2rss/scoring/container_assessor.rb +12 -13
- data/lib/html2rss/scoring/engine.rb +10 -38
- data/lib/html2rss/scoring/link_resolver.rb +2 -7
- data/lib/html2rss/scoring/observation.rb +2 -2
- data/lib/html2rss/selector_candidates.rb +19 -8
- data/lib/html2rss/selectors/README.md +1 -1
- data/lib/html2rss/selectors/extractors/href.rb +2 -4
- data/lib/html2rss/selectors/json_xml.rb +33 -34
- data/lib/html2rss/selectors/option_spec.rb +4 -1
- data/lib/html2rss/selectors/post_processors/base.rb +0 -8
- data/lib/html2rss/selectors/post_processors/gsub.rb +9 -10
- data/lib/html2rss/selectors/post_processors/html_transformers/keep_playable_media.rb +50 -0
- data/lib/html2rss/selectors/post_processors/html_transformers/transform_urls_to_absolute_ones.rb +1 -3
- data/lib/html2rss/selectors/post_processors/parse_time.rb +5 -6
- data/lib/html2rss/selectors/post_processors/parse_uri.rb +1 -1
- data/lib/html2rss/selectors/post_processors/sanitize_html.rb +18 -5
- data/lib/html2rss/selectors/post_processors/substring.rb +1 -1
- data/lib/html2rss/selectors/schema_export.rb +60 -60
- data/lib/html2rss/selectors.rb +67 -30
- data/lib/html2rss/sst/attrs.rb +2 -2
- data/lib/html2rss/sst/document.rb +3 -3
- data/lib/html2rss/sst/index.rb +30 -11
- data/lib/html2rss/sst/node.rb +42 -29
- data/lib/html2rss/sst/normalizer.rb +47 -34
- data/lib/html2rss/sst/tags.rb +113 -2
- data/lib/html2rss/sst/text.rb +94 -58
- data/lib/html2rss/sst.rb +2 -0
- data/lib/html2rss/status.rb +27 -31
- data/lib/html2rss/surface_category.rb +1 -1
- data/lib/html2rss/syndication/README.md +12 -6
- data/lib/html2rss/syndication/alternate_links.rb +39 -0
- data/lib/html2rss/syndication/channel_facts.rb +87 -0
- data/lib/html2rss/syndication/discovery.rb +171 -187
- data/lib/html2rss/syndication/feed.rb +20 -0
- data/lib/html2rss/syndication/item_media.rb +103 -0
- data/lib/html2rss/syndication/parser.rb +117 -116
- data/lib/html2rss/test/enhance_audit.rb +15 -17
- data/lib/html2rss/test/item_sample.rb +43 -0
- data/lib/html2rss/test/policy.rb +9 -11
- data/lib/html2rss/test.rb +66 -57
- data/lib/html2rss/url.rb +163 -62
- data/lib/html2rss/version.rb +1 -1
- data/lib/html2rss/word_count.rb +53 -0
- data/lib/html2rss.rb +19 -9
- data/schema/html2rss-config.schema.json +56 -41
- metadata +33 -4
- data/lib/html2rss/html/rendering/media_renderer.rb +0 -39
- data/lib/html2rss/html/rendering/pdf_renderer.rb +0 -30
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"properties": {
|
|
14
14
|
"url": {
|
|
15
15
|
"type": "string",
|
|
16
|
-
"minLength": 1
|
|
16
|
+
"minLength": 1,
|
|
17
|
+
"pattern": "^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"
|
|
17
18
|
},
|
|
18
19
|
"title": {
|
|
19
20
|
"type": [
|
|
@@ -31,7 +32,8 @@
|
|
|
31
32
|
"type": [
|
|
32
33
|
"null",
|
|
33
34
|
"string"
|
|
34
|
-
]
|
|
35
|
+
],
|
|
36
|
+
"pattern": "\\A[a-z]{2}(-[A-Z]{2})?\\z"
|
|
35
37
|
},
|
|
36
38
|
"ttl": {
|
|
37
39
|
"type": [
|
|
@@ -56,7 +58,8 @@
|
|
|
56
58
|
"type": [
|
|
57
59
|
"null",
|
|
58
60
|
"string"
|
|
59
|
-
]
|
|
61
|
+
],
|
|
62
|
+
"pattern": "^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"
|
|
60
63
|
}
|
|
61
64
|
},
|
|
62
65
|
"required": [
|
|
@@ -79,8 +82,8 @@
|
|
|
79
82
|
},
|
|
80
83
|
"topics": {
|
|
81
84
|
"type": "array",
|
|
85
|
+
"minItems": 1,
|
|
82
86
|
"items": {
|
|
83
|
-
"minLength": 1,
|
|
84
87
|
"type": "string",
|
|
85
88
|
"enum": [
|
|
86
89
|
"sports",
|
|
@@ -104,8 +107,7 @@
|
|
|
104
107
|
"rights",
|
|
105
108
|
"transport"
|
|
106
109
|
]
|
|
107
|
-
}
|
|
108
|
-
"minItems": 1
|
|
110
|
+
}
|
|
109
111
|
}
|
|
110
112
|
},
|
|
111
113
|
"required": [
|
|
@@ -194,7 +196,8 @@
|
|
|
194
196
|
}
|
|
195
197
|
}
|
|
196
198
|
},
|
|
197
|
-
"required": []
|
|
199
|
+
"required": [],
|
|
200
|
+
"additionalProperties": false
|
|
198
201
|
},
|
|
199
202
|
"wordpress_api": {
|
|
200
203
|
"type": "object",
|
|
@@ -206,7 +209,8 @@
|
|
|
206
209
|
}
|
|
207
210
|
}
|
|
208
211
|
},
|
|
209
|
-
"required": []
|
|
212
|
+
"required": [],
|
|
213
|
+
"additionalProperties": false
|
|
210
214
|
},
|
|
211
215
|
"sitemap": {
|
|
212
216
|
"type": "object",
|
|
@@ -218,7 +222,14 @@
|
|
|
218
222
|
}
|
|
219
223
|
},
|
|
220
224
|
"min_priority": {
|
|
221
|
-
"
|
|
225
|
+
"anyOf": [
|
|
226
|
+
{
|
|
227
|
+
"type": "integer"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"type": "number"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
222
233
|
"not": {
|
|
223
234
|
"type": "null"
|
|
224
235
|
}
|
|
@@ -231,7 +242,8 @@
|
|
|
231
242
|
"exclusiveMinimum": 0
|
|
232
243
|
}
|
|
233
244
|
},
|
|
234
|
-
"required": []
|
|
245
|
+
"required": [],
|
|
246
|
+
"additionalProperties": false
|
|
235
247
|
},
|
|
236
248
|
"schema": {
|
|
237
249
|
"type": "object",
|
|
@@ -243,7 +255,8 @@
|
|
|
243
255
|
}
|
|
244
256
|
}
|
|
245
257
|
},
|
|
246
|
-
"required": []
|
|
258
|
+
"required": [],
|
|
259
|
+
"additionalProperties": false
|
|
247
260
|
},
|
|
248
261
|
"microdata": {
|
|
249
262
|
"type": "object",
|
|
@@ -255,7 +268,8 @@
|
|
|
255
268
|
}
|
|
256
269
|
}
|
|
257
270
|
},
|
|
258
|
-
"required": []
|
|
271
|
+
"required": [],
|
|
272
|
+
"additionalProperties": false
|
|
259
273
|
},
|
|
260
274
|
"microformats2": {
|
|
261
275
|
"type": "object",
|
|
@@ -267,7 +281,8 @@
|
|
|
267
281
|
}
|
|
268
282
|
}
|
|
269
283
|
},
|
|
270
|
-
"required": []
|
|
284
|
+
"required": [],
|
|
285
|
+
"additionalProperties": false
|
|
271
286
|
},
|
|
272
287
|
"json_state": {
|
|
273
288
|
"type": "object",
|
|
@@ -279,7 +294,8 @@
|
|
|
279
294
|
}
|
|
280
295
|
}
|
|
281
296
|
},
|
|
282
|
-
"required": []
|
|
297
|
+
"required": [],
|
|
298
|
+
"additionalProperties": false
|
|
283
299
|
},
|
|
284
300
|
"json_document": {
|
|
285
301
|
"type": "object",
|
|
@@ -291,7 +307,8 @@
|
|
|
291
307
|
}
|
|
292
308
|
}
|
|
293
309
|
},
|
|
294
|
-
"required": []
|
|
310
|
+
"required": [],
|
|
311
|
+
"additionalProperties": false
|
|
295
312
|
},
|
|
296
313
|
"xhr_articles": {
|
|
297
314
|
"type": "object",
|
|
@@ -303,7 +320,8 @@
|
|
|
303
320
|
}
|
|
304
321
|
}
|
|
305
322
|
},
|
|
306
|
-
"required": []
|
|
323
|
+
"required": [],
|
|
324
|
+
"additionalProperties": false
|
|
307
325
|
},
|
|
308
326
|
"meta_oembed": {
|
|
309
327
|
"type": "object",
|
|
@@ -315,7 +333,8 @@
|
|
|
315
333
|
}
|
|
316
334
|
}
|
|
317
335
|
},
|
|
318
|
-
"required": []
|
|
336
|
+
"required": [],
|
|
337
|
+
"additionalProperties": false
|
|
319
338
|
},
|
|
320
339
|
"semantic_html": {
|
|
321
340
|
"type": "object",
|
|
@@ -325,15 +344,10 @@
|
|
|
325
344
|
"not": {
|
|
326
345
|
"type": "null"
|
|
327
346
|
}
|
|
328
|
-
},
|
|
329
|
-
"fallback_anchorless": {
|
|
330
|
-
"type": "boolean",
|
|
331
|
-
"not": {
|
|
332
|
-
"type": "null"
|
|
333
|
-
}
|
|
334
347
|
}
|
|
335
348
|
},
|
|
336
|
-
"required": []
|
|
349
|
+
"required": [],
|
|
350
|
+
"additionalProperties": false
|
|
337
351
|
},
|
|
338
352
|
"html": {
|
|
339
353
|
"type": "object",
|
|
@@ -357,18 +371,14 @@
|
|
|
357
371
|
"type": "null"
|
|
358
372
|
},
|
|
359
373
|
"exclusiveMinimum": 0
|
|
360
|
-
},
|
|
361
|
-
"fallback_anchorless": {
|
|
362
|
-
"type": "boolean",
|
|
363
|
-
"not": {
|
|
364
|
-
"type": "null"
|
|
365
|
-
}
|
|
366
374
|
}
|
|
367
375
|
},
|
|
368
|
-
"required": []
|
|
376
|
+
"required": [],
|
|
377
|
+
"additionalProperties": false
|
|
369
378
|
}
|
|
370
379
|
},
|
|
371
|
-
"required": []
|
|
380
|
+
"required": [],
|
|
381
|
+
"additionalProperties": false
|
|
372
382
|
},
|
|
373
383
|
"cleanup": {
|
|
374
384
|
"type": "object",
|
|
@@ -378,6 +388,12 @@
|
|
|
378
388
|
"not": {
|
|
379
389
|
"type": "null"
|
|
380
390
|
}
|
|
391
|
+
},
|
|
392
|
+
"keep_sponsored": {
|
|
393
|
+
"type": "boolean",
|
|
394
|
+
"not": {
|
|
395
|
+
"type": "null"
|
|
396
|
+
}
|
|
381
397
|
}
|
|
382
398
|
},
|
|
383
399
|
"required": []
|
|
@@ -424,18 +440,17 @@
|
|
|
424
440
|
"enabled": true
|
|
425
441
|
},
|
|
426
442
|
"semantic_html": {
|
|
427
|
-
"enabled": true
|
|
428
|
-
"fallback_anchorless": true
|
|
443
|
+
"enabled": true
|
|
429
444
|
},
|
|
430
445
|
"html": {
|
|
431
446
|
"enabled": true,
|
|
432
447
|
"minimum_selector_frequency": 2,
|
|
433
|
-
"use_top_selectors": 5
|
|
434
|
-
"fallback_anchorless": true
|
|
448
|
+
"use_top_selectors": 5
|
|
435
449
|
}
|
|
436
450
|
},
|
|
437
451
|
"cleanup": {
|
|
438
|
-
"keep_different_domain": false
|
|
452
|
+
"keep_different_domain": false,
|
|
453
|
+
"keep_sponsored": false
|
|
439
454
|
}
|
|
440
455
|
}
|
|
441
456
|
},
|
|
@@ -465,7 +480,7 @@
|
|
|
465
480
|
"not": {
|
|
466
481
|
"type": "null"
|
|
467
482
|
},
|
|
468
|
-
"description": "
|
|
483
|
+
"description": "Fills missing title, link, description, date, image and categories from each item's own markup via Html::ArticleExtractor. Explicit selectors win; no extra requests are made."
|
|
469
484
|
},
|
|
470
485
|
"pagination": {
|
|
471
486
|
"description": "Pagination configuration or maximum page count integer.",
|
|
@@ -589,7 +604,8 @@
|
|
|
589
604
|
},
|
|
590
605
|
"content_type": {
|
|
591
606
|
"type": "string",
|
|
592
|
-
"minLength": 1
|
|
607
|
+
"minLength": 1,
|
|
608
|
+
"pattern": "^[\\w-]+\\/[\\w-]+$"
|
|
593
609
|
}
|
|
594
610
|
},
|
|
595
611
|
"required": [],
|
|
@@ -726,8 +742,7 @@
|
|
|
726
742
|
"auto",
|
|
727
743
|
"get",
|
|
728
744
|
"google_get",
|
|
729
|
-
"google_get_bypass"
|
|
730
|
-
"organic_get"
|
|
745
|
+
"google_get_bypass"
|
|
731
746
|
]
|
|
732
747
|
},
|
|
733
748
|
"max_retries": {
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: html2rss
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.34.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gil Desmarais
|
|
@@ -270,9 +270,16 @@ files:
|
|
|
270
270
|
- lib/html2rss/article.rb
|
|
271
271
|
- lib/html2rss/article/deduplicator.rb
|
|
272
272
|
- lib/html2rss/article/enclosure.rb
|
|
273
|
+
- lib/html2rss/article/title.rb
|
|
273
274
|
- lib/html2rss/auto_source.rb
|
|
274
275
|
- lib/html2rss/auto_source/README.md
|
|
275
276
|
- lib/html2rss/auto_source/cleanup.rb
|
|
277
|
+
- lib/html2rss/auto_source/corroboration.rb
|
|
278
|
+
- lib/html2rss/auto_source/page_links.rb
|
|
279
|
+
- lib/html2rss/auto_source/page_links/anchor_claims.rb
|
|
280
|
+
- lib/html2rss/auto_source/page_links/card_units.rb
|
|
281
|
+
- lib/html2rss/auto_source/page_links/label_binding.rb
|
|
282
|
+
- lib/html2rss/auto_source/page_links/sponsored_cards.rb
|
|
276
283
|
- lib/html2rss/auto_source/scraper.rb
|
|
277
284
|
- lib/html2rss/auto_source/scraper/html.rb
|
|
278
285
|
- lib/html2rss/auto_source/scraper/json_document.rb
|
|
@@ -324,10 +331,12 @@ files:
|
|
|
324
331
|
- lib/html2rss/config/validation_issue.rb
|
|
325
332
|
- lib/html2rss/config/validation_report.rb
|
|
326
333
|
- lib/html2rss/config/validator.rb
|
|
334
|
+
- lib/html2rss/contract_error.rb
|
|
327
335
|
- lib/html2rss/defaults.rb
|
|
328
336
|
- lib/html2rss/doctor.rb
|
|
329
337
|
- lib/html2rss/doctor/botasaurus.rb
|
|
330
338
|
- lib/html2rss/error.rb
|
|
339
|
+
- lib/html2rss/error_kind.rb
|
|
331
340
|
- lib/html2rss/feed_builder.rb
|
|
332
341
|
- lib/html2rss/feed_builder/item_presentation.rb
|
|
333
342
|
- lib/html2rss/feed_builder/json_feed.rb
|
|
@@ -373,14 +382,20 @@ files:
|
|
|
373
382
|
- lib/html2rss/html/rendering/description_builder.rb
|
|
374
383
|
- lib/html2rss/html/rendering/escaped_attributes.rb
|
|
375
384
|
- lib/html2rss/html/rendering/image_renderer.rb
|
|
376
|
-
- lib/html2rss/html/rendering/media_renderer.rb
|
|
377
|
-
- lib/html2rss/html/rendering/pdf_renderer.rb
|
|
378
385
|
- lib/html2rss/html/rendering/video_renderer.rb
|
|
379
386
|
- lib/html2rss/html/sst_article_extractor.rb
|
|
387
|
+
- lib/html2rss/html/title_pieces.rb
|
|
388
|
+
- lib/html2rss/html/title_pieces/kicker.rb
|
|
389
|
+
- lib/html2rss/html/title_pieces/nodes.rb
|
|
390
|
+
- lib/html2rss/html/title_pieces/nokogiri_nodes.rb
|
|
391
|
+
- lib/html2rss/html/title_pieces/sst_nodes.rb
|
|
392
|
+
- lib/html2rss/html/visibility.rb
|
|
380
393
|
- lib/html2rss/link_destination.rb
|
|
381
394
|
- lib/html2rss/link_destination/destination_facts.rb
|
|
382
395
|
- lib/html2rss/link_destination/noise_policy.rb
|
|
383
396
|
- lib/html2rss/link_destination/path_classifier.rb
|
|
397
|
+
- lib/html2rss/link_destination/sponsorship.rb
|
|
398
|
+
- lib/html2rss/link_destination/sponsorship/label_text.rb
|
|
384
399
|
- lib/html2rss/link_destination/text_classifier.rb
|
|
385
400
|
- lib/html2rss/mcp.rb
|
|
386
401
|
- lib/html2rss/mcp/README.md
|
|
@@ -391,6 +406,7 @@ files:
|
|
|
391
406
|
- lib/html2rss/mcp/runtime.rb
|
|
392
407
|
- lib/html2rss/mcp/server.rb
|
|
393
408
|
- lib/html2rss/mcp/server/tools.rb
|
|
409
|
+
- lib/html2rss/option.rb
|
|
394
410
|
- lib/html2rss/page_recon.rb
|
|
395
411
|
- lib/html2rss/page_recon/README.md
|
|
396
412
|
- lib/html2rss/page_recon/diagnostics.rb
|
|
@@ -402,11 +418,17 @@ files:
|
|
|
402
418
|
- lib/html2rss/request_service/budget.rb
|
|
403
419
|
- lib/html2rss/request_service/compressed_body.rb
|
|
404
420
|
- lib/html2rss/request_service/context.rb
|
|
421
|
+
- lib/html2rss/request_service/cookie_jar.rb
|
|
422
|
+
- lib/html2rss/request_service/cookie_store.rb
|
|
423
|
+
- lib/html2rss/request_service/feed_advertisement.rb
|
|
405
424
|
- lib/html2rss/request_service/httpx_strategy.rb
|
|
406
425
|
- lib/html2rss/request_service/local_file_strategy.rb
|
|
407
426
|
- lib/html2rss/request_service/network_guard.rb
|
|
408
427
|
- lib/html2rss/request_service/policy.rb
|
|
428
|
+
- lib/html2rss/request_service/replay_breaker.rb
|
|
409
429
|
- lib/html2rss/request_service/response.rb
|
|
430
|
+
- lib/html2rss/request_service/response_cache.rb
|
|
431
|
+
- lib/html2rss/request_service/response_caching.rb
|
|
410
432
|
- lib/html2rss/request_service/response_guard.rb
|
|
411
433
|
- lib/html2rss/request_service/strategy.rb
|
|
412
434
|
- lib/html2rss/request_session.rb
|
|
@@ -441,6 +463,7 @@ files:
|
|
|
441
463
|
- lib/html2rss/selectors/post_processors.rb
|
|
442
464
|
- lib/html2rss/selectors/post_processors/base.rb
|
|
443
465
|
- lib/html2rss/selectors/post_processors/gsub.rb
|
|
466
|
+
- lib/html2rss/selectors/post_processors/html_transformers/keep_playable_media.rb
|
|
444
467
|
- lib/html2rss/selectors/post_processors/html_transformers/transform_urls_to_absolute_ones.rb
|
|
445
468
|
- lib/html2rss/selectors/post_processors/html_transformers/wrap_img_in_a.rb
|
|
446
469
|
- lib/html2rss/selectors/post_processors/markdown_to_html.rb
|
|
@@ -463,14 +486,20 @@ files:
|
|
|
463
486
|
- lib/html2rss/surface_category.rb
|
|
464
487
|
- lib/html2rss/syndication.rb
|
|
465
488
|
- lib/html2rss/syndication/README.md
|
|
489
|
+
- lib/html2rss/syndication/alternate_links.rb
|
|
466
490
|
- lib/html2rss/syndication/candidate_catalog.rb
|
|
491
|
+
- lib/html2rss/syndication/channel_facts.rb
|
|
467
492
|
- lib/html2rss/syndication/discovery.rb
|
|
493
|
+
- lib/html2rss/syndication/feed.rb
|
|
494
|
+
- lib/html2rss/syndication/item_media.rb
|
|
468
495
|
- lib/html2rss/syndication/parser.rb
|
|
469
496
|
- lib/html2rss/test.rb
|
|
470
497
|
- lib/html2rss/test/enhance_audit.rb
|
|
498
|
+
- lib/html2rss/test/item_sample.rb
|
|
471
499
|
- lib/html2rss/test/policy.rb
|
|
472
500
|
- lib/html2rss/url.rb
|
|
473
501
|
- lib/html2rss/version.rb
|
|
502
|
+
- lib/html2rss/word_count.rb
|
|
474
503
|
- lib/tasks/config_schema.rake
|
|
475
504
|
- schema/html2rss-config.schema.json
|
|
476
505
|
homepage: https://github.com/html2rss/html2rss
|
|
@@ -478,7 +507,7 @@ licenses:
|
|
|
478
507
|
- MIT
|
|
479
508
|
metadata:
|
|
480
509
|
allowed_push_host: https://rubygems.org
|
|
481
|
-
changelog_uri: https://github.com/html2rss/html2rss/releases/tag/v0.
|
|
510
|
+
changelog_uri: https://github.com/html2rss/html2rss/releases/tag/v0.34.0
|
|
482
511
|
rubygems_mfa_required: 'true'
|
|
483
512
|
rdoc_options: []
|
|
484
513
|
require_paths:
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Html2rss
|
|
4
|
-
module Html
|
|
5
|
-
module Rendering
|
|
6
|
-
# Factory: picks the appropriate renderer for a given enclosure or fallback image.
|
|
7
|
-
class MediaRenderer
|
|
8
|
-
# @param enclosure [Html2rss::Article::Enclosure, nil]
|
|
9
|
-
# @param image [String, Html2rss::Url, nil] Fallback image URL
|
|
10
|
-
# @param title [String]
|
|
11
|
-
# @return [ImageRenderer, VideoRenderer, AudioRenderer, PdfRenderer, nil]
|
|
12
|
-
def self.for(enclosure:, image:, title:)
|
|
13
|
-
return ImageRenderer.new(url: image, title:) if enclosure.nil? && image
|
|
14
|
-
return nil unless enclosure
|
|
15
|
-
|
|
16
|
-
create_renderer_for_type(enclosure.type, url: enclosure.url, title:)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
# @private
|
|
20
|
-
# @param type [String, nil] enclosure MIME type
|
|
21
|
-
# @param url [String, Html2rss::Url] enclosure URL
|
|
22
|
-
# @param title [String, nil] title used by image renderer
|
|
23
|
-
# @return [ImageRenderer, VideoRenderer, AudioRenderer, PdfRenderer, nil]
|
|
24
|
-
def self.create_renderer_for_type(type, url:, title:)
|
|
25
|
-
case type
|
|
26
|
-
when %r{^image/}
|
|
27
|
-
ImageRenderer.new(url:, title:)
|
|
28
|
-
when %r{^video/}
|
|
29
|
-
VideoRenderer.new(url:, type:)
|
|
30
|
-
when %r{^audio/}
|
|
31
|
-
AudioRenderer.new(url:, type:)
|
|
32
|
-
when 'application/pdf'
|
|
33
|
-
PdfRenderer.new(url:)
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Html2rss
|
|
4
|
-
module Html
|
|
5
|
-
module Rendering
|
|
6
|
-
# Renders an HTML <iframe> for PDF documents.
|
|
7
|
-
class PdfRenderer
|
|
8
|
-
include EscapedAttributes
|
|
9
|
-
|
|
10
|
-
# @param url [String, Html2rss::Url] PDF URL rendered in the iframe
|
|
11
|
-
def initialize(url:)
|
|
12
|
-
@url = url
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
# @return [String] HTML iframe snippet for PDF rendering
|
|
16
|
-
def to_html
|
|
17
|
-
attributes = [
|
|
18
|
-
%(src="#{escaped_url}"),
|
|
19
|
-
'width="100%"',
|
|
20
|
-
'height="75vh"',
|
|
21
|
-
'sandbox=""',
|
|
22
|
-
'referrerpolicy="no-referrer"',
|
|
23
|
-
'loading="lazy"'
|
|
24
|
-
]
|
|
25
|
-
"<iframe #{attributes.join(' ')}></iframe>"
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|