question

praber31 avatar image
praber31 asked

Flash Brief - pulling full RSS feed

I have a podcast on Anchor that I am using as a News Flash Brief - I finally got it certified but when it plays it plays every episode rather than just the most recent. How do I fix this?

flash briefing
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Darin Pope avatar image
Darin Pope answered

Yeah, it's as I expected. Your feed has 7 "item" elements. Under Feed format requirements, you'll see

*****

Provide between 1 and 5 unique feed items at a time.

  • If more items are provided, Alexa ignores items beyond the first five.
  • Items should be provided in order from newest to oldest, based on the date value for the item. Alexa may ignore older items.
  • Each item in the feed should be unique and should not overlap with content in another feed item.

*****

In order to only play the latest one, you'll have to modify your feed to only have 1 "item" instead of all. I'm not sure if Anchor gives you the ability to restrict the item count in your feed or not.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Darin Pope avatar image
Darin Pope answered

By default, the Flash Briefing skill will play all the items (up to 5) that you present it in your feed. What is the url of your feed?

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

praber31 avatar image
praber31 answered
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

John v / FortyFour-Three avatar image
John v / FortyFour-Three answered

@Darin Pope @praber31

I found the same problem.

I've written a script in Python that will take your Anchor.fm RSS feed and turn it into a single RSS entry. The script can be found in the blog post: ALEXA FLASH BRIEFING AND ANCHOR.FM RSS FEED. I've included the script below for so that people can use it. It works in Python 3, but probably works in Python 2.7 also.


## FortyFour-Three Query Script
## Single RSS feed item from Anchor.fm
## Verson 1.0 - 2019-03-19

# Import the xml library. We'll name it ET for ease.
import xml.etree.ElementTree as ET

# Import the web-page reading library
import urllib.request

## RSS URL
url = 'https://anchor.fm/s/94eb7c8/podcast/rss'

## Open the URL and read the page.
uf = urllib.request.urlopen(url)
tree_text = uf.read()

## Turns the RSS into an element.
root = ET.fromstring(tree_text)

## If the counter is 0, then it doesn't remove the item
## If the counter is 1 (after the first element. Then the item is removed.
counter = 0
for item in root[0].findall('item'):
    if counter == 0: 
        counter = counter + 1
    else:
        root[0].remove(item)

## Create an empty element tree.
tree = ET.ElementTree()

## Set the root of the element tree with the XML that we have been 
##     working with.
tree._setroot(root)

## Write it to a file.
tree.write('podcast_rss.xml', encoding="utf-8", xml_declaration=True)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.