# Python script to post m3u playlists to Plex

**URL:** <https://forums.plex.tv/t/python-script-to-post-m3u-playlists-to-plex/774138>\
**Category:** Apps & Creations\
**Tags:** library-management, playlists\
**Created:** [February 1, 2022, 4:57pm UTC](https://forums.plex.tv/t/python-script-to-post-m3u-playlists-to-plex/774138 "2022-02-01T16:57:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpacemanSpiff](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@SpacemanSpiff](https://forums.plex.tv/u/SpacemanSpiff)\
**Post date:** [February 1, 2022, 4:57pm UTC](https://forums.plex.tv/t/python-script-to-post-m3u-playlists-to-plex/774138/1 "2022-02-01T16:57:32Z")

</div>

Ways to push an m3u to Plex have been covered [here](https://forums.plex.tv/t/any-way-to-import-playlists/457018) and [here](https://www.reddit.com/r/PleX/comments/ecirqa/how_to_manually_import_an_m3u_playlist_into_plex/) - great info, thanks to all who contributed!

Posting a simple python 3.x script I wrote to do this via requests. I use MediaMonkey to manage my music library and export m3u’s from there. You can run this on the machine hosting PMS or another LAN PC but must tell the script which one it is.

Carefully read the notes in the script & use at your own risk. You may have to change the encoding for your “source” m3u files (the script converts to UTF-8 which Plex likes). Notepad++ or similar should tell what’s being used.

It may give an “OK” response even if the paths etc. aren’t correct, in which case the playlist just won’t show up in Plex Web. You may have to hit refresh on the Plex Web interface to see playlists appear; if nothing’s there, something was off 🙂

[Plex\_Post\_m3u.zip](https://forums.plex.tv/uploads/short-url/kStAB32g6qOpbTNoPVF0UOwYBJO.zip) (1.9 KB)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [May 2, 2022, 4:58pm UTC](https://forums.plex.tv/t/python-script-to-post-m3u-playlists-to-plex/774138/2 "2022-05-02T16:58:25Z")

</div>

Closed on May 2, 2022, 4:58pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
