Skip to content

Updated to Python 3 #386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions GroupSms_Way2.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/usr/bin/python

import urllib2
import cookielib
from getpass import getpass
import sys

username = raw_input('Enter mobile number:')
username = input('Enter mobile number:')
passwd = getpass()
message = raw_input('Enter Message:')
message = input('Enter Message:')
#Fill the list with Recipients
x=raw_input('Enter Mobile numbers seperated with comma:')
num=x.split(',')
Expand All @@ -27,7 +25,7 @@
try:
usock = opener.open(url, data)
except IOError:
print "Error while logging in."
print("Error while logging in.")
sys.exit(1)


Expand All @@ -41,7 +39,7 @@
send_sms_data = 'ssaction=ss&Token='+jession_id+'&mobile='+number+'&message='+message+'&msgLen=136'
sms_sent_page = opener.open(send_sms_url,send_sms_data)
except IOError:
print "Error while sending message"
print("Error while sending message")

sys.exit(1)
print "SMS has been sent."