Ticket created by ~bhepple on ~ghost08/ratt
After over a year of stability, it looks like AP have thrown another curl into the mix. https://apnews.com/hub/world-news has not been returning anything for a week or so.
I'm using the latest version.
World News: Top & Breaking World News Today | AP News https://apnews.com/hub/world-news Tue, 13 Jun 2023 13:55:24 +0800
Comment by ~bhepple on ~ghost08/ratt
Yeah - this seems to work:
title: .-cardHeading
Thanks again!
Comment by ~bhepple on ~ghost08/ratt
Crikey! They changed it already - now they need h3.-cardHeading again!!! Is there any way to accomodate both variants?
Comment by ~bhepple on ~ghost08/ratt
Changing 'h3.-cardHeading' to 'h2.-cardHeading' in apnews.yml seems to fix the problem.
Comment by ~bhepple on ~ghost08/ratt
Forgot to mention - that was the stderr output and there was one such error for each item. There was a final error message:
2022/03/03 10:22:36 feed.go:274: constructing item: item title: no html node found for selector: 'h3.-cardHeading'
It produced nothing on stdout.
Ticket created by ~bhepple on ~ghost08/ratt
$ ratt auto https://apnews.com/hub/world-news Selection data: <div class="FeedCard urn:publicid:ap.org:1fc732f01985f1b57e8dc5e7e411805f Component-wireStory-0-2-96 card-0-2-97" data-key="feed-card-wire-story-with-image" data-tb-region-item="true"><div class="CardHeadline headline-0-2-99"><a class="Component-headline-0-2-109" data-key="card-headline" href="/article/russia-ukraine-united-nations-general-assembly-state-of-the-union-address-kyiv-business-1fc732f01985f1b57e8dc5e7e411805f"><h2 class="Component-heading-0-2-110 Component-headingMobile-0-2-111 -cardHeading">Russia-Ukraine War: What to know on Day 7 of Russian assault</h2></a><div class="Component-signature-0-2-112"><span class="Component-bylines-0-2-113 Component-bylines-0-2-105">By The Associated Press</span><span class="Timestamp Component-root-0-2-115 Component-timestamp-0-2-114" data-key="timestamp" data-source="2022-03-02T20:43:51Z" title="2022-03-02 20:43:51 - Wed Mar 02 2022 20:43:51 GMT+0000 (Coordinated Universal Time)">March 2, 2022 GMT</span></div></div><a class="image-0-2-100 " href="/article/russia-ukraine-united-nations-general-assembly-state-of-the-union-address-kyiv-business-1fc732f01985f1b57e8dc5e7e411805f"><div data-key="media-placeholder"></div></a><a data-key="story-link" class="firstWords-0-2-101" href="/article/russia-ukraine-united-nations-general-assembly-state-of-the-union-address-kyiv-business-1fc732f01985f1b57e8dc5e7e411805f"><div class="content text-0-2-102"><p>Russia and Ukraine said Wednesday that they were prepared to hold talks for the second time since the Russian invasion of its neighbor began last week.</p></div></a></div>
Comment by ~bhepple on ~ghost08/ratt
So I rebuilt ratt and all looks good again (no errors):
sudo rm -rf go ratt auto https://apnews.com/hub/world-news >/dev/null
Thanks again!
Comment by ~bhepple on ~ghost08/ratt
ratt auto https://apnews.com/hub/world-news > ~/tmp/apnews
Selection data: <div class="FeedCard urn:publicid:ap.org:88796d9229f23a5479791f20f2517c23 Component-wireStory-0-2-92 Component-card-0-2-148" data-key="feed-card-wire-story-with-image" data-tb-region-item="true"><a class="Component-link-0-2-149" href="/article/business-environment-and-nature-brazil-sao-paulo-south-america-88796d9229f23a5479791f20f2517c23"><div data-key="media-placeholder"></div><div class="CardHeadline"><div class="Component-headline-0-2-100 Component-headline-0-2-150" data-key="card-headline"><h3 class="Component-heading-0-2-101 -cardHeading">Tarnished Gold: Illegal Amazon gold seeps into supply chains</h3></div><div class="Component-signature-0-2-103 Component-signature-0-2-151"><span class="Component-bylines-0-2-104 Component-bylines-0-2-152">By DAVID BILLER and JOSHUA GOODMAN</span><span class="Timestamp Component-root-0-2-106 Component-timestamp-0-2-105" data-key="timestamp" data-source="2022-01-13T15:22:00Z" title="2022-01-13 15:22:00 - Thu Jan 13 2022 15:22:00 GMT+0000 (Coordinated Universal Time)">January 13, 2022 GMT</span></div></div></a></div> 2022/01/15 07:32:22 feed.go:274: constructing item: item description: no html node found for selector: 'div.content p, .Component-signature-0-2-119, .Component-signature-0-2-108'
Ticket created by ~bhepple on ~ghost08/ratt
ratt auto https://apnews.com/hub/world-news >/dev/null
Selection data:
2022/01/15 07:32:22 feed.go:274: constructing item: item description: no html node found for selector: 'div.content p, .Component-signature-0-2-119, .Component-signature-0-2-108'(hmmm - seems that sr.ht doesn't allow markup in the first item of the ticket - I'll add another item)