Coder Social home page Coder Social logo

timdorr / spotifeed Goto Github PK

View Code? Open in Web Editor NEW
474.0 23.0 38.0 48 KB

A simple service to serve up Spotify podcasts as RSS feeds for use in any podcast app.

Home Page: https://spotifeed.timdorr.com/

License: MIT License

Ruby 55.84% HTML 43.93% Procfile 0.24%
spotify podcast podcasts rss feed

spotifeed's Introduction

Spotifeed

A Spotify Podcast RSS Feed Generator


A simple service to serve up Spotify podcasts as RSS feeds for use in any podcast app.

Just take the show ID from the end of the Show Link on Spotify and put it at the end of https://spotifeed.timdorr.com/, like so:

https://open.spotify.com/show/4rOoJ6Egrf8K2IrywzwOMk -> https://spotifeed.timdorr.com/4rOoJ6Egrf8K2IrywzwOMk
Spotify® is a trademark of Spotify AB which does not sponsor, authorize, or endorse this project.

spotifeed's People

Contributors

dependabot[bot] avatar j0be avatar lud-hu avatar miharekar avatar timdorr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spotifeed's Issues

Rss item link

Can you update the rss feed to use the episode uri instead of the anon-podcast.scdn.co direct url?

Self-hosted version that stores audio?

Let's say one wanted to host this privately somewhere and have the server download the mp4 chunks, convert them to a normal audio file, and host them for personal consumption. Might this functionality already exist somewhere?

Episode not downloadable -  Podcast

Thank you for your great service. Working really smooth for me. I have an issue. I can't download episodes in the official Apple podcast app after I added them with your service.
In others podcatcher App it works really
Good. Everything else works fine in the Apple podcast app.

Only showing episodes from September 15, 2020 and newer

I'm using your code to access JRE from Spotify though Apple podcasts. When I try to find older episodes however they do not show past September 15, 2020.

There are many older episodes available on Spotify but they don't show up in the Apple Podcasts app. Everything else is working perfectly though. Shown below is the lowest I can scroll in the "See all Episodes" section of the podcast app.

Screen Shot 2020-12-27 at 16 15 58

Add artwork

Any chance the generated feeds could include artwork? If not for each episode the individual one maybe at least the podcast's general one

Doesn't seem to work anymore

The feed you created is really cool. But, it seemed to stop working with the last episode I can see being the "End of the World #2".

I use Pocket Cast. On desktop, it looks like this:
image

Could still be made to work?

So, I spent a day or so a few weeks back, re-implementing this in Javascript running on Cloudflare Workers, using Workers KV for caching.

I recently encountered the same issue you've been having with the deprecation of the Spotify anonymous CDN, and started working on a workaround, and I'm curious if you've attempted the same?

Basically, I replace the enclosure URLs with a URL resource hosted on my domain, which is served by the following endpoint:

router.get('/episode/:id', async (ctx) => {
    const { params: { id } } = ctx

    const cachedEpisode = await DESPOTKV.get(`episode:${id}`)

    if (cachedEpisode) {
        ctx.response.headers.location = cachedEpisode
        ctx.status = 301
        return
    }

    const re = /^.*=exp=(?<expiresAt>\d+).*/

    const response = await fetch(`https://spclient.wg.spotify.com/soundfinder/v1/unauth/episode/${id}/com.apple.fps.1_0`, {
        method: "GET"
    })
    
    const jsonResponse = await response.json()
    
    const {url: [_, url]} = jsonResponse

    const match = re.exec(url)

    await DESPOTKV.put(`episode:${id}`, url, {expiration: match.groups.expiresAt})

    ctx.response.headers["location"] = url
    ctx.response.headers["Content-Type"] = "audio/mp4"
    ctx.status = 301
})

I think the only thing preventing this from working, is the Spotify server doesn't respond with the correct Content-Type header, so it's not working in Apple Podcasts or PocketCasts:

Content-Type: application/octet-stream
Accept-Ranges: bytes
Content-Length: 71094433

The files will download over HTTP, and play in VLC though, as an audio/mp4|m4a.

Have you tried anything like this?

Does new episodes get rid of old?

