Associated Press (AP) News plugin

AP News no longer provides RSS feeds. This plugin provides virtual AP News feeds based upon JSON used by their website.

Quick use: install the plugin, subscribe to a “feed” using a URL like Top News: US & International Top News Stories Today | AP News or https://apnews.com/tag/apf-topnews,apf-usnews .

Source and details @ GitHub - supahgreg/ttrss-apnews: Provides virtual AP News feeds for Tiny Tiny RSS

NOTE: This plugin needs tt-rss from 2017-10-01 or later (specifically: 0f0d6ca559).

Thanks. But what makes you believe the AP has ditched RSS feeds? They seem to be there.

Interesting, thanks. The ones I had been using were removed, and I somehow missed that page.

I suppose the main benefit of this plugin now is generation of feeds based upon AP News tags, which give much more fine-grained control and flexibility than the official feeds.

To be fair, that AP’s webpage is all new. I remember their feeds were listed on a page with totally different, more colourful design. Which means the AP have been messing with the feeds, and I suspect it’s in the direction of marginalizing them. So, your plugin may yet become useful to those unwilling to migrate to Twitter and its ilk.

I was excited that someone found some AP feeds after the ones I subscribed to were removed, and while the feeds on that page work, the links in the entries are broken so they are not useful.

The Associated Press seems to have removed the feeds. So, I turned back to the plugin, but it doesn’t work:

Couldn't download the specified URL: HTTP/1.1 200 OK

I’m on f530224

Any ideas how to fix it?

I too have been frustrated with the loss of AP’s RSS feeds. As you said, the plugin no longer works.

I use a feed43 proxy RSS feed to get around a GDPR block on a local newspaper’s RSS feed (see this discussion) so I tried setting up a proxy for the AP Top News feed. Unfortunately, the AP site uses javascript to generate the article list and there’s nothing on the feed43 site about how to set up a proxy in that case.

Hopefully someone with more technical skills than I can come up with a way to convert the AP news feed pages to an RSS feed that TT-RSS can work with.

See what you get by hitting the AP News API directly from wherever tt-rss is running (and/or your local system if in a similar region). For example, Top News: US & International Top News Stories Today | AP News corresponds to https://afs-prod.appspot.com/api/v2/feed/tag?tags=apf-topnews . I wonder if you’re running into something related to GDPR, as I’m still using the plugin without issue.

Thanks for your reply @wn_name. I’m not sure what you mean by ‘hit the AP News API directly’… ?

Assuming you mean enter the apnews URL in my browser window – a page opens on the AP site with the feed specified in the URL. However, when I attempt to subscribe to that page in TT-RSS (with your plugin activated), I get the same error as @mamil ("Couldn't download the specified URL"). When I attempt to subscribe with the plugin disabled, I get a different error: "Specified URL doesn't seem to contain any feeds", which is presuably why you created the plugin.

I’m in the US but I’m using Marc Gerges’s instance of TT-RSS that resides on a server in Europe. Marc installed your plugin yesterday at my request. But this doesn’t look like a GDPR issue. I experienced a GDPR block on a local newspaper’s RSS feed and in that case, I got a very different error:

451: Unavailable for legal reasons

I suppose it’s possible AP is blocking the requests but fails to send back an error code.

Thanks, wn. Doesn’t look like GDPR. Both URLs open just fine. One leads to the AP webpage, the other to something which looks like this (API?):

{
  "cards": [
    {
      "textScale": null, 
      "headlineWidget": null, 
      "expandedStoryCount": null, 
      "tagObjs": [], 
      "sponsorImageUrl": null, 
      "contents": [
        {
          "embedHTML": null, 
          "embedHeight": null, 
          "contentSponsor": null, 
          "tagObjs": [
            {
              "order": 1, 
              "id": "apf-topnews", 
              "name": "AP Top News"
            }, 

I’ve noticed that if I replace https with http, I don’t get the 200 error. TTRSS accepts the URL and I can ‘subscribe’, but then the first update attempt yields this:

fetch error: LibXML error 4 at line 1 (column 1): Start tag expected, '<' not found

If you’re able to get those responses from the same system tt-rss is running on then I don’t know why it’s not working for you (i.e. I’m unable to reproduce the issue). “http://” doesn’t work since the plugin currently only matches HTTPS.

I don’t know plugins still work or not but it not work for me. I got error saying Couldn't download the specfied URL: false. I’m currently live in Vietnam and have TT-RSS running in Singapore.

I’ve recently googling around and discovered this feed here https://feedx.net/rss/ap.xml. Hope you can use it.

I haven’t used this plugin for a while, and therefore didn’t notice there were issues. I’ve released v1.1 of the plugin, which should get things working again. Thanks for the heads-up.

Thank man, appreciated it.

@wn, Somehow I missed the email notification for your June 2020 post. Thanks for keeping this plugin alive! I was never able to get v1.0 to work so I was happy to see the update.

I just attempted to install v1.1 following the instructions on your GitHub page. I first had to install Git, after which the git clone command executed successfully on my Linux machine.

When I attempt to subscribe to AP Top News, I get the error message “Specified URL doesn’t seem to contain any feeds.”
https://apnews.com/hub/ap-top-news

I think the problem in this case may be that the plugin didn’t update, i.e., when I mouse-hover over plugin on tt-rss preferences page, it shows “v1.00, by wn”. I tried running the git clone command again but I get “fatal: destination path ‘apnews’ already exists and is not an empty directory.”

I’m a Linux novice so I probably did something wrong. I would be grateful for any help! Scanning AP’s feeds on their site wastes a lot of time since there’s no way to suppress entries already scanned.

EDIT: I just realized why the update didn’t work! As noted in my previous reply, I’m using Marc Gerges’ instance of tt-rss. Duh! I’ll ask Marc to install the update. Sorry for the mis-cue.

Looks like they changed things around again, so v1.1 probably won’t work for you. When I get some time I’ll look into rewriting the plugin.

Okay, I’ve pushed out a v2.0 of the plugin that should (probably) work.

@wn, I’ll let Marc know. Thanks so much :upside_down_face:

I have an XSLT plugin that can turn any webpage w/ links into RSS feed. You can filter the resulting feed to urls like “/article/”, etc… You could slurp in the article via feediron if you want (though w/ dozens of articles all at once might get you banned).

I tried it with the top stories url you posted and it works fine w/ this subscription url:

Nice thing this isn’t apnews specific, I use it on several front pages to generate feeds.

@rodney, thanks for your reply. I rely on someone else’s tt-rss server so I’m not in a position to test your plugin, but I have a question you may be able to answer. I just noticed the following warning at the top of the Preferences / Plugins menu:

The following plugins use per-feed content hooks. This may cause excessive data usage and origin server load resulting in a ban of your instance: Apnews (More info…)

According to the page linked @ More info, these types of plugins bypass article duplicate checking. If so, @wn’s Apnews plugin won’t help me.

I currently read AP news feeds directly on its site. The big problem with that is that I have to extra spend time scanning every article in the feed every time I visit the page, most of which I already scanned on previous visits. Moreover, I can’t go by the feed sequence (FIFO) to estimate where I left off in the previous visit since the timestamps are often updated to keep articles ‘fresh’ even though the content didn’t change.

Does the XSLT plugin provide for duplicate checking? I’m guessing not, but if it does, I’ll see if Marc will install your plugin on his tt-rss instance, instead of the APNews plugin. Thanks.