way2sms

Sending an sms via way2sms using Python 3

孤街醉人 提交于 2020-01-03 02:24:08
问题 I've been trying to send free sms using way2sms. I found this link where it seemed to work on python 3: https://github.com/shubhamc183/way2sms I've saved this file as way2sms.py: import requests from bs4 import BeautifulSoup class sms: def __init__(self,username,password): ''' Takes username and password as parameters for constructors and try to log in ''' self.url='http://site24.way2sms.com/Login1.action?' self.cred={'username': username, 'password': password} self.s=requests.Session() #

scraping way2sms with mechanize

无人久伴 提交于 2019-12-25 01:54:01
问题 I am trying to send an sms with by scraping way2sms.com, but I am unable to login into way2sms.com using mechanize. I am using following code to submit the login form. import mechanize br = mechanize.Browser() br.set_handle_robots(False) br.set_handle_refresh(False) br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0')] res=br.open('http://wwwa.way2sms.com/content/prehome.jsp') link=list(br.links())[5] res=br.follow_link(link) br.form = list

Way2SMS python code not sending SMS whereas POSTS returns Success

ε祈祈猫儿з 提交于 2019-12-11 16:11:43
问题 I get Successful status code for my POST requests , Login is working fine , but the SMS is not sent I have gone through all codes on internet, most of them are out-dated, as the site has changed its code. import requests as req def login_way2sms(): with req.Session() as mySession: url = 'http://www.way2sms.com/re-login' home_url = 'http://www.way2sms.com/' mobile = [your registered mobile number] password = [your password] headers = dict(Referrer="http://www.way2sms.com/") before = mySession