@Taloth - You’re the fucking man!
For anyone else who is having this problem,
Change line 34 in sonarr-episode-trimmer.py to add your URL base (configured in Sonarr Settings -> General)
url = "/[URLBASE]/api/%s?%s" % (action, urllib.urlencode(params))
Example:
url = "/sonarr/api/%s?%s" % (action, urllib.urlencode(params))