Code:
def get_browser(self):
USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0'
br = BasicNewsRecipe.get_browser(self, user_agent=USER_AGENT)
#br.set_debug_http(True)
#br.set_debug_responses(True)
br.set_debug_http(True)
br.open(self.INDEX)
if self.username is not None and self.password is not None:
#data = {'login': self.username, 'password':self.password}
data = dict(login=self.username,password=self.password)
br.open(self.LOGIN, data)
response = br.response()
return br
I tried this - it seems from the debug it's a problem of submitting as a GET not as a POST. But trying to make a dict fails - I get unhashableType errors. Probably a stupid mistake?