From 11a5c44f9967aa144db3301bc9c9172de3ae00ca Mon Sep 17 00:00:00 2001 From: Alex Musayev Date: Sat, 2 Sep 2023 16:43:23 +0200 Subject: [PATCH 1/6] Rewrite `RedditProcessor` for the updated feed format --- app/processors/reddit_processor.rb | 31 +- .../files/feeds/reddit/expected_points.json | 28 -- .../files/feeds/reddit/expected_uids.json | 28 ++ spec/fixtures/files/feeds/reddit/feed.xml | 378 +++++++++++++++++- spec/processors/reddit_processor_spec.rb | 3 +- 5 files changed, 427 insertions(+), 41 deletions(-) delete mode 100644 spec/fixtures/files/feeds/reddit/expected_points.json create mode 100644 spec/fixtures/files/feeds/reddit/expected_uids.json diff --git a/app/processors/reddit_processor.rb b/app/processors/reddit_processor.rb index 5baad6a3..b85c90ef 100644 --- a/app/processors/reddit_processor.rb +++ b/app/processors/reddit_processor.rb @@ -1,23 +1,34 @@ -class RedditProcessor < AtomProcessor +class RedditProcessor < BaseProcessor SCORE_THRESHOLD = 2000 POST_SCORE_CACHE_TTL = 2.hours def entities - super.select { |item| above_score_threshold?(item.uid) } + atom_feed_entries.select { above_score_threshold?(_1.uid) } end private - def above_score_threshold?(link) - cached_score(link) >= SCORE_THRESHOLD + def atom_feed_entries + parsed_xml.xpath("/feed/entry").map do |entry| + uid = entry.xpath("link").first.attributes["href"].value + build_entity(uid, entry.to_xml) + end end - def cached_score(link) - Rails.cache.fetch(cache_key(link), expires_in: POST_SCORE_CACHE_TTL) { score(link) } + def parsed_xml + Nokogiri::XML(content).tap { _1.remove_namespaces! } end - def score(link) - RedditPointsFetcher.new(link).points + def above_score_threshold?(url) + cached_score(url) >= SCORE_THRESHOLD + end + + def cached_score(url) + Rails.cache.fetch(cache_key(url), expires_in: POST_SCORE_CACHE_TTL) { score(url) } + end + + def score(url) + RedditPointsFetcher.new(url).points rescue StandardError => e # NOTE: Individual post score fetching should not crash the processor, # but they are getting reported to monitor Reddit availability @@ -25,8 +36,8 @@ def score(link) 0 end - def cache_key(link) - [cache_key_prefix, link].join(":") + def cache_key(url) + [cache_key_prefix, url].join(":") end def cache_key_prefix diff --git a/spec/fixtures/files/feeds/reddit/expected_points.json b/spec/fixtures/files/feeds/reddit/expected_points.json deleted file mode 100644 index 764f0459..00000000 --- a/spec/fixtures/files/feeds/reddit/expected_points.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - {"link": "https://www.reddit.com/r/worldnews/comments/143yos2/rworldnews_live_thread_russian_invasion_of/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/1448dgc/wagner_mercenaries_tortured_me_and_stole_tanks/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/144a40r/russian_forces_accused_of_blocking_flood/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/143vikq/australia_to_ban_swastika_ss_sign_citing_rise_of/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/14459g2/india_among_top_actors_for_foreign_interference/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/1448og7/they_are_destroying_us_people_plea_to_escape/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/14428lv/canadas_record_wildfires_should_be_wakeup_call/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/1448koc/general_staff_russian_soldiers_didnt_prepare_for/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/1446jmp/italian_court_convicts_swiss_billionaire_in/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/143thsw/russia_decided_accidents_at_hazardous_facilities/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/143lxoj/russians_shooting_at_rescuers_in_flooded_areas/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/1446ua2/smoke_from_canadian_wildfires_forecast_to_reach/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/144a3af/fishermen_confirm_scientists_warning_brazils_belo/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/1449vuj/australia_mandates_paid_leave_for_domestic/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/143za9c/well_never_be_done_the_growing_challenge_to/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/143o0vb/nato_members_may_send_troops_to_ukraine_warns/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/144eel8/russian_elite_is_souring_on_putins_chances_of/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/1448ymn/ukraine_war_deserters_risk_death_fleeing_to/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/1446ut7/a_quarter_of_hungarians_support_closer_ties_with/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/143z0x5/fused_brain_cells_neuron_damage_may_explain_long/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/144bhuq/brightest_gamma_ray_burst_the_most_powerful_space/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/144931b/bomb_explodes_in_afghanistan_in_a_memorial/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/144fap4/putin_should_freeze_war_as_ukraine_too_strong/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/1442u7b/nigeria_40_schools_are_now_accepting_garbage_as/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/143mn13/zelenskyy_denies_ukraine_involvement_in_nord/", "points": 2869}, - {"link": "https://www.reddit.com/r/worldnews/comments/1448tun/zelensky_travels_to_kherson_oblast_amid_kahkovka/", "points": 2869} -] diff --git a/spec/fixtures/files/feeds/reddit/expected_uids.json b/spec/fixtures/files/feeds/reddit/expected_uids.json new file mode 100644 index 00000000..0351e84b --- /dev/null +++ b/spec/fixtures/files/feeds/reddit/expected_uids.json @@ -0,0 +1,28 @@ +[ + "https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/", + "https://www.reddit.com/r/worldnews/comments/167qju7/10yearold_boy_thrown_off_bridge_in_germany_for/", + "https://www.reddit.com/r/worldnews/comments/167ymp8/vietnam_to_take_their_relationship_with_us_to/", + "https://www.reddit.com/r/worldnews/comments/167p2b7/top_russian_space_scientist_dies_of_mushroom/", + "https://www.reddit.com/r/worldnews/comments/167vmk8/russian_army_losses_600_soldiers_and_dozens_of/", + "https://www.reddit.com/r/worldnews/comments/167wlo6/china_put_out_a_new_offical_map_that_claims/", + "https://www.reddit.com/r/worldnews/comments/167j17s/us_to_send_its_first_depleted_uranium_rounds_to/", + "https://www.reddit.com/r/worldnews/comments/167ucb5/meta_and_alphabet_would_owe_at_least_4_of_annual/", + "https://www.reddit.com/r/worldnews/comments/167bd2t/retired_teacher_sentenced_to_death_in_saudi/", + "https://www.reddit.com/r/worldnews/comments/167q98v/russia_deploys_icbm_that_putin_says_will_make/", + "https://www.reddit.com/r/worldnews/comments/167h55i/china_says_it_deplores_us_military_transfer_to/", + "https://www.reddit.com/r/worldnews/comments/167zpnm/ukraine_says_it_has_manufactured_and_fired_a/", + "https://www.reddit.com/r/worldnews/comments/167ctld/only_1280_breeding_humans_once_roamed_earth_gene/", + "https://www.reddit.com/r/worldnews/comments/167pmis/russia_will_want_revenge_after_losing_the_war/", + "https://www.reddit.com/r/worldnews/comments/167w4xn/putin_tells_schoolchildren_russia_is_invincible/", + "https://www.reddit.com/r/worldnews/comments/167gy3y/american_airlines_flying_bigger_jets_so_people/", + "https://www.reddit.com/r/worldnews/comments/1680nk6/nobel_foundation_cancels_russia_belarus_iran/", + "https://www.reddit.com/r/worldnews/comments/167jr9b/ukraine_war_us_sees_notable_progress_by_ukraine/", + "https://www.reddit.com/r/worldnews/comments/167z1s9/nobel_foundation_cancels_russian_ambassador/", + "https://www.reddit.com/r/worldnews/comments/167e9pa/child_made_to_thank_putin_at_school_opening/", + "https://www.reddit.com/r/worldnews/comments/167lc1b/ukrainian_armed_forces_exhaust_russians_near/", + "https://www.reddit.com/r/worldnews/comments/1680gl6/ukraine_says_it_has_identified_a_russian/", + "https://www.reddit.com/r/worldnews/comments/167ncgy/35_year_old_iranian_protester_dies_in_jail_after/", + "https://www.reddit.com/r/worldnews/comments/167nllk/north_korea_fires_several_cruise_missiles_towards/", + "https://www.reddit.com/r/worldnews/comments/167c47b/russia_to_block_g20_declaration_if_its_views_are/", + "https://www.reddit.com/r/worldnews/comments/16786qa/germany_charges_98yearold_nazi_guard_for_murder/" +] diff --git a/spec/fixtures/files/feeds/reddit/feed.xml b/spec/fixtures/files/feeds/reddit/feed.xml index db1b8d8d..83076c4b 100644 --- a/spec/fixtures/files/feeds/reddit/feed.xml +++ b/spec/fixtures/files/feeds/reddit/feed.xml @@ -1 +1,377 @@ -2023-06-08T17:46:29+00:00https://www.redditstatic.com/icon.png//r/worldnews/.rssA place for major news from around the world, excluding US-internal news.World News/u/WorldNewsModshttps://www.reddit.com/user/WorldNewsMods&#32; submitted by &#32; <a href="https://www.reddit.com/user/WorldNewsMods"> /u/WorldNewsMods </a> <br/> <span><a href="https://www.reddit.com/live/18hnzysb1elcs">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/143yos2/rworldnews_live_thread_russian_invasion_of/">[comments]</a></span>t3_143yos22023-06-08T04:02:45+00:002023-06-08T04:02:45+00:00/r/WorldNews Live Thread: Russian Invasion of Ukraine Day 470, Part 1 (Thread #611)/u/peretonahttps://www.reddit.com/user/peretona&#32; submitted by &#32; <a href="https://www.reddit.com/user/peretona"> /u/peretona </a> <br/> <span><a href="https://inews.co.uk/news/world/wagner-mercenaries-tortured-stole-tanks-russian-army-lieutenant-2396223">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1448dgc/wagner_mercenaries_tortured_me_and_stole_tanks/">[comments]</a></span>t3_1448dgc2023-06-08T12:48:20+00:002023-06-08T12:48:20+00:00Wagner mercenaries tortured me and stole tanks from the Russian army, captured lieutenant says/u/manishakadhttps://www.reddit.com/user/manishakad&#32; submitted by &#32; <a href="https://www.reddit.com/user/manishakad"> /u/manishakad </a> <br/> <span><a href="https://www.theguardian.com/world/2023/jun/08/russian-forces-accused-of-blocking-flood-evacuation-efforts">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/144a40r/russian_forces_accused_of_blocking_flood/">[comments]</a></span>t3_144a40r2023-06-08T14:01:08+00:002023-06-08T14:01:08+00:00Russian forces accused of blocking flood evacuation efforts in Ukraine | Ukraine/u/Severe_County_5041https://www.reddit.com/user/Severe_County_5041&#32; submitted by &#32; <a href="https://www.reddit.com/user/Severe_County_5041"> /u/Severe_County_5041 </a> <br/> <span><a href="https://www.channelnewsasia.com/asia/australia-ban-swastika-ss-sign-citing-rise-far-right-3547051?utm_source=dlvr.it&amp;utm_medium=twitter">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/143vikq/australia_to_ban_swastika_ss_sign_citing_rise_of/">[comments]</a></span>t3_143vikq2023-06-08T01:34:13+00:002023-06-08T01:34:13+00:00Australia to ban swastika, SS sign citing rise of far-right/u/ficerckhttps://www.reddit.com/user/ficerck&#32; submitted by &#32; <a href="https://www.reddit.com/user/ficerck"> /u/ficerck </a> <br/> <span><a href="https://www.ctvnews.ca/politics/india-among-top-actors-for-foreign-interference-in-canada-national-security-adviser-1.6428213">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/14459g2/india_among_top_actors_for_foreign_interference/">[comments]</a></span>t3_14459g22023-06-08T10:15:27+00:002023-06-08T10:15:27+00:00India among top actors for foreign interference in Canada: national security adviser/u/KI_officialhttps://www.reddit.com/user/KI_official&#32; submitted by &#32; <a href="https://www.reddit.com/user/KI_official"> /u/KI_official </a> <br/> <span><a href="https://kyivindependent.com/they-are-destroying-us-people-plea-to-escape-flooded-russian-occupied-areas/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1448og7/they_are_destroying_us_people_plea_to_escape/">[comments]</a></span>t3_1448og72023-06-08T13:01:22+00:002023-06-08T13:01:22+00:00'They are destroying us.' People plea to escape flooded Russian-occupied areas/u/DonSalaamhttps://www.reddit.com/user/DonSalaam&#32; submitted by &#32; <a href="https://www.reddit.com/user/DonSalaam"> /u/DonSalaam </a> <br/> <span><a href="https://www.aljazeera.com/news/2023/6/7/canadas-record-wildfires-should-be-wake-up-call-experts-warn">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/14428lv/canadas_record_wildfires_should_be_wakeup_call/">[comments]</a></span>t3_14428lv2023-06-08T07:16:34+00:002023-06-08T07:16:34+00:00Canada’s record wildfires should be ‘wake-up call’, experts warn/u/KI_officialhttps://www.reddit.com/user/KI_official&#32; submitted by &#32; <a href="https://www.reddit.com/user/KI_official"> /u/KI_official </a> <br/> <span><a href="https://kyivindependent.com/general-staff-russian-soldiers-didnt-prepare-for-kakhovka-dam-destruction-suffered-losses-on-dnipro-rivers-east-bank/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1448koc/general_staff_russian_soldiers_didnt_prepare_for/">[comments]</a></span>t3_1448koc2023-06-08T12:57:00+00:002023-06-08T12:57:00+00:00General Staff: Russian soldiers didn't prepare for Kakhovka dam destruction, suffered losses on Dnipro River's east bank/u/BezugssystemCH1903https://www.reddit.com/user/BezugssystemCH1903&#32; submitted by &#32; <a href="https://www.reddit.com/user/BezugssystemCH1903"> /u/BezugssystemCH1903 </a> <br/> <span><a href="https://www.swissinfo.ch/eng/business/italian-court-convicts-swiss-billionaire-in-asbestos-deaths/48575414">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1446jmp/italian_court_convicts_swiss_billionaire_in/">[comments]</a></span>t3_1446jmp2023-06-08T11:22:54+00:002023-06-08T11:22:54+00:00Italian court convicts Swiss billionaire in asbestos deaths/u/HelpfulYoghurthttps://www.reddit.com/user/HelpfulYoghurt&#32; submitted by &#32; <a href="https://www.reddit.com/user/HelpfulYoghurt"> /u/HelpfulYoghurt </a> <br/> <span><a href="https://news.yahoo.com/russia-decided-accidents-hazardous-facilities-084159995.html">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/143thsw/russia_decided_accidents_at_hazardous_facilities/">[comments]</a></span>t3_143thsw2023-06-08T00:05:12+00:002023-06-08T00:05:12+00:00Russia decided accidents at hazardous facilities would not be investigated shortly before blowing up Kakhovka Hydroelectric Power Plant/u/OkayButFoRealzhttps://www.reddit.com/user/OkayButFoRealz&#32; submitted by &#32; <a href="https://www.reddit.com/user/OkayButFoRealz"> /u/OkayButFoRealz </a> <br/> <span><a href="https://www.politico.eu/article/russians-shooting-at-rescuers-in-flooded-areas-zelenskyy-tells-politico/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/143lxoj/russians_shooting_at_rescuers_in_flooded_areas/">[comments]</a></span>t3_143lxoj2023-06-07T19:08:32+00:002023-06-07T19:08:32+00:00Russians Shooting at Rescuers in Flooded Areas, Zelenskyy Says/u/Caratteracciohttps://www.reddit.com/user/Caratteraccio&#32; submitted by &#32; <a href="https://www.reddit.com/user/Caratteraccio"> /u/Caratteraccio </a> <br/> <span><a href="https://apnews.com/article/norway-canada-wildfires-smoke-aad296c7b84cc969014614748aaa1046">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1446ua2/smoke_from_canadian_wildfires_forecast_to_reach/">[comments]</a></span>t3_1446ua22023-06-08T11:37:35+00:002023-06-08T11:37:35+00:00Smoke from Canadian wildfires forecast to reach Norway/u/erikmongabayhttps://www.reddit.com/user/erikmongabay&#32; submitted by &#32; <a href="https://www.reddit.com/user/erikmongabay"> /u/erikmongabay </a> <br/> <span><a href="https://news.mongabay.com/2023/06/fishers-confirm-scientists-warning-brazils-belo-monte-dam-killed-off-the-river/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/144a3af/fishermen_confirm_scientists_warning_brazils_belo/">[comments]</a></span>t3_144a3af2023-06-08T14:00:29+00:002023-06-08T14:00:29+00:00Fishermen confirm scientists’ warning: Brazil’s Belo Monte dam harmed the ecosystem: 7 years later, fish have largely disappeared from this stretch of the Xingu, a major tributary of the Amazon River/u/berlinparisexpresshttps://www.reddit.com/user/berlinparisexpress&#32; submitted by &#32; <a href="https://www.reddit.com/user/berlinparisexpress"> /u/berlinparisexpress </a> <br/> <span><a href="https://www.welcometothejungle.com/en/articles/in-australia-paid-leave-for-domestic-violence-survivors">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1449vuj/australia_mandates_paid_leave_for_domestic/">[comments]</a></span>t3_1449vuj2023-06-08T13:51:59+00:002023-06-08T13:51:59+00:00Australia mandates paid leave for domestic violence survivors/u/Kashif508ihttps://www.reddit.com/user/Kashif508i&#32; submitted by &#32; <a href="https://www.reddit.com/user/Kashif508i"> /u/Kashif508i </a> <br/> <span><a href="https://phys.org/news/2023-06-thousands-car-ocean-floor.html">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/143za9c/well_never_be_done_the_growing_challenge_to/">[comments]</a></span>t3_143za9c2023-06-08T04:32:22+00:002023-06-08T04:32:22+00:00'We'll never be done': The growing challenge to remove thousands of car tires from ocean floor/u/KrushRockhttps://www.reddit.com/user/KrushRock&#32; submitted by &#32; <a href="https://www.reddit.com/user/KrushRock"> /u/KrushRock </a> <br/> <span><a href="https://www.theguardian.com/world/2023/jun/07/nato-members-may-send-troops-to-ukraine-warns-former-alliance-chief">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/143o0vb/nato_members_may_send_troops_to_ukraine_warns/">[comments]</a></span>t3_143o0vb2023-06-07T20:29:30+00:002023-06-07T20:29:30+00:00Nato members may send troops to Ukraine, warns former alliance chief/u/bloomberghttps://www.reddit.com/user/bloomberg&#32; submitted by &#32; <a href="https://www.reddit.com/user/bloomberg"> /u/bloomberg </a> <br/> <span><a href="https://www.bloomberg.com/news/articles/2023-06-08/will-putin-win-the-war-in-ukraine-the-russian-elite-isn-t-convinced?sref=xuVirdpv">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/144eel8/russian_elite_is_souring_on_putins_chances_of/">[comments]</a></span>t3_144eel82023-06-08T16:49:02+00:002023-06-08T16:49:02+00:00Russian Elite Is Souring on Putin’s Chances of Winning His War/u/Red_Franklinhttps://www.reddit.com/user/Red_Franklin&#32; submitted by &#32; <a href="https://www.reddit.com/user/Red_Franklin"> /u/Red_Franklin </a> <br/> <span><a href="https://www.bbc.com/news/world-europe-65792384">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1448ymn/ukraine_war_deserters_risk_death_fleeing_to/">[comments]</a></span>t3_1448ymn2023-06-08T13:13:05+00:002023-06-08T13:13:05+00:00Ukraine war: Deserters risk death fleeing to Romania/u/Hoihehttps://www.reddit.com/user/Hoihe&#32; submitted by &#32; <a href="https://www.reddit.com/user/Hoihe"> /u/Hoihe </a> <br/> <span><a href="https://telex.hu/english/2023/06/08/a-quarter-of-hungarians-would-move-closer-to-russia-but-even-fidesz-and-mi-hazank-voters-are-pro-nato">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1446ut7/a_quarter_of_hungarians_support_closer_ties_with/">[comments]</a></span>t3_1446ut72023-06-08T11:38:18+00:002023-06-08T11:38:18+00:00A quarter of Hungarians support closer ties with Russia, but even Fidesz and Mi Hazánk voters are pro-NATO/u/plutoplopshttps://www.reddit.com/user/plutoplops&#32; submitted by &#32; <a href="https://www.reddit.com/user/plutoplops"> /u/plutoplops </a> <br/> <span><a href="https://au.news.yahoo.com/long-covid-could-come-brain-173000710.html?utm_source=Content&amp;utm_medium=Social&amp;utm_campaign=Reddit&amp;utm_term=Reddit&amp;ncid=other_redditau_p0v0x1ptm8i">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/143z0x5/fused_brain_cells_neuron_damage_may_explain_long/">[comments]</a></span>t3_143z0x52023-06-08T04:19:15+00:002023-06-08T04:19:15+00:00Fused brain cells, neuron damage may explain long COVID/u/theprofitablechttps://www.reddit.com/user/theprofitablec&#32; submitted by &#32; <a href="https://www.reddit.com/user/theprofitablec"> /u/theprofitablec </a> <br/> <span><a href="https://skyheadlines.com/brightest-gamma-ray-burst-the-most-powerful-space-explosion-ever-seen/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/144bhuq/brightest_gamma_ray_burst_the_most_powerful_space/">[comments]</a></span>t3_144bhuq2023-06-08T14:56:42+00:002023-06-08T14:56:42+00:00Brightest gamma ray burst: The most powerful space explosion ever seen/u/moonwalker271https://www.reddit.com/user/moonwalker271&#32; submitted by &#32; <a href="https://www.reddit.com/user/moonwalker271"> /u/moonwalker271 </a> <br/> <span><a href="https://m.timesofindia.com/world/south-asia/bomb-explodes-in-afghanistan-in-a-memorial-ceremony-for-a-taliban-official-killing-another-official/amp_articleshow/100850454.cms">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/144931b/bomb_explodes_in_afghanistan_in_a_memorial/">[comments]</a></span>t3_144931b2023-06-08T13:18:19+00:002023-06-08T13:18:19+00:00Bomb explodes in Afghanistan in a memorial ceremony for a Taliban official, killing another official/u/hockeyfan33333https://www.reddit.com/user/hockeyfan33333&#32; submitted by &#32; <a href="https://www.reddit.com/user/hockeyfan33333"> /u/hockeyfan33333 </a> <br/> <span><a href="https://news.yahoo.com/putin-freeze-war-ukraine-too-170945945.html">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/144fap4/putin_should_freeze_war_as_ukraine_too_strong/">[comments]</a></span>t3_144fap42023-06-08T17:22:52+00:002023-06-08T17:22:52+00:00Putin should freeze war as Ukraine 'too strong', says top Russian propagandist/u/Fresh-Night-3868https://www.reddit.com/user/Fresh-Night-3868&#32; submitted by &#32; <a href="https://www.reddit.com/user/Fresh-Night-3868"> /u/Fresh-Night-3868 </a> <br/> <span><a href="https://ncbna.org/nigeria-40-schools-are-now-accepting-garbage-as-tuition-fees-in-lagos/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1442u7b/nigeria_40_schools_are_now_accepting_garbage_as/">[comments]</a></span>t3_1442u7b2023-06-08T07:53:00+00:002023-06-08T07:53:00+00:00Nigeria: 40 schools are now accepting garbage as tuition fees in Lagos/u/green_flashhttps://www.reddit.com/user/green_flash&#32; submitted by &#32; <a href="https://www.reddit.com/user/green_flash"> /u/green_flash </a> <br/> <span><a href="https://www.politico.eu/article/zelenskyy-denies-ukraine-involvement-in-nord-stream-pipeline-blasts/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/143mn13/zelenskyy_denies_ukraine_involvement_in_nord/">[comments]</a></span>t3_143mn132023-06-07T19:35:42+00:002023-06-07T19:35:42+00:00Zelenskyy denies Ukraine involvement in Nord Stream pipeline blasts after claims that Western intelligence agencies knew of a Ukrainian-backed plan to take out the Baltic Sea gas links/u/KI_officialhttps://www.reddit.com/user/KI_official&#32; submitted by &#32; <a href="https://www.reddit.com/user/KI_official"> /u/KI_official </a> <br/> <span><a href="https://kyivindependent.com/zelensky-travels-to-kherson-oblast-amid-kahkovka-dam-disaster/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1448tun/zelensky_travels_to_kherson_oblast_amid_kahkovka/">[comments]</a></span>t3_1448tun2023-06-08T13:07:28+00:002023-06-08T13:07:28+00:00Zelensky travels to Kherson Oblast amid Kahkovka dam disaster + + + + 2023-09-02T13:44:07+00:00 + https://www.redditstatic.com/icon.png/ + /r/worldnews/.rss + + + A place for major news from around the world, excluding US-internal news. + World News + + + /u/WorldNewsMods + https://www.reddit.com/user/WorldNewsMods + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/"> <img src="https://b.thumbs.redditmedia.com/_JBQ4KK3qc6EBiTPWwpf25SiGNGPOV8NcPYXKk45IvE.jpg" alt="/r/WorldNews Live Thread: Russian Invasion of Ukraine Day 556, Part 1 (Thread #702)" title="/r/WorldNews Live Thread: Russian Invasion of Ukraine Day 556, Part 1 (Thread #702)" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/WorldNewsMods"> /u/WorldNewsMods </a> <br/> <span><a href="https://www.reddit.com/live/18hnzysb1elcs">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/">[comments]</a></span> </td></tr></table> + t3_167sdt8 + + + 2023-09-02T04:02:37+00:00 + 2023-09-02T04:02:37+00:00 + /r/WorldNews Live Thread: Russian Invasion of Ukraine Day 556, Part 1 (Thread #702) + + + + /u/Available_Hamster_44 + https://www.reddit.com/user/Available_Hamster_44 + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167qju7/10yearold_boy_thrown_off_bridge_in_germany_for/"> <img src="https://external-preview.redd.it/cUlzytAamAZZxqBt_oqiZ_-iUJ8djaoe_ZMKjLwWlrA.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=60bf559c58f35edd2e21bb1cd87066e355533c06" alt="10-year-old boy thrown off bridge in Germany for speaking Ukrainian" title="10-year-old boy thrown off bridge in Germany for speaking Ukrainian" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Available_Hamster_44"> /u/Available_Hamster_44 </a> <br/> <span><a href="https://www.pravda.com.ua/eng/news/2023/09/1/7418095/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167qju7/10yearold_boy_thrown_off_bridge_in_germany_for/">[comments]</a></span> </td></tr></table> + t3_167qju7 + + + 2023-09-02T02:31:08+00:00 + 2023-09-02T02:31:08+00:00 + 10-year-old boy thrown off bridge in Germany for speaking Ukrainian + + + + /u/MtnSlyr + https://www.reddit.com/user/MtnSlyr + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167ymp8/vietnam_to_take_their_relationship_with_us_to/"> <img src="https://external-preview.redd.it/LDtTUSOc7dFjpFQsq_YokknP8XEJEIUg1aZxPCSAZM0.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=716269df54d0cf6b6d47f87cf97a8c72662bbbf3" alt="Vietnam to take their relationship with US to “next level”" title="Vietnam to take their relationship with US to “next level”" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/MtnSlyr"> /u/MtnSlyr </a> <br/> <span><a href="https://www.washingtonpost.com/national-security/2023/09/01/vietnam-biden-partnership-china/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167ymp8/vietnam_to_take_their_relationship_with_us_to/">[comments]</a></span> </td></tr></table> + t3_167ymp8 + + + 2023-09-02T10:06:38+00:00 + 2023-09-02T10:06:38+00:00 + Vietnam to take their relationship with US to “next level” + + + + /u/Beingguiderr + https://www.reddit.com/user/Beingguiderr + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167p2b7/top_russian_space_scientist_dies_of_mushroom/"> <img src="https://external-preview.redd.it/Wh9Kh46rTh9_Cc-YumFZ4xuicW2DHaraf6oN4wUQnCY.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=12d4d01925a936ddf542b286409c99399798bce0" alt="Top Russian space scientist dies of mushroom poisoning" title="Top Russian space scientist dies of mushroom poisoning" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Beingguiderr"> /u/Beingguiderr </a> <br/> <span><a href="https://ptv-news.com.pk/Top-russian-rocket-scientist-dies">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167p2b7/top_russian_space_scientist_dies_of_mushroom/">[comments]</a></span> </td></tr></table> + t3_167p2b7 + + + 2023-09-02T01:19:57+00:00 + 2023-09-02T01:19:57+00:00 + Top Russian space scientist dies of mushroom poisoning + + + + /u/Americanhoney7 + https://www.reddit.com/user/Americanhoney7 + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167vmk8/russian_army_losses_600_soldiers_and_dozens_of/"> <img src="https://external-preview.redd.it/DU9A1fNKNJBDhUEtzg3uNRH8d2u-MZoklVUTeVNQ-JI.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=7067c60ba96dbc583b84553d9f51cd9658044c6c" alt="Russian army losses 600 soldiers and dozens of vehicles in one day in Ukraine" title="Russian army losses 600 soldiers and dozens of vehicles in one day in Ukraine" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Americanhoney7"> /u/Americanhoney7 </a> <br/> <span><a href="https://globalpulsenews.com/russian-army-losses-600-soldiers-and-dozens-of-vehicles-in-one-day-in-ukraine/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167vmk8/russian_army_losses_600_soldiers_and_dozens_of/">[comments]</a></span> </td></tr></table> + t3_167vmk8 + + + 2023-09-02T07:03:52+00:00 + 2023-09-02T07:03:52+00:00 + Russian army losses 600 soldiers and dozens of vehicles in one day in Ukraine + + + + /u/professorbrainiac + https://www.reddit.com/user/professorbrainiac + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167wlo6/china_put_out_a_new_offical_map_that_claims/"> <img src="https://external-preview.redd.it/feTgCyho9vfaR611qDxCGnm9ps5V7h8x7NTsxcZ5qbU.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=8029dd8ee35e36d09ec22a5198ef86ffa43f0d4b" alt="China Put Out a New Offical Map That Claims Russian Territory" title="China Put Out a New Offical Map That Claims Russian Territory" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/professorbrainiac"> /u/professorbrainiac </a> <br/> <span><a href="https://www.19fortyfive.com/2023/09/china-put-out-a-new-offical-map-that-claims-russian-territory/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167wlo6/china_put_out_a_new_offical_map_that_claims/">[comments]</a></span> </td></tr></table> + t3_167wlo6 + + + 2023-09-02T08:03:41+00:00 + 2023-09-02T08:03:41+00:00 + China Put Out a New Offical Map That Claims Russian Territory + + + + /u/twitchactii + https://www.reddit.com/user/twitchactii + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167j17s/us_to_send_its_first_depleted_uranium_rounds_to/"> <img src="https://external-preview.redd.it/JHWUxU-iHFbrZ_supJklEo2t5gepJuiEKD8pjMllKeg.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=3f43e0def0381a9cee0db330218fa97c4e62ef1c" alt="US to send its first depleted uranium rounds to Ukraine" title="US to send its first depleted uranium rounds to Ukraine" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/twitchactii"> /u/twitchactii </a> <br/> <span><a href="https://www.jpost.com/international/article-757223">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167j17s/us_to_send_its_first_depleted_uranium_rounds_to/">[comments]</a></span> </td></tr></table> + t3_167j17s + + + 2023-09-01T21:03:37+00:00 + 2023-09-01T21:03:37+00:00 + US to send its first depleted uranium rounds to Ukraine + + + + /u/DonSalaam + https://www.reddit.com/user/DonSalaam + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167ucb5/meta_and_alphabet_would_owe_at_least_4_of_annual/"> <img src="https://external-preview.redd.it/4WzC-hma7Rky70uXZCmZonsAZpOOoZgAHE-_TMM60k0.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=119802c347148ab14649463540510538d16a4fa9" alt="Meta and Alphabet would owe at least 4% of annual revenue in Canada to news outlets under draft regulations pushed by Justin Trudeau" title="Meta and Alphabet would owe at least 4% of annual revenue in Canada to news outlets under draft regulations pushed by Justin Trudeau" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/DonSalaam"> /u/DonSalaam </a> <br/> <span><a href="https://fortune.com/2023/09/01/meta-alphabet-canada-news-outlets-draft-regulations-justin-trudeau/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167ucb5/meta_and_alphabet_would_owe_at_least_4_of_annual/">[comments]</a></span> </td></tr></table> + t3_167ucb5 + + + 2023-09-02T05:49:28+00:00 + 2023-09-02T05:49:28+00:00 + Meta and Alphabet would owe at least 4% of annual revenue in Canada to news outlets under draft regulations pushed by Justin Trudeau + + + + /u/Awkward-Buffalo5686 + https://www.reddit.com/user/Awkward-Buffalo5686 + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167bd2t/retired_teacher_sentenced_to_death_in_saudi/"> <img src="https://external-preview.redd.it/z5crYbI30_gnXPlf8TnxK2WRX-Ru6Nr40cDhZB67_oQ.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=618befdc20eb7a665ec5efc62175a6bcd3a2a004" alt="Retired teacher sentenced to death in Saudi Arabia after tweeting criticism" title="Retired teacher sentenced to death in Saudi Arabia after tweeting criticism" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Awkward-Buffalo5686"> /u/Awkward-Buffalo5686 </a> <br/> <span><a href="https://www.cnn.com/2023/08/31/middleeast/saudi-arabia-retired-teacher-death-sentence-intl/index.html">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167bd2t/retired_teacher_sentenced_to_death_in_saudi/">[comments]</a></span> </td></tr></table> + t3_167bd2t + + + 2023-09-01T16:10:43+00:00 + 2023-09-01T16:10:43+00:00 + Retired teacher sentenced to death in Saudi Arabia after tweeting criticism + + + + /u/Head_Shot_dp + https://www.reddit.com/user/Head_Shot_dp + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167q98v/russia_deploys_icbm_that_putin_says_will_make/"> <img src="https://external-preview.redd.it/fKER-TdhtyZc198jekLMcV4UucqDLtb4OR-9mb-mRDw.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=d2358bed9d8340f4a3a67bef214bde752d04568f" alt="Russia deploys ICBM that Putin says will make enemies 'think twice'" title="Russia deploys ICBM that Putin says will make enemies 'think twice'" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Head_Shot_dp"> /u/Head_Shot_dp </a> <br/> <span><a href="https://www.business-standard.com/amp/world-news/russia-deploys-icbm-that-putin-says-will-make-enemies-think-twice-123090200060_1.html">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167q98v/russia_deploys_icbm_that_putin_says_will_make/">[comments]</a></span> </td></tr></table> + t3_167q98v + + + 2023-09-02T02:16:36+00:00 + 2023-09-02T02:16:36+00:00 + Russia deploys ICBM that Putin says will make enemies 'think twice' + + + + /u/st3ll4r-wind + https://www.reddit.com/user/st3ll4r-wind + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167h55i/china_says_it_deplores_us_military_transfer_to/"> <img src="https://external-preview.redd.it/qEPpckn2LHAjcP-NUlbznWdn14nS_n9hbEA-1pIPjD4.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=a83b0842460625891205a8a38c27c49617ef0120" alt="China says it ‘deplores’ US military transfer to Taiwan" title="China says it ‘deplores’ US military transfer to Taiwan" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/st3ll4r-wind"> /u/st3ll4r-wind </a> <br/> <span><a href="https://thehill.com/policy/defense/4182023-china-says-it-deplores-us-military-transfer-to-taiwan/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167h55i/china_says_it_deplores_us_military_transfer_to/">[comments]</a></span> </td></tr></table> + t3_167h55i + + + 2023-09-01T19:50:23+00:00 + 2023-09-01T19:50:23+00:00 + China says it ‘deplores’ US military transfer to Taiwan + + + + /u/HydrolicKrane + https://www.reddit.com/user/HydrolicKrane + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167zpnm/ukraine_says_it_has_manufactured_and_fired_a/"> <img src="https://external-preview.redd.it/ZfoGTTJuWY2WP4PGimjK4DcXREv1NP2dq7LMNQBKaCA.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=fcac564acdf1ecae1de4f0885ab933f8eb7e4104" alt="Ukraine says it has manufactured and fired a long-range missile" title="Ukraine says it has manufactured and fired a long-range missile" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/HydrolicKrane"> /u/HydrolicKrane </a> <br/> <span><a href="https://www.washingtonpost.com/world/2023/09/01/ukraine-missile-longrange-russia-manufactured/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167zpnm/ukraine_says_it_has_manufactured_and_fired_a/">[comments]</a></span> </td></tr></table> + t3_167zpnm + + + 2023-09-02T11:08:59+00:00 + 2023-09-02T11:08:59+00:00 + Ukraine says it has manufactured and fired a long-range missile + + + + /u/MaleficentParfait863 + https://www.reddit.com/user/MaleficentParfait863 + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167ctld/only_1280_breeding_humans_once_roamed_earth_gene/"> <img src="https://external-preview.redd.it/RMITCj7dEi2XtsPBuipLfO3iZs3UhNuPPUWbVl7jPZA.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=4402e1d5f6d513f1a68fa25b919496f12a6f1380" alt="Only 1,280 breeding humans once roamed Earth, gene study shows" title="Only 1,280 breeding humans once roamed Earth, gene study shows" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/MaleficentParfait863"> /u/MaleficentParfait863 </a> <br/> <span><a href="https://gizmodo.com/genetic-population-bottleneck-1850792411">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167ctld/only_1280_breeding_humans_once_roamed_earth_gene/">[comments]</a></span> </td></tr></table> + t3_167ctld + + + 2023-09-01T17:05:53+00:00 + 2023-09-01T17:05:53+00:00 + Only 1,280 breeding humans once roamed Earth, gene study shows + + + + /u/Accurate9638 + https://www.reddit.com/user/Accurate9638 + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167pmis/russia_will_want_revenge_after_losing_the_war/"> <img src="https://external-preview.redd.it/xzWeCMIwnXgds0MApmppG2YdNi_Zz6JefnoUvU5bZVc.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=10c48bd1ffcbc6fd44c86477a393b1ec9046e19d" alt="Russia will want revenge after losing the war, this may happen in 10 years – Ukraine's Defence Intelligence Chief" title="Russia will want revenge after losing the war, this may happen in 10 years – Ukraine's Defence Intelligence Chief" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Accurate9638"> /u/Accurate9638 </a> <br/> <span><a href="https://www.pravda.com.ua/eng/news/2023/09/1/7418008/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167pmis/russia_will_want_revenge_after_losing_the_war/">[comments]</a></span> </td></tr></table> + t3_167pmis + + + 2023-09-02T01:46:48+00:00 + 2023-09-02T01:46:48+00:00 + Russia will want revenge after losing the war, this may happen in 10 years – Ukraine's Defence Intelligence Chief + + + + /u/Gopu_17 + https://www.reddit.com/user/Gopu_17 + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167w4xn/putin_tells_schoolchildren_russia_is_invincible/"> <img src="https://external-preview.redd.it/97maokZ0tC4PAmqYyNJ6vxkC8CqMBL-O1IcKsZNhnNY.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=af7b30f135a3e0d12564eac7cb5d79dec4a36b90" alt="Putin Tells Schoolchildren Russia Is 'Invincible'" title="Putin Tells Schoolchildren Russia Is 'Invincible'" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Gopu_17"> /u/Gopu_17 </a> <br/> <span><a href="https://www.themoscowtimes.com/2023/09/01/putin-tells-schoolchildren-russia-is-invincible-a82337">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167w4xn/putin_tells_schoolchildren_russia_is_invincible/">[comments]</a></span> </td></tr></table> + t3_167w4xn + + + 2023-09-02T07:34:47+00:00 + 2023-09-02T07:34:47+00:00 + Putin Tells Schoolchildren Russia Is 'Invincible' + + + + /u/goofyOatmeal91990 + https://www.reddit.com/user/goofyOatmeal91990 + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167gy3y/american_airlines_flying_bigger_jets_so_people/"> <img src="https://external-preview.redd.it/Y4hoTuwzRY0lxVau3_yzsu7TuhXvHIUFSwDYt6_64ak.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=7b3ad8cf99f53c879ef58aa3e9dbf1e00f4ba165" alt="American Airlines flying bigger jets so people can flee Haiti, after U.S. tells Americans to go" title="American Airlines flying bigger jets so people can flee Haiti, after U.S. tells Americans to go" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/goofyOatmeal91990"> /u/goofyOatmeal91990 </a> <br/> <span><a href="https://www.miamiherald.com/news/nation-world/world/americas/haiti/article278864279.html#storylink=mainstage_lead">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167gy3y/american_airlines_flying_bigger_jets_so_people/">[comments]</a></span> </td></tr></table> + t3_167gy3y + + + 2023-09-01T19:42:56+00:00 + 2023-09-01T19:42:56+00:00 + American Airlines flying bigger jets so people can flee Haiti, after U.S. tells Americans to go + + + + /u/Smithy2232 + https://www.reddit.com/user/Smithy2232 + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/1680nk6/nobel_foundation_cancels_russia_belarus_iran/"> <img src="https://external-preview.redd.it/CgOX8hETm_FA-1TyWgPRM_kv1LkJiTjrP_RwwEzgVv4.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=7881999823b372c59627ec2abed6484396835188" alt="Nobel Foundation cancels Russia, Belarus, Iran invites to annual prize awards" title="Nobel Foundation cancels Russia, Belarus, Iran invites to annual prize awards" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Smithy2232"> /u/Smithy2232 </a> <br/> <span><a href="https://www.reuters.com/world/nobel-foundation-cancels-russia-belarus-iran-invites-annual-prize-awards-2023-09-02/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1680nk6/nobel_foundation_cancels_russia_belarus_iran/">[comments]</a></span> </td></tr></table> + t3_1680nk6 + + + 2023-09-02T12:00:06+00:00 + 2023-09-02T12:00:06+00:00 + Nobel Foundation cancels Russia, Belarus, Iran invites to annual prize awards + + + + /u/sometimes_correct + https://www.reddit.com/user/sometimes_correct + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167jr9b/ukraine_war_us_sees_notable_progress_by_ukraine/"> <img src="https://external-preview.redd.it/cRej3zWEs0PBdCdUsr4e_gaPf5q4OPLGPsg0zQy1paQ.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=a9d8100e1cc4e494f7afba87dd1ce69ff48e83c8" alt="Ukraine war: US sees notable progress; by Ukraine army in south" title="Ukraine war: US sees notable progress; by Ukraine army in south" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/sometimes_correct"> /u/sometimes_correct </a> <br/> <span><a href="https://www.bbc.com/news/world-europe-66686149">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167jr9b/ukraine_war_us_sees_notable_progress_by_ukraine/">[comments]</a></span> </td></tr></table> + t3_167jr9b + + + 2023-09-01T21:32:01+00:00 + 2023-09-01T21:32:01+00:00 + Ukraine war: US sees notable progress; by Ukraine army in south + + + + /u/UNITED24Media + https://www.reddit.com/user/UNITED24Media + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167z1s9/nobel_foundation_cancels_russian_ambassador/"> <img src="https://external-preview.redd.it/Ko1tTtddM7N72U3EXGsY6Qdr4TRVgqRikZU1Svl2tws.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=7c197a3d999159b7e7227db94eab8e73cfeda11d" alt="Nobel Foundation Cancels Russian Ambassador Invite To Prize Ceremony: Statement" title="Nobel Foundation Cancels Russian Ambassador Invite To Prize Ceremony: Statement" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/UNITED24Media"> /u/UNITED24Media </a> <br/> <span><a href="https://www.barrons.com/news/nobel-foundation-cancels-russian-ambassador-invite-to-prize-ceremony-statement-a2cdcc68?refsec=topics_afp-news">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167z1s9/nobel_foundation_cancels_russian_ambassador/">[comments]</a></span> </td></tr></table> + t3_167z1s9 + + + 2023-09-02T10:30:50+00:00 + 2023-09-02T10:30:50+00:00 + Nobel Foundation Cancels Russian Ambassador Invite To Prize Ceremony: Statement + + + + /u/eaglemaxie + https://www.reddit.com/user/eaglemaxie + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167e9pa/child_made_to_thank_putin_at_school_opening/"> <img src="https://external-preview.redd.it/ZUpEOv2rs9cBZraUgZCBMcI5i7PjUzvr5ZN_nxeaEt8.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=6ce7194a3ff179fb4c52d6d92faf29988a0c1d53" alt="Child made to &quot;thank&quot; Putin at school opening ceremony in devastated Mariupol" title="Child made to &quot;thank&quot; Putin at school opening ceremony in devastated Mariupol" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/eaglemaxie"> /u/eaglemaxie </a> <br/> <span><a href="https://www.pravda.com.ua/eng/news/2023/09/1/7418083/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167e9pa/child_made_to_thank_putin_at_school_opening/">[comments]</a></span> </td></tr></table> + t3_167e9pa + + + 2023-09-01T18:00:36+00:00 + 2023-09-01T18:00:36+00:00 + Child made to "thank" Putin at school opening ceremony in devastated Mariupol + + + + /u/None_4All + https://www.reddit.com/user/None_4All + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167lc1b/ukrainian_armed_forces_exhaust_russians_near/"> <img src="https://external-preview.redd.it/t_vQODnS0trvFWGOjPPPb65lkk33tjLcxX8BuyYwTo8.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=c150abd05e72d2ac2a5e24b9462883896432354c" alt="Ukrainian Armed Forces exhaust Russians near Robotyne to break through 1st line of defence – Estonian Intelligence" title="Ukrainian Armed Forces exhaust Russians near Robotyne to break through 1st line of defence – Estonian Intelligence" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/None_4All"> /u/None_4All </a> <br/> <span><a href="https://www.pravda.com.ua/eng/news/2023/09/1/7418029/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167lc1b/ukrainian_armed_forces_exhaust_russians_near/">[comments]</a></span> </td></tr></table> + t3_167lc1b + + + 2023-09-01T22:35:13+00:00 + 2023-09-01T22:35:13+00:00 + Ukrainian Armed Forces exhaust Russians near Robotyne to break through 1st line of defence – Estonian Intelligence + + + + /u/M795 + https://www.reddit.com/user/M795 + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/1680gl6/ukraine_says_it_has_identified_a_russian/"> <img src="https://external-preview.redd.it/fuGzX3ETL4DqpB9stkWz11P-gwRWRAlstcfGCKdjZ64.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=c01948e05924c8574d17245dcb4b21029421a8f0" alt="Ukraine says it has identified a Russian commander accused of Bucha atrocities" title="Ukraine says it has identified a Russian commander accused of Bucha atrocities" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/M795"> /u/M795 </a> <br/> <span><a href="https://www.cnn.com/2023/09/02/europe/ukraine-ids-russian-commander-atrocities-bucha-intl-hnk/index.html">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1680gl6/ukraine_says_it_has_identified_a_russian/">[comments]</a></span> </td></tr></table> + t3_1680gl6 + + + 2023-09-02T11:49:46+00:00 + 2023-09-02T11:49:46+00:00 + Ukraine says it has identified a Russian commander accused of Bucha atrocities + + + + /u/Naderium + https://www.reddit.com/user/Naderium + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167ncgy/35_year_old_iranian_protester_dies_in_jail_after/"> <img src="https://external-preview.redd.it/y3APupADQKBp6EBFoZyK5GO2raJapncvX7ni-tNiZSk.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=3d9dd147f44a4c752ba63fe2bf114af21731a4ed" alt="35 year old Iranian protester dies in jail after avoiding death sentence." title="35 year old Iranian protester dies in jail after avoiding death sentence." /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Naderium"> /u/Naderium </a> <br/> <span><a href="https://www.bbc.com/news/world-middle-east-66677352">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167ncgy/35_year_old_iranian_protester_dies_in_jail_after/">[comments]</a></span> </td></tr></table> + t3_167ncgy + + + 2023-09-02T00:01:19+00:00 + 2023-09-02T00:01:19+00:00 + 35 year old Iranian protester dies in jail after avoiding death sentence. + + + + /u/NamelessForce + https://www.reddit.com/user/NamelessForce + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167nllk/north_korea_fires_several_cruise_missiles_towards/"> <img src="https://external-preview.redd.it/YkW_TmGfakGwbo4WBKP5pSuOLZG_YFEPSvpHrHMs-QA.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=eb6c572204365463d44745af9486952b94005f73" alt="North Korea fires several cruise missiles towards the sea" title="North Korea fires several cruise missiles towards the sea" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/NamelessForce"> /u/NamelessForce </a> <br/> <span><a href="https://www.canberratimes.com.au/story/8333250/n-korea-fires-several-cruise-missiles-towards-the-sea/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167nllk/north_korea_fires_several_cruise_missiles_towards/">[comments]</a></span> </td></tr></table> + t3_167nllk + + + 2023-09-02T00:12:33+00:00 + 2023-09-02T00:12:33+00:00 + North Korea fires several cruise missiles towards the sea + + + + /u/Americanhoney7 + https://www.reddit.com/user/Americanhoney7 + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167c47b/russia_to_block_g20_declaration_if_its_views_are/"> <img src="https://external-preview.redd.it/treK9UpbEpdrIbBa7l78kp059_ScA4H7U0rlRp7V-os.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=90e2e42558f1ccfa56db662e1eba5fc55ad4d2db" alt="Russia to block G20 declaration if its views are ignored - Lavrov" title="Russia to block G20 declaration if its views are ignored - Lavrov" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Americanhoney7"> /u/Americanhoney7 </a> <br/> <span><a href="https://news.yahoo.com/russia-block-g20-declaration-views-094332700.html">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167c47b/russia_to_block_g20_declaration_if_its_views_are/">[comments]</a></span> </td></tr></table> + t3_167c47b + + + 2023-09-01T16:39:05+00:00 + 2023-09-01T16:39:05+00:00 + Russia to block G20 declaration if its views are ignored - Lavrov + + + + /u/Huge-Jellyfish9948 + https://www.reddit.com/user/Huge-Jellyfish9948 + + + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/16786qa/germany_charges_98yearold_nazi_guard_for_murder/"> <img src="https://external-preview.redd.it/nlmHWT9oNezpCzXXcIHphC3FRXBCpk-cc7zhwGiy4f4.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=03db059bf82882395fe2a24202fc809d1f60e65a" alt="Germany charges 98-year-old Nazi guard for murder complicity – DW – 09/01/2023" title="Germany charges 98-year-old Nazi guard for murder complicity – DW – 09/01/2023" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Huge-Jellyfish9948"> /u/Huge-Jellyfish9948 </a> <br/> <span><a href="https://www.dw.com/en/germany-charges-98-year-old-nazi-guard-for-murder-complicity/a-66694447?utm_source=ground.news&amp;utm_medium=referral">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/16786qa/germany_charges_98yearold_nazi_guard_for_murder/">[comments]</a></span> </td></tr></table> + t3_16786qa + + + 2023-09-01T14:09:11+00:00 + 2023-09-01T14:09:11+00:00 + Germany charges 98-year-old Nazi guard for murder complicity – DW – 09/01/2023 + + diff --git a/spec/processors/reddit_processor_spec.rb b/spec/processors/reddit_processor_spec.rb index 89dba542..5c90c782 100644 --- a/spec/processors/reddit_processor_spec.rb +++ b/spec/processors/reddit_processor_spec.rb @@ -16,8 +16,7 @@ ) end - let(:expected_uids) { expected_points.pluck("link") } - let(:expected_points) { JSON.parse(file_fixture("feeds/reddit/expected_points.json").read) } + let(:expected_uids) { JSON.parse(file_fixture("feeds/reddit/expected_uids.json").read) } let(:thread_url) { %r{^https://.*/r/worldnews/comments/} } let(:thread_contents) { file_fixture("feeds/reddit/libreddit_comments_page.html").read } From 0badd7f56d243700e54324a9c96ffb2dc531b2e9 Mon Sep 17 00:00:00 2001 From: Alex Musayev Date: Sat, 2 Sep 2023 17:48:52 +0200 Subject: [PATCH 2/6] Update Reddit normalizer --- app/normalizers/reddit_normalizer.rb | 40 ++- app/services/pull.rb | 18 +- config/feeds.yml | 2 +- spec/fixtures/files/feeds/reddit/feed.xml | 340 +----------------- .../files/feeds/reddit/normalized.json | 20 ++ spec/normalizers/reddit_normalizer_spec.rb | 37 ++ 6 files changed, 96 insertions(+), 361 deletions(-) create mode 100644 spec/fixtures/files/feeds/reddit/normalized.json create mode 100644 spec/normalizers/reddit_normalizer_spec.rb diff --git a/app/normalizers/reddit_normalizer.rb b/app/normalizers/reddit_normalizer.rb index 629d41ee..58ac9245 100644 --- a/app/normalizers/reddit_normalizer.rb +++ b/app/normalizers/reddit_normalizer.rb @@ -1,29 +1,43 @@ -class RedditNormalizer < AtomNormalizer +class RedditNormalizer < BaseNormalizer def link - discussion_url + xml.xpath("/entry/link").first.attributes["href"].value end - def text - [super.sub(/\.$/, ""), source_url].join(separator) + def published_at + DateTime.parse(xml.xpath("/entry/published").first.content) end - def comments - (source_url == discussion_url) ? [] : [discussion_url] + def text + source_url = extract_source_url + source_reference = source_url.present? ? "#{separator}#{source_url}" : "" + "#{title}#{source_reference}\nThread: #{link}" end private - def source_url - @source_url ||= Html.link_urls(extract_content)[1] + def thumbnail_url + xml.xpath("/entry/thumbnail").first.attributes["url"].value rescue StandardError - @source_url ||= discussion_url + nil + end + + def extract_source_url + content_urls.reject { URI.parse(_1).host =~ /reddit\.com/ }.first + end + + def content_urls + parsed_content_html.css("a").map { _1.attributes["href"].value } + end + + def parsed_content_html + Nokogiri::HTML(xml.xpath("/entry/content").first.content) end - def discussion_url - entity.content.link.href + def title + xml.xpath("/entry/title").first.content end - def extract_content - content.content.content + def xml + @xml ||= Nokogiri::XML(content).tap { _1.remove_namespaces! } end end diff --git a/app/services/pull.rb b/app/services/pull.rb index 3be3f7db..529dbabb 100644 --- a/app/services/pull.rb +++ b/app/services/pull.rb @@ -36,16 +36,16 @@ def load_entities def normalize_entity(entity) normalizer_class.call(entity) - rescue StandardError => e - log_error("normalization_error: #{e}") + # # rescue StandardError => e + # # log_error("normalization_error: #{e}") - ErrorDumper.call( - exception: e, - message: "Normalization error", - target: feed, - context: {uid: entity.uid} - ) + # # ErrorDumper.call( + # # exception: e, + # # message: "Normalization error", + # # target: feed, + # # context: {uid: entity.uid} + # # ) - nil + # nil end end diff --git a/config/feeds.yml b/config/feeds.yml index 15faecfa..22e355ae 100644 --- a/config/feeds.yml +++ b/config/feeds.yml @@ -159,7 +159,7 @@ processor: "reddit" normalizer: "reddit" after: "2021-01-06T12:00:00+00:00" - refresh_interval: 1200 + refresh_interval: 0 import_limit: 2 - name: "avokado-fm" diff --git a/spec/fixtures/files/feeds/reddit/feed.xml b/spec/fixtures/files/feeds/reddit/feed.xml index 83076c4b..b4d5aa4a 100644 --- a/spec/fixtures/files/feeds/reddit/feed.xml +++ b/spec/fixtures/files/feeds/reddit/feed.xml @@ -16,97 +16,13 @@ https://www.reddit.com/user/WorldNewsMods - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/"> <img src="https://b.thumbs.redditmedia.com/_JBQ4KK3qc6EBiTPWwpf25SiGNGPOV8NcPYXKk45IvE.jpg" alt="/r/WorldNews Live Thread: Russian Invasion of Ukraine Day 556, Part 1 (Thread #702)" title="/r/WorldNews Live Thread: Russian Invasion of Ukraine Day 556, Part 1 (Thread #702)" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/WorldNewsMods"> /u/WorldNewsMods </a> <br/> <span><a href="https://www.reddit.com/live/18hnzysb1elcs">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/">[comments]</a></span> </td></tr></table> + <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/"> <img src="https://b.thumbs.redditmedia.com/_JBQ4KK3qc6EBiTPWwpf25SiGNGPOV8NcPYXKk45IvE.jpg" alt="/r/WorldNews Live Thread" title="/r/WorldNews Live Thread" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/WorldNewsMods"> /u/WorldNewsMods </a> <br/> <span><a href="https://www.reddit.com/live/18hnzysb1elcs">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/">[comments]</a></span> </td></tr></table> t3_167sdt8 2023-09-02T04:02:37+00:00 2023-09-02T04:02:37+00:00 - /r/WorldNews Live Thread: Russian Invasion of Ukraine Day 556, Part 1 (Thread #702) - - - - /u/Available_Hamster_44 - https://www.reddit.com/user/Available_Hamster_44 - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167qju7/10yearold_boy_thrown_off_bridge_in_germany_for/"> <img src="https://external-preview.redd.it/cUlzytAamAZZxqBt_oqiZ_-iUJ8djaoe_ZMKjLwWlrA.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=60bf559c58f35edd2e21bb1cd87066e355533c06" alt="10-year-old boy thrown off bridge in Germany for speaking Ukrainian" title="10-year-old boy thrown off bridge in Germany for speaking Ukrainian" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Available_Hamster_44"> /u/Available_Hamster_44 </a> <br/> <span><a href="https://www.pravda.com.ua/eng/news/2023/09/1/7418095/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167qju7/10yearold_boy_thrown_off_bridge_in_germany_for/">[comments]</a></span> </td></tr></table> - t3_167qju7 - - - 2023-09-02T02:31:08+00:00 - 2023-09-02T02:31:08+00:00 - 10-year-old boy thrown off bridge in Germany for speaking Ukrainian - - - - /u/MtnSlyr - https://www.reddit.com/user/MtnSlyr - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167ymp8/vietnam_to_take_their_relationship_with_us_to/"> <img src="https://external-preview.redd.it/LDtTUSOc7dFjpFQsq_YokknP8XEJEIUg1aZxPCSAZM0.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=716269df54d0cf6b6d47f87cf97a8c72662bbbf3" alt="Vietnam to take their relationship with US to “next level”" title="Vietnam to take their relationship with US to “next level”" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/MtnSlyr"> /u/MtnSlyr </a> <br/> <span><a href="https://www.washingtonpost.com/national-security/2023/09/01/vietnam-biden-partnership-china/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167ymp8/vietnam_to_take_their_relationship_with_us_to/">[comments]</a></span> </td></tr></table> - t3_167ymp8 - - - 2023-09-02T10:06:38+00:00 - 2023-09-02T10:06:38+00:00 - Vietnam to take their relationship with US to “next level” - - - - /u/Beingguiderr - https://www.reddit.com/user/Beingguiderr - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167p2b7/top_russian_space_scientist_dies_of_mushroom/"> <img src="https://external-preview.redd.it/Wh9Kh46rTh9_Cc-YumFZ4xuicW2DHaraf6oN4wUQnCY.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=12d4d01925a936ddf542b286409c99399798bce0" alt="Top Russian space scientist dies of mushroom poisoning" title="Top Russian space scientist dies of mushroom poisoning" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Beingguiderr"> /u/Beingguiderr </a> <br/> <span><a href="https://ptv-news.com.pk/Top-russian-rocket-scientist-dies">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167p2b7/top_russian_space_scientist_dies_of_mushroom/">[comments]</a></span> </td></tr></table> - t3_167p2b7 - - - 2023-09-02T01:19:57+00:00 - 2023-09-02T01:19:57+00:00 - Top Russian space scientist dies of mushroom poisoning - - - - /u/Americanhoney7 - https://www.reddit.com/user/Americanhoney7 - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167vmk8/russian_army_losses_600_soldiers_and_dozens_of/"> <img src="https://external-preview.redd.it/DU9A1fNKNJBDhUEtzg3uNRH8d2u-MZoklVUTeVNQ-JI.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=7067c60ba96dbc583b84553d9f51cd9658044c6c" alt="Russian army losses 600 soldiers and dozens of vehicles in one day in Ukraine" title="Russian army losses 600 soldiers and dozens of vehicles in one day in Ukraine" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Americanhoney7"> /u/Americanhoney7 </a> <br/> <span><a href="https://globalpulsenews.com/russian-army-losses-600-soldiers-and-dozens-of-vehicles-in-one-day-in-ukraine/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167vmk8/russian_army_losses_600_soldiers_and_dozens_of/">[comments]</a></span> </td></tr></table> - t3_167vmk8 - - - 2023-09-02T07:03:52+00:00 - 2023-09-02T07:03:52+00:00 - Russian army losses 600 soldiers and dozens of vehicles in one day in Ukraine - - - - /u/professorbrainiac - https://www.reddit.com/user/professorbrainiac - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167wlo6/china_put_out_a_new_offical_map_that_claims/"> <img src="https://external-preview.redd.it/feTgCyho9vfaR611qDxCGnm9ps5V7h8x7NTsxcZ5qbU.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=8029dd8ee35e36d09ec22a5198ef86ffa43f0d4b" alt="China Put Out a New Offical Map That Claims Russian Territory" title="China Put Out a New Offical Map That Claims Russian Territory" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/professorbrainiac"> /u/professorbrainiac </a> <br/> <span><a href="https://www.19fortyfive.com/2023/09/china-put-out-a-new-offical-map-that-claims-russian-territory/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167wlo6/china_put_out_a_new_offical_map_that_claims/">[comments]</a></span> </td></tr></table> - t3_167wlo6 - - - 2023-09-02T08:03:41+00:00 - 2023-09-02T08:03:41+00:00 - China Put Out a New Offical Map That Claims Russian Territory - - - - /u/twitchactii - https://www.reddit.com/user/twitchactii - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167j17s/us_to_send_its_first_depleted_uranium_rounds_to/"> <img src="https://external-preview.redd.it/JHWUxU-iHFbrZ_supJklEo2t5gepJuiEKD8pjMllKeg.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=3f43e0def0381a9cee0db330218fa97c4e62ef1c" alt="US to send its first depleted uranium rounds to Ukraine" title="US to send its first depleted uranium rounds to Ukraine" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/twitchactii"> /u/twitchactii </a> <br/> <span><a href="https://www.jpost.com/international/article-757223">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167j17s/us_to_send_its_first_depleted_uranium_rounds_to/">[comments]</a></span> </td></tr></table> - t3_167j17s - - - 2023-09-01T21:03:37+00:00 - 2023-09-01T21:03:37+00:00 - US to send its first depleted uranium rounds to Ukraine + /r/WorldNews Live Thread @@ -122,256 +38,4 @@ 2023-09-02T05:49:28+00:00 Meta and Alphabet would owe at least 4% of annual revenue in Canada to news outlets under draft regulations pushed by Justin Trudeau - - - /u/Awkward-Buffalo5686 - https://www.reddit.com/user/Awkward-Buffalo5686 - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167bd2t/retired_teacher_sentenced_to_death_in_saudi/"> <img src="https://external-preview.redd.it/z5crYbI30_gnXPlf8TnxK2WRX-Ru6Nr40cDhZB67_oQ.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=618befdc20eb7a665ec5efc62175a6bcd3a2a004" alt="Retired teacher sentenced to death in Saudi Arabia after tweeting criticism" title="Retired teacher sentenced to death in Saudi Arabia after tweeting criticism" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Awkward-Buffalo5686"> /u/Awkward-Buffalo5686 </a> <br/> <span><a href="https://www.cnn.com/2023/08/31/middleeast/saudi-arabia-retired-teacher-death-sentence-intl/index.html">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167bd2t/retired_teacher_sentenced_to_death_in_saudi/">[comments]</a></span> </td></tr></table> - t3_167bd2t - - - 2023-09-01T16:10:43+00:00 - 2023-09-01T16:10:43+00:00 - Retired teacher sentenced to death in Saudi Arabia after tweeting criticism - - - - /u/Head_Shot_dp - https://www.reddit.com/user/Head_Shot_dp - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167q98v/russia_deploys_icbm_that_putin_says_will_make/"> <img src="https://external-preview.redd.it/fKER-TdhtyZc198jekLMcV4UucqDLtb4OR-9mb-mRDw.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=d2358bed9d8340f4a3a67bef214bde752d04568f" alt="Russia deploys ICBM that Putin says will make enemies 'think twice'" title="Russia deploys ICBM that Putin says will make enemies 'think twice'" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Head_Shot_dp"> /u/Head_Shot_dp </a> <br/> <span><a href="https://www.business-standard.com/amp/world-news/russia-deploys-icbm-that-putin-says-will-make-enemies-think-twice-123090200060_1.html">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167q98v/russia_deploys_icbm_that_putin_says_will_make/">[comments]</a></span> </td></tr></table> - t3_167q98v - - - 2023-09-02T02:16:36+00:00 - 2023-09-02T02:16:36+00:00 - Russia deploys ICBM that Putin says will make enemies 'think twice' - - - - /u/st3ll4r-wind - https://www.reddit.com/user/st3ll4r-wind - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167h55i/china_says_it_deplores_us_military_transfer_to/"> <img src="https://external-preview.redd.it/qEPpckn2LHAjcP-NUlbznWdn14nS_n9hbEA-1pIPjD4.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=a83b0842460625891205a8a38c27c49617ef0120" alt="China says it ‘deplores’ US military transfer to Taiwan" title="China says it ‘deplores’ US military transfer to Taiwan" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/st3ll4r-wind"> /u/st3ll4r-wind </a> <br/> <span><a href="https://thehill.com/policy/defense/4182023-china-says-it-deplores-us-military-transfer-to-taiwan/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167h55i/china_says_it_deplores_us_military_transfer_to/">[comments]</a></span> </td></tr></table> - t3_167h55i - - - 2023-09-01T19:50:23+00:00 - 2023-09-01T19:50:23+00:00 - China says it ‘deplores’ US military transfer to Taiwan - - - - /u/HydrolicKrane - https://www.reddit.com/user/HydrolicKrane - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167zpnm/ukraine_says_it_has_manufactured_and_fired_a/"> <img src="https://external-preview.redd.it/ZfoGTTJuWY2WP4PGimjK4DcXREv1NP2dq7LMNQBKaCA.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=fcac564acdf1ecae1de4f0885ab933f8eb7e4104" alt="Ukraine says it has manufactured and fired a long-range missile" title="Ukraine says it has manufactured and fired a long-range missile" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/HydrolicKrane"> /u/HydrolicKrane </a> <br/> <span><a href="https://www.washingtonpost.com/world/2023/09/01/ukraine-missile-longrange-russia-manufactured/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167zpnm/ukraine_says_it_has_manufactured_and_fired_a/">[comments]</a></span> </td></tr></table> - t3_167zpnm - - - 2023-09-02T11:08:59+00:00 - 2023-09-02T11:08:59+00:00 - Ukraine says it has manufactured and fired a long-range missile - - - - /u/MaleficentParfait863 - https://www.reddit.com/user/MaleficentParfait863 - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167ctld/only_1280_breeding_humans_once_roamed_earth_gene/"> <img src="https://external-preview.redd.it/RMITCj7dEi2XtsPBuipLfO3iZs3UhNuPPUWbVl7jPZA.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=4402e1d5f6d513f1a68fa25b919496f12a6f1380" alt="Only 1,280 breeding humans once roamed Earth, gene study shows" title="Only 1,280 breeding humans once roamed Earth, gene study shows" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/MaleficentParfait863"> /u/MaleficentParfait863 </a> <br/> <span><a href="https://gizmodo.com/genetic-population-bottleneck-1850792411">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167ctld/only_1280_breeding_humans_once_roamed_earth_gene/">[comments]</a></span> </td></tr></table> - t3_167ctld - - - 2023-09-01T17:05:53+00:00 - 2023-09-01T17:05:53+00:00 - Only 1,280 breeding humans once roamed Earth, gene study shows - - - - /u/Accurate9638 - https://www.reddit.com/user/Accurate9638 - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167pmis/russia_will_want_revenge_after_losing_the_war/"> <img src="https://external-preview.redd.it/xzWeCMIwnXgds0MApmppG2YdNi_Zz6JefnoUvU5bZVc.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=10c48bd1ffcbc6fd44c86477a393b1ec9046e19d" alt="Russia will want revenge after losing the war, this may happen in 10 years – Ukraine's Defence Intelligence Chief" title="Russia will want revenge after losing the war, this may happen in 10 years – Ukraine's Defence Intelligence Chief" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Accurate9638"> /u/Accurate9638 </a> <br/> <span><a href="https://www.pravda.com.ua/eng/news/2023/09/1/7418008/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167pmis/russia_will_want_revenge_after_losing_the_war/">[comments]</a></span> </td></tr></table> - t3_167pmis - - - 2023-09-02T01:46:48+00:00 - 2023-09-02T01:46:48+00:00 - Russia will want revenge after losing the war, this may happen in 10 years – Ukraine's Defence Intelligence Chief - - - - /u/Gopu_17 - https://www.reddit.com/user/Gopu_17 - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167w4xn/putin_tells_schoolchildren_russia_is_invincible/"> <img src="https://external-preview.redd.it/97maokZ0tC4PAmqYyNJ6vxkC8CqMBL-O1IcKsZNhnNY.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=af7b30f135a3e0d12564eac7cb5d79dec4a36b90" alt="Putin Tells Schoolchildren Russia Is 'Invincible'" title="Putin Tells Schoolchildren Russia Is 'Invincible'" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Gopu_17"> /u/Gopu_17 </a> <br/> <span><a href="https://www.themoscowtimes.com/2023/09/01/putin-tells-schoolchildren-russia-is-invincible-a82337">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167w4xn/putin_tells_schoolchildren_russia_is_invincible/">[comments]</a></span> </td></tr></table> - t3_167w4xn - - - 2023-09-02T07:34:47+00:00 - 2023-09-02T07:34:47+00:00 - Putin Tells Schoolchildren Russia Is 'Invincible' - - - - /u/goofyOatmeal91990 - https://www.reddit.com/user/goofyOatmeal91990 - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167gy3y/american_airlines_flying_bigger_jets_so_people/"> <img src="https://external-preview.redd.it/Y4hoTuwzRY0lxVau3_yzsu7TuhXvHIUFSwDYt6_64ak.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=7b3ad8cf99f53c879ef58aa3e9dbf1e00f4ba165" alt="American Airlines flying bigger jets so people can flee Haiti, after U.S. tells Americans to go" title="American Airlines flying bigger jets so people can flee Haiti, after U.S. tells Americans to go" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/goofyOatmeal91990"> /u/goofyOatmeal91990 </a> <br/> <span><a href="https://www.miamiherald.com/news/nation-world/world/americas/haiti/article278864279.html#storylink=mainstage_lead">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167gy3y/american_airlines_flying_bigger_jets_so_people/">[comments]</a></span> </td></tr></table> - t3_167gy3y - - - 2023-09-01T19:42:56+00:00 - 2023-09-01T19:42:56+00:00 - American Airlines flying bigger jets so people can flee Haiti, after U.S. tells Americans to go - - - - /u/Smithy2232 - https://www.reddit.com/user/Smithy2232 - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/1680nk6/nobel_foundation_cancels_russia_belarus_iran/"> <img src="https://external-preview.redd.it/CgOX8hETm_FA-1TyWgPRM_kv1LkJiTjrP_RwwEzgVv4.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=7881999823b372c59627ec2abed6484396835188" alt="Nobel Foundation cancels Russia, Belarus, Iran invites to annual prize awards" title="Nobel Foundation cancels Russia, Belarus, Iran invites to annual prize awards" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Smithy2232"> /u/Smithy2232 </a> <br/> <span><a href="https://www.reuters.com/world/nobel-foundation-cancels-russia-belarus-iran-invites-annual-prize-awards-2023-09-02/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1680nk6/nobel_foundation_cancels_russia_belarus_iran/">[comments]</a></span> </td></tr></table> - t3_1680nk6 - - - 2023-09-02T12:00:06+00:00 - 2023-09-02T12:00:06+00:00 - Nobel Foundation cancels Russia, Belarus, Iran invites to annual prize awards - - - - /u/sometimes_correct - https://www.reddit.com/user/sometimes_correct - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167jr9b/ukraine_war_us_sees_notable_progress_by_ukraine/"> <img src="https://external-preview.redd.it/cRej3zWEs0PBdCdUsr4e_gaPf5q4OPLGPsg0zQy1paQ.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=a9d8100e1cc4e494f7afba87dd1ce69ff48e83c8" alt="Ukraine war: US sees notable progress; by Ukraine army in south" title="Ukraine war: US sees notable progress; by Ukraine army in south" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/sometimes_correct"> /u/sometimes_correct </a> <br/> <span><a href="https://www.bbc.com/news/world-europe-66686149">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167jr9b/ukraine_war_us_sees_notable_progress_by_ukraine/">[comments]</a></span> </td></tr></table> - t3_167jr9b - - - 2023-09-01T21:32:01+00:00 - 2023-09-01T21:32:01+00:00 - Ukraine war: US sees notable progress; by Ukraine army in south - - - - /u/UNITED24Media - https://www.reddit.com/user/UNITED24Media - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167z1s9/nobel_foundation_cancels_russian_ambassador/"> <img src="https://external-preview.redd.it/Ko1tTtddM7N72U3EXGsY6Qdr4TRVgqRikZU1Svl2tws.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=7c197a3d999159b7e7227db94eab8e73cfeda11d" alt="Nobel Foundation Cancels Russian Ambassador Invite To Prize Ceremony: Statement" title="Nobel Foundation Cancels Russian Ambassador Invite To Prize Ceremony: Statement" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/UNITED24Media"> /u/UNITED24Media </a> <br/> <span><a href="https://www.barrons.com/news/nobel-foundation-cancels-russian-ambassador-invite-to-prize-ceremony-statement-a2cdcc68?refsec=topics_afp-news">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167z1s9/nobel_foundation_cancels_russian_ambassador/">[comments]</a></span> </td></tr></table> - t3_167z1s9 - - - 2023-09-02T10:30:50+00:00 - 2023-09-02T10:30:50+00:00 - Nobel Foundation Cancels Russian Ambassador Invite To Prize Ceremony: Statement - - - - /u/eaglemaxie - https://www.reddit.com/user/eaglemaxie - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167e9pa/child_made_to_thank_putin_at_school_opening/"> <img src="https://external-preview.redd.it/ZUpEOv2rs9cBZraUgZCBMcI5i7PjUzvr5ZN_nxeaEt8.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=6ce7194a3ff179fb4c52d6d92faf29988a0c1d53" alt="Child made to &quot;thank&quot; Putin at school opening ceremony in devastated Mariupol" title="Child made to &quot;thank&quot; Putin at school opening ceremony in devastated Mariupol" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/eaglemaxie"> /u/eaglemaxie </a> <br/> <span><a href="https://www.pravda.com.ua/eng/news/2023/09/1/7418083/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167e9pa/child_made_to_thank_putin_at_school_opening/">[comments]</a></span> </td></tr></table> - t3_167e9pa - - - 2023-09-01T18:00:36+00:00 - 2023-09-01T18:00:36+00:00 - Child made to "thank" Putin at school opening ceremony in devastated Mariupol - - - - /u/None_4All - https://www.reddit.com/user/None_4All - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167lc1b/ukrainian_armed_forces_exhaust_russians_near/"> <img src="https://external-preview.redd.it/t_vQODnS0trvFWGOjPPPb65lkk33tjLcxX8BuyYwTo8.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=c150abd05e72d2ac2a5e24b9462883896432354c" alt="Ukrainian Armed Forces exhaust Russians near Robotyne to break through 1st line of defence – Estonian Intelligence" title="Ukrainian Armed Forces exhaust Russians near Robotyne to break through 1st line of defence – Estonian Intelligence" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/None_4All"> /u/None_4All </a> <br/> <span><a href="https://www.pravda.com.ua/eng/news/2023/09/1/7418029/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167lc1b/ukrainian_armed_forces_exhaust_russians_near/">[comments]</a></span> </td></tr></table> - t3_167lc1b - - - 2023-09-01T22:35:13+00:00 - 2023-09-01T22:35:13+00:00 - Ukrainian Armed Forces exhaust Russians near Robotyne to break through 1st line of defence – Estonian Intelligence - - - - /u/M795 - https://www.reddit.com/user/M795 - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/1680gl6/ukraine_says_it_has_identified_a_russian/"> <img src="https://external-preview.redd.it/fuGzX3ETL4DqpB9stkWz11P-gwRWRAlstcfGCKdjZ64.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=c01948e05924c8574d17245dcb4b21029421a8f0" alt="Ukraine says it has identified a Russian commander accused of Bucha atrocities" title="Ukraine says it has identified a Russian commander accused of Bucha atrocities" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/M795"> /u/M795 </a> <br/> <span><a href="https://www.cnn.com/2023/09/02/europe/ukraine-ids-russian-commander-atrocities-bucha-intl-hnk/index.html">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/1680gl6/ukraine_says_it_has_identified_a_russian/">[comments]</a></span> </td></tr></table> - t3_1680gl6 - - - 2023-09-02T11:49:46+00:00 - 2023-09-02T11:49:46+00:00 - Ukraine says it has identified a Russian commander accused of Bucha atrocities - - - - /u/Naderium - https://www.reddit.com/user/Naderium - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167ncgy/35_year_old_iranian_protester_dies_in_jail_after/"> <img src="https://external-preview.redd.it/y3APupADQKBp6EBFoZyK5GO2raJapncvX7ni-tNiZSk.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=3d9dd147f44a4c752ba63fe2bf114af21731a4ed" alt="35 year old Iranian protester dies in jail after avoiding death sentence." title="35 year old Iranian protester dies in jail after avoiding death sentence." /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Naderium"> /u/Naderium </a> <br/> <span><a href="https://www.bbc.com/news/world-middle-east-66677352">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167ncgy/35_year_old_iranian_protester_dies_in_jail_after/">[comments]</a></span> </td></tr></table> - t3_167ncgy - - - 2023-09-02T00:01:19+00:00 - 2023-09-02T00:01:19+00:00 - 35 year old Iranian protester dies in jail after avoiding death sentence. - - - - /u/NamelessForce - https://www.reddit.com/user/NamelessForce - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167nllk/north_korea_fires_several_cruise_missiles_towards/"> <img src="https://external-preview.redd.it/YkW_TmGfakGwbo4WBKP5pSuOLZG_YFEPSvpHrHMs-QA.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=eb6c572204365463d44745af9486952b94005f73" alt="North Korea fires several cruise missiles towards the sea" title="North Korea fires several cruise missiles towards the sea" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/NamelessForce"> /u/NamelessForce </a> <br/> <span><a href="https://www.canberratimes.com.au/story/8333250/n-korea-fires-several-cruise-missiles-towards-the-sea/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167nllk/north_korea_fires_several_cruise_missiles_towards/">[comments]</a></span> </td></tr></table> - t3_167nllk - - - 2023-09-02T00:12:33+00:00 - 2023-09-02T00:12:33+00:00 - North Korea fires several cruise missiles towards the sea - - - - /u/Americanhoney7 - https://www.reddit.com/user/Americanhoney7 - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/167c47b/russia_to_block_g20_declaration_if_its_views_are/"> <img src="https://external-preview.redd.it/treK9UpbEpdrIbBa7l78kp059_ScA4H7U0rlRp7V-os.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=90e2e42558f1ccfa56db662e1eba5fc55ad4d2db" alt="Russia to block G20 declaration if its views are ignored - Lavrov" title="Russia to block G20 declaration if its views are ignored - Lavrov" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Americanhoney7"> /u/Americanhoney7 </a> <br/> <span><a href="https://news.yahoo.com/russia-block-g20-declaration-views-094332700.html">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/167c47b/russia_to_block_g20_declaration_if_its_views_are/">[comments]</a></span> </td></tr></table> - t3_167c47b - - - 2023-09-01T16:39:05+00:00 - 2023-09-01T16:39:05+00:00 - Russia to block G20 declaration if its views are ignored - Lavrov - - - - /u/Huge-Jellyfish9948 - https://www.reddit.com/user/Huge-Jellyfish9948 - - - <table> <tr><td> <a href="https://www.reddit.com/r/worldnews/comments/16786qa/germany_charges_98yearold_nazi_guard_for_murder/"> <img src="https://external-preview.redd.it/nlmHWT9oNezpCzXXcIHphC3FRXBCpk-cc7zhwGiy4f4.jpg?width=640&amp;crop=smart&amp;auto=webp&amp;s=03db059bf82882395fe2a24202fc809d1f60e65a" alt="Germany charges 98-year-old Nazi guard for murder complicity – DW – 09/01/2023" title="Germany charges 98-year-old Nazi guard for murder complicity – DW – 09/01/2023" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Huge-Jellyfish9948"> /u/Huge-Jellyfish9948 </a> <br/> <span><a href="https://www.dw.com/en/germany-charges-98-year-old-nazi-guard-for-murder-complicity/a-66694447?utm_source=ground.news&amp;utm_medium=referral">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/worldnews/comments/16786qa/germany_charges_98yearold_nazi_guard_for_murder/">[comments]</a></span> </td></tr></table> - t3_16786qa - - - 2023-09-01T14:09:11+00:00 - 2023-09-01T14:09:11+00:00 - Germany charges 98-year-old Nazi guard for murder complicity – DW – 09/01/2023 - diff --git a/spec/fixtures/files/feeds/reddit/normalized.json b/spec/fixtures/files/feeds/reddit/normalized.json new file mode 100644 index 00000000..ba767c49 --- /dev/null +++ b/spec/fixtures/files/feeds/reddit/normalized.json @@ -0,0 +1,20 @@ +[ + { + "uid": "https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/", + "link": "https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/", + "published_at": "2023-09-02 04:02:37 +0000", + "text": "/r/WorldNews Live Thread\nThread: https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/", + "attachments": [], + "comments": [], + "validation_errors": [] + }, + { + "uid": "https://www.reddit.com/r/worldnews/comments/167ucb5/meta_and_alphabet_would_owe_at_least_4_of_annual/", + "link": "https://www.reddit.com/r/worldnews/comments/167ucb5/meta_and_alphabet_would_owe_at_least_4_of_annual/", + "published_at": "2023-09-02 05:49:28 +0000", + "text": "Meta and Alphabet would owe at least 4% of annual revenue in Canada to news outlets under draft regulations pushed by Justin Trudeau - https://fortune.com/2023/09/01/meta-alphabet-canada-news-outlets-draft-regulations-justin-trudeau/\nThread: https://www.reddit.com/r/worldnews/comments/167ucb5/meta_and_alphabet_would_owe_at_least_4_of_annual/", + "attachments": [], + "comments": [], + "validation_errors": [] + } +] diff --git a/spec/normalizers/reddit_normalizer_spec.rb b/spec/normalizers/reddit_normalizer_spec.rb new file mode 100644 index 00000000..cc50595e --- /dev/null +++ b/spec/normalizers/reddit_normalizer_spec.rb @@ -0,0 +1,37 @@ +require "rails_helper" +require "support/shared_examples_a_normalizer" + +RSpec.describe RedditNormalizer do + subject(:subject_name) { described_class } + + before do + # Clear cache for RedditPointsFetcher + Rails.cache.clear + + ServiceInstance.delete_all + + create( + :service_instance, + service_type: "libreddit", + url: "https://libreddit.example.com" + ) + + # Stub RedditPointsFetcher requests + stub_request(:get, %r{^https://libreddit.example.com/}) + .to_return(body: file_fixture("feeds/reddit/libreddit_comments_page.html")) + end + + it_behaves_like "a normalizer" do + let(:feed) do + create( + :feed, + name: "reddit", + url: "https://www.reddit.com/r/worldnews/.rss", + loader: "http", + processor: "reddit", + normalizer: "reddit", + import_limit: 10 + ) + end + end +end From 91c7267625fce3d7d7639e66421710faff83e625 Mon Sep 17 00:00:00 2001 From: Alex Musayev Date: Sat, 2 Sep 2023 17:50:59 +0200 Subject: [PATCH 3/6] Clean-up --- app/services/pull.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/services/pull.rb b/app/services/pull.rb index 529dbabb..3be3f7db 100644 --- a/app/services/pull.rb +++ b/app/services/pull.rb @@ -36,16 +36,16 @@ def load_entities def normalize_entity(entity) normalizer_class.call(entity) - # # rescue StandardError => e - # # log_error("normalization_error: #{e}") + rescue StandardError => e + log_error("normalization_error: #{e}") - # # ErrorDumper.call( - # # exception: e, - # # message: "Normalization error", - # # target: feed, - # # context: {uid: entity.uid} - # # ) + ErrorDumper.call( + exception: e, + message: "Normalization error", + target: feed, + context: {uid: entity.uid} + ) - # nil + nil end end From 5cff45bfa04bca987145d6cdecb37bb00fee98e1 Mon Sep 17 00:00:00 2001 From: Alex Musayev Date: Sat, 2 Sep 2023 17:54:00 +0200 Subject: [PATCH 4/6] Update gems to fix `CVE-2023-38037` --- Gemfile.lock | 131 ++++++++++++++++++++++++++------------------------- 1 file changed, 66 insertions(+), 65 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b9497fa8..fa9516f7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,67 +3,67 @@ GEM specs: aasm (5.5.0) concurrent-ruby (~> 1.0) - actioncable (7.0.6) - actionpack (= 7.0.6) - activesupport (= 7.0.6) + actioncable (7.0.7.2) + actionpack (= 7.0.7.2) + activesupport (= 7.0.7.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.6) - actionpack (= 7.0.6) - activejob (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + actionmailbox (7.0.7.2) + actionpack (= 7.0.7.2) + activejob (= 7.0.7.2) + activerecord (= 7.0.7.2) + activestorage (= 7.0.7.2) + activesupport (= 7.0.7.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.6) - actionpack (= 7.0.6) - actionview (= 7.0.6) - activejob (= 7.0.6) - activesupport (= 7.0.6) + actionmailer (7.0.7.2) + actionpack (= 7.0.7.2) + actionview (= 7.0.7.2) + activejob (= 7.0.7.2) + activesupport (= 7.0.7.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.6) - actionview (= 7.0.6) - activesupport (= 7.0.6) + actionpack (7.0.7.2) + actionview (= 7.0.7.2) + activesupport (= 7.0.7.2) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.6) - actionpack (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + actiontext (7.0.7.2) + actionpack (= 7.0.7.2) + activerecord (= 7.0.7.2) + activestorage (= 7.0.7.2) + activesupport (= 7.0.7.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.6) - activesupport (= 7.0.6) + actionview (7.0.7.2) + activesupport (= 7.0.7.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.6) - activesupport (= 7.0.6) + activejob (7.0.7.2) + activesupport (= 7.0.7.2) globalid (>= 0.3.6) - activemodel (7.0.6) - activesupport (= 7.0.6) - activerecord (7.0.6) - activemodel (= 7.0.6) - activesupport (= 7.0.6) - activestorage (7.0.6) - actionpack (= 7.0.6) - activejob (= 7.0.6) - activerecord (= 7.0.6) - activesupport (= 7.0.6) + activemodel (7.0.7.2) + activesupport (= 7.0.7.2) + activerecord (7.0.7.2) + activemodel (= 7.0.7.2) + activesupport (= 7.0.7.2) + activestorage (7.0.7.2) + actionpack (= 7.0.7.2) + activejob (= 7.0.7.2) + activerecord (= 7.0.7.2) + activesupport (= 7.0.7.2) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.6) + activesupport (7.0.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -144,8 +144,8 @@ GEM ffi-compiler (1.0.1) ffi (>= 1.0.0) rake - globalid (1.1.0) - activesupport (>= 5.0) + globalid (1.2.0) + activesupport (>= 6.1) hashdiff (1.0.1) honeybadger (5.2.1) http (5.1.1) @@ -190,11 +190,11 @@ GEM mimemagic (0.4.3) nokogiri (~> 1) rake - mini_mime (1.1.2) - mini_portile2 (2.8.2) - minitest (5.18.1) + mini_mime (1.1.5) + mini_portile2 (2.8.4) + minitest (5.19.0) msgpack (1.7.1) - net-imap (0.3.6) + net-imap (0.3.7) date net-protocol net-pop (0.1.2) @@ -205,7 +205,7 @@ GEM net-protocol netrc (0.11.0) nio4r (2.5.9) - nokogiri (1.15.2) + nokogiri (1.15.4) mini_portile2 (~> 2.8.2) racc (~> 1.4) parallel (1.23.0) @@ -225,32 +225,33 @@ GEM puma (6.3.1) nio4r (~> 2.0) racc (1.7.1) - rack (2.2.7) + rack (2.2.8) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.6) - actioncable (= 7.0.6) - actionmailbox (= 7.0.6) - actionmailer (= 7.0.6) - actionpack (= 7.0.6) - actiontext (= 7.0.6) - actionview (= 7.0.6) - activejob (= 7.0.6) - activemodel (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + rails (7.0.7.2) + actioncable (= 7.0.7.2) + actionmailbox (= 7.0.7.2) + actionmailer (= 7.0.7.2) + actionpack (= 7.0.7.2) + actiontext (= 7.0.7.2) + actionview (= 7.0.7.2) + activejob (= 7.0.7.2) + activemodel (= 7.0.7.2) + activerecord (= 7.0.7.2) + activestorage (= 7.0.7.2) + activesupport (= 7.0.7.2) bundler (>= 1.15.0) - railties (= 7.0.6) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + railties (= 7.0.7.2) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.6) - actionpack (= 7.0.6) - activesupport (= 7.0.6) + railties (7.0.7.2) + actionpack (= 7.0.7.2) + activesupport (= 7.0.7.2) method_source rake (>= 12.2) thor (~> 1.0) @@ -351,11 +352,11 @@ GEM addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket-driver (0.7.5) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) yaml-lint (0.1.2) - zeitwerk (2.6.8) + zeitwerk (2.6.11) PLATFORMS ruby From 543a1bcab0bb2483f22393a98917bb8aa5df5300 Mon Sep 17 00:00:00 2001 From: Alex Musayev Date: Sat, 2 Sep 2023 17:56:14 +0200 Subject: [PATCH 5/6] Fix test expectation --- .../files/feeds/reddit/expected_uids.json | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/spec/fixtures/files/feeds/reddit/expected_uids.json b/spec/fixtures/files/feeds/reddit/expected_uids.json index 0351e84b..4968e3c5 100644 --- a/spec/fixtures/files/feeds/reddit/expected_uids.json +++ b/spec/fixtures/files/feeds/reddit/expected_uids.json @@ -1,28 +1,4 @@ [ "https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/", - "https://www.reddit.com/r/worldnews/comments/167qju7/10yearold_boy_thrown_off_bridge_in_germany_for/", - "https://www.reddit.com/r/worldnews/comments/167ymp8/vietnam_to_take_their_relationship_with_us_to/", - "https://www.reddit.com/r/worldnews/comments/167p2b7/top_russian_space_scientist_dies_of_mushroom/", - "https://www.reddit.com/r/worldnews/comments/167vmk8/russian_army_losses_600_soldiers_and_dozens_of/", - "https://www.reddit.com/r/worldnews/comments/167wlo6/china_put_out_a_new_offical_map_that_claims/", - "https://www.reddit.com/r/worldnews/comments/167j17s/us_to_send_its_first_depleted_uranium_rounds_to/", - "https://www.reddit.com/r/worldnews/comments/167ucb5/meta_and_alphabet_would_owe_at_least_4_of_annual/", - "https://www.reddit.com/r/worldnews/comments/167bd2t/retired_teacher_sentenced_to_death_in_saudi/", - "https://www.reddit.com/r/worldnews/comments/167q98v/russia_deploys_icbm_that_putin_says_will_make/", - "https://www.reddit.com/r/worldnews/comments/167h55i/china_says_it_deplores_us_military_transfer_to/", - "https://www.reddit.com/r/worldnews/comments/167zpnm/ukraine_says_it_has_manufactured_and_fired_a/", - "https://www.reddit.com/r/worldnews/comments/167ctld/only_1280_breeding_humans_once_roamed_earth_gene/", - "https://www.reddit.com/r/worldnews/comments/167pmis/russia_will_want_revenge_after_losing_the_war/", - "https://www.reddit.com/r/worldnews/comments/167w4xn/putin_tells_schoolchildren_russia_is_invincible/", - "https://www.reddit.com/r/worldnews/comments/167gy3y/american_airlines_flying_bigger_jets_so_people/", - "https://www.reddit.com/r/worldnews/comments/1680nk6/nobel_foundation_cancels_russia_belarus_iran/", - "https://www.reddit.com/r/worldnews/comments/167jr9b/ukraine_war_us_sees_notable_progress_by_ukraine/", - "https://www.reddit.com/r/worldnews/comments/167z1s9/nobel_foundation_cancels_russian_ambassador/", - "https://www.reddit.com/r/worldnews/comments/167e9pa/child_made_to_thank_putin_at_school_opening/", - "https://www.reddit.com/r/worldnews/comments/167lc1b/ukrainian_armed_forces_exhaust_russians_near/", - "https://www.reddit.com/r/worldnews/comments/1680gl6/ukraine_says_it_has_identified_a_russian/", - "https://www.reddit.com/r/worldnews/comments/167ncgy/35_year_old_iranian_protester_dies_in_jail_after/", - "https://www.reddit.com/r/worldnews/comments/167nllk/north_korea_fires_several_cruise_missiles_towards/", - "https://www.reddit.com/r/worldnews/comments/167c47b/russia_to_block_g20_declaration_if_its_views_are/", - "https://www.reddit.com/r/worldnews/comments/16786qa/germany_charges_98yearold_nazi_guard_for_murder/" + "https://www.reddit.com/r/worldnews/comments/167ucb5/meta_and_alphabet_would_owe_at_least_4_of_annual/" ] From 6185631f9a7f18d2f554f542dc135061b515cf39 Mon Sep 17 00:00:00 2001 From: Alex Musayev Date: Sat, 2 Sep 2023 21:55:36 +0200 Subject: [PATCH 6/6] Update import threshold --- config/feeds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/feeds.yml b/config/feeds.yml index 22e355ae..fbaf5550 100644 --- a/config/feeds.yml +++ b/config/feeds.yml @@ -158,7 +158,7 @@ loader: "http" processor: "reddit" normalizer: "reddit" - after: "2021-01-06T12:00:00+00:00" + after: "2023-09-02T00:00:00+00:00" refresh_interval: 0 import_limit: 2