Exemplo n.º 1
0
counter = 0
try:
	if msgfolder == "Inbox" :
		msglen = len(voice.inbox().messages)
		for message in voice.inbox().messages:
			counter = doactions(counter, ACTION, message.id , ID)
			if (msglen == counter) :
				break
	elif msgfolder == "Voicemail" :
		msglen = len(voice.voicemail().messages)
		for message in voice.voicemail().messages:
			counter = doactions(counter, ACTION, message.id , ID)
			if (msglen == counter) :
				break
	elif msgfolder == "Recorded" :
		msglen = len(voice.recorded().messages)
		for message in voice.recorded().messages: 
			counter = doactions(counter, ACTION, message.id , ID)
			if (msglen == counter) :
				break
	elif msgfolder == "Messages" :
		msglen = len(voice.sms().messages)
		for message in voice.sms().messages:
			counter = doactions(counter, ACTION, message.id , ID)
			if (msglen == counter) :
				break
	elif msgfolder == "All" :
		voice.all()
		folder = voice.all.folder
		msglen = len(folder.messages)
		for message in folder.messages:
Exemplo n.º 2
0
    print('Error! Please provide Email Account.')
    exit(0)

try:
    password = argv[2]
except:
    print('Error! Please provide Passsword.')
    exit(0)

try:
    voice.login(email, password)
except:
    print('Error! Login failed.')
    exit(0)

try:
    for message in voice.recorded().messages:
        directory = "googlerecorded/" + message.id
        if not path.isdir(directory):
            makedirs(directory)
            message.download(directory)
    folder = voice.recorded().messages
    foundmsg = [msg for msg in folder]
    if foundmsg != []:
        foundmsg.sort(key=lambda x: x['displayStartDateTime'], reverse=True)
        print json.dumps(foundmsg, indent=4, default=str)
except:
    print("Error! Recordings not downloaded.")

voice.logout
Exemplo n.º 3
0
try:
    ID = argv[4]
except:
    print('Error! Please provide a Message ID and NOTES. ')
    voice.logout()
    exit(0)
try:
    NOTES = json.loads(argv[5])
except:
    print('Error! Please provide NOTES. ')
    voice.logout()
    exit(0)

try:
    if msgfolder == "Voicemail":
        for message in voice.voicemail().messages:
            if (message.id == ID):
                message.addNote(NOTES)
                break
    elif msgfolder == "Recorded":
        for message in voice.recorded().messages:
            if (message.id == ID):
                message.addNote(NOTES)
                break
except:
    print("Error! With" + msgfolder + ", Message ID:" + ID + " and Notes:" +
          NOTES)

print "Notes Added!"
voice.logout()
Exemplo n.º 4
0
	
try:
	ID = argv[4]
except:
	print ('Error! Please provide a Message ID. ')
	voice.logout()
	exit(0)

if command == "Inbox" :
	voice.inbox()
	allmessages = extractdata(voice.inbox.html)
elif command == "Voicemail" :
	voice.voicemail()
	allmessages = extractdata(voice.voicemail.html)
elif command == "Recorded" :
	voice.recorded()
	allmessages = extractdata(voice.recorded.html)
elif command == "Messages" :
	voice.sms()
	allmessages = extractdata(voice.sms.html)
elif command == "All" :
	voice.all()
	allmessages = extractdata(voice.all.html)
elif command == "Spam" :
	voice.spam()
	allmessages = extractdata(voice.spam.html)
elif command == "Trash" :
	voice.trash()
	allmessages = extractdata(voice.trash.html)
elif command == "Placed" :
	voice.placed()
Exemplo n.º 5
0
try:
    ID = argv[4]
except:
    print('Error! Please provide a Message ID or Phone Number. ')
    voice.logout()
    exit(0)

if command == "Inbox":
    folder = voice.inbox().messages
    foundmsg = [msg for msg in folder]
elif command == "Voicemail":
    folder = voice.voicemail().messages
    foundmsg = [msg for msg in folder]
elif command == "Recorded":
    folder = voice.recorded().messages
    foundmsg = [msg for msg in folder]
elif command == "Messages":
    folder = voice.sms().messages
    foundmsg = [msg for msg in folder]
elif command == "All":
    folder = voice.all().messages
    foundmsg = [msg for msg in folder]
elif command == "Spam":
    folder = voice.spam().folder
    foundmsg = [msg for msg in folder.messages]
elif command == "Trash":
    folder = voice.trash().folder
    foundmsg = [msg for msg in folder.messages]
elif command == "Placed":
    folder = voice.placed().messages