Delete watched videos from myPlex queue

I had a lot of old watched videos in myPlex queue that needed to be deleted, so I wrote this script to automate the process.  There is also a script available which will delete all the UN-watched videos from your queue.

 

https://github.com/caveatsCode/Plex_Queue_Delete_Watched

 

Plex_Queue_Delete_Watched
=========================
 
Simple script to delete all watched videos from your myPlex queue
 
Requirements:  
Python (I use version 2.7, but other versions may work)  
lxml (http://lxml.de/)  
 
Usage:  
python Plex_Queue_Delete_Watched.py  
You will be prompted to enter your myPlex username and password  
ALL watched videos will be deleted from your myPlex queue!

 

OR

 

Usage:  
python Plex_Queue_Delete_Unwatched.py  
You will be prompted to enter your myPlex username and password  
ALL UN-watched videos will be deleted from your myPlex queue!

Does seem to work for me :(

This is the error shown:

Traceback (most recent call last):
  File "Plex_Queue_Delete_Watched.py", line 17, in 
    auth_token = get_auth_token(page)
  File "Plex_Queue_Delete_Watched.py", line 6, in get_auth_token
    tree = etree.HTML(page.text)
AttributeError: 'Response' object has no attribute 'text'

 

I'm very interested in this script, and also a script whch would clear the entire queue.

You may be using an outdated version of Requests (based on someone who had a similar problem on StackOverflow).

If you are on Python 2.7, try:

pip-2.7 install requests --upgrade

If you aren't able to upgrade requests, it may be sufficient to replace 'page.text' with 'page.content' anywhere it appears in the script.

There is now a 2nd script uploaded to github to delete UN-watched videos from the queue.

I've tried using your suggestion, and then followed up with some debugging.

It seems the login step/post doesn't work for me, and the queue request gets redirected to https://my.plexapp.com/users/sign_in every time.

The scripts have been completely rewritten and are available on github.  The recent massive changes to Plex webpages broke the screen-scraping of the original script.  The rewritten version utilizes the plex API, so it should be more robust.

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