It seems that the feed only supports initially 50 episodes. If a new episode comes out, will the oldest episode in the feed disappear to keep the feed to only being 50 episodes?

Add <itunes:block> to the feed's channel

Hiho!

To prevent independent podcast directories from listing the feeds generated, you might want to add

<itunes:block>yes</itunes:block>

to the feed's channels.

Episode URLs 404ing

I cannot stream or download a podcast. I have tried with both the Apple Podcasts app and AntennaPod (Android). Both apps give errors when trying to download or stream the feed. Additionally, I have opened the Spotifeed URL's RSS feed and tried to directly open the episodes' URL (e.g https://anon-podcast.scdn.co/ URLs). They 404.

Example:

I'm happy to provide more info to help troubleshoot, if needed.

Sponsor, Endorse

Spotify won't do it, but I will. Provide a link, IBAN, something, I will pay you a good beer. Thank you so much.

Doesn't work with iTunes!?

I wanted to add a feed wich i converted with Spotifeed to my iTunes (12.8.2.3, MacOS 10.13.6) but the Feed in iTunes shows "No Episodes in the podcastfeed".

The Feed works good in Pocketcasts for example.

Docs for self hosted version

Some docs about installation and usage on a self hosted system would be nice. Not everybody (inlcuding me) is familiar with running Ruby apps, especially as a web service.

No new episodes

Is there a bug or
is this related to the 50 items
or a limitation with pocket casts or
something wrong on my side, that

the service shows me the a correct listing for https://open.spotify.com/show/1OLcQdw2PFDPG1jo3s0wbp, but pocket casts shows only the last episode for November 3rd. No single item is shown newer than this, even. No updates on this, even if i archived the 50 received episodes till November 3rd.

Spotifeed not working with overcast?

So I added a Spotify original podcast to overcast. Initially everything worked flawlessly. Just the update does not seem to work. Today a nEw episode was added and is visible in Spotify. But not in overcast.

i saw that pocket casts blocked the spotifeed url. Maybe overcast as well? Or are they grabbing directly from the rss url

Add support for more than 50 episodes

Feeds only return 50 episodes in my experience.
Since there are podcasts with thousands of episodes it would be great to have more, or maybe self host and change that number manually.

What is anon-podcast.scdn.co ?

How is it that you get access to the full recording of a podcast episode? I take it that you grab the last part of the preview url of the episode as per Spotify's API response and add it onto the anon-podcast.scdn.co/. But how does that happen? What is this domain? Is this possible with any episode of the podcast or only the last fifty?

Missing episodes

Hello,

First of all, ✨THANK YOU✨ for creating this!

Some feeds loaded via Spotifeed are missing old episodes. It seems only the past 50 episodes are loaded. The Spotify web app loads older episodes via lazy-load pagination.

As an example, the How to Save a Planet podcast has 60 episodes available in the Spotify web app:

https://open.spotify.com/show/1KzrasExlM5dgMYwgFHns6

But only 50 episodes when passed through Spotifeed:

https://spotifeed.timdorr.com/1KzrasExlM5dgMYwgFHns6

If the Spotify API supports pagination, would it be possible to load all episodes via Spotifeed?

I'm the developer of Backfeed and will be loading some Spotify feeds which will save them in archive.org, so there will be a permanent history of all episodes. But if I can't easily access all episodes to start with, they'll never get archived.

Regards,
Quinn

Duration is incorrect

The enclosure length being hardcoded to 1234567 is inaccurate. If it can't be grabbed ahead of time, it would be better to just not include it.

Incorrect length in enclosure

According to the RSS spec:

The length attribute indicates the size of the file in bytes.

Currently, spotifeed uses duration_ms from the API as enclosure length, which is wrong. As we don't know the size of any particular episode beforehand, from the same doc:

When an enclosure's size cannot be determined, a publisher should use a length of 0.

This should be item.enclosure.length = 0.

How to increase 50 episode limit on self hosted

Hey as the title suggests could you please provide some info on how I could increase the 50 episode limit for self hosted.

I have seen your response on issue #10, which is fair enough but could you provide option for this to be changed on self hosted version.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.