You are not getting the form,so it return None.
RoboBrowser dos not evaluate JavaScript,so then have to reverse engineering what Angular dos to do the same.
Or simpler use Selenium/PhantomJS to do this.
Example it will try to log in:
>>> form = None >>> form['something'] = '****'
Error:Traceback (most recent call last):
File "<string>", line 301, in runcode
File "<interactive input>", line 1, in <module>
TypeError: 'NoneType' object does not support item assignment
The problem here is that log in use JavaScripts here with AngularJS.RoboBrowser dos not evaluate JavaScript,so then have to reverse engineering what Angular dos to do the same.
Or simpler use Selenium/PhantomJS to do this.
Example it will try to log in:
from selenium import webdriver from bs4 import BeautifulSoup import time # Activate Phantom and deactivate Chrome to not load browser #browser = webdriver.PhantomJS() browser = webdriver.Chrome() web_url = 'https://m.onlinebrokerage.cibc.com/#/signOn/en/ie' browser.get(web_url) user_name = browser.find_element_by_xpath('//input[@ng-model="pageState.username.value"]') user_name.send_keys("Foo") password = browser.find_element_by_xpath('//input[@ng-model="pageState.password.value"]') password.send_keys("Bar") time.sleep(2) submit = browser.find_element_by_css_selector('#submitButton') submit.click() ''' # Give source code to BeautifulSoup soup = BeautifulSoup(browser.page_source, 'lxml') welcome = soup.select('//title') print(welcome.text) '''