Oct-20-2017, 07:21 AM
Good Day,
I'm working on Auto-LogIn for the flowing webpage.
I'm very new to the Python; and I have been following a YouTube tutorial.
I need help to review my code.
And I'm Not sure what's wrong with line 7
please help
I'm working on Auto-LogIn for the flowing webpage.
I'm very new to the Python; and I have been following a YouTube tutorial.
I need help to review my code.
import re from robobrowser import RoboBrowser br = RoboBrowser() br.open("https://m.onlinebrokerage.cibc.com/#/signOn/en/ie") form = br.get_form() form['ng-pristine ng-valid ng-touched'] = "****" form['field ng-pristine ng-valid ng-valid-maxlength ng-touched'] = "****" br.submit_form(form) src = str(br.parsed()) start = '<span class="S27">' end = '</span>' result = re.search('%s(.*)%s' % (start, end), src).group(1) print(result)My errors:
Error:The code that caused this warning is on line 7 of the file C:/Users/tots/Desktop/PYTHON/Chrome/2/1.py. To get rid of this warning, change code that looks like this:
BeautifulSoup(YOUR_MARKUP})
to this:
BeautifulSoup(YOUR_MARKUP, "html.parser")
markup_type=markup_type))
Traceback (most recent call last):
File "C:/Users/tots/Desktop/PYTHON/Chrome/2/1.py", line 8, in <module>
form['ng-pristine ng-valid ng-touched'] = "*****"
TypeError: 'NoneType' object does not support item assignment
what should I replace 'ng-pristine ng-valid ng-touched' with? This field has no IDAnd I'm Not sure what's wrong with line 7
please help