Skip to content

Instantly share code, notes, and snippets.

@Azelphur
Created February 11, 2013 01:49
Show Gist options
  • Select an option

  • Save Azelphur/4751932 to your computer and use it in GitHub Desktop.

Select an option

Save Azelphur/4751932 to your computer and use it in GitHub Desktop.
How to use pushbullet with utorrent
from pushbullet import PushBullet
import sys
"""
Simple torrent download completed notification, should work with anything that can execute a command, like utorrent.
In utorrent set your command to execute as...
C:\Python\Python3.exe "user@gmail.com" "password" "%N"
"""
p = PushBullet()
p.signIn(sys.argv[1], sys.argv[2])
devices = p.getDevices()
data = {'type' : 'note',
'device_id' : devices[0]["id"],
'title' : "Torrent downloaded",
'body' : sys.argv[3]}
p.pushNotification(data)
@andycarver101

Copy link
Copy Markdown

C:\Users\Local Admin\Documents\gistfile1.py "andycarver@gmail.com" "mypassword" "%N"�

Not working. What am I doing wrong?

@hassanzayan

Copy link
Copy Markdown

pushbullet only requires a API token to work while this script is asking for an email and pass, also the instructions point to the main python executable, shouldn't it somehow mention the python file as well?

@andycarver101

Copy link
Copy Markdown

Geeez I'm over this. Nothing works. I have one last thing up my sleeve a curl cmd.

I'm going to try this simple one first. on start up.
Can you make a an exe or bat from a curl cmd?

$ curl -u <1sJjjSQrPq7MYAPICODEg6AOFtF>: https://api.pushbullet.com/v2/pushes -d type=note -d title="Plex Media Server" -d body='Plex Media Server has started!'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment