RoboBrowser error - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: RoboBrowser error (/thread-16983.html) |
RoboBrowser error - Pythenx - Mar-23-2019 This code should go to the mp3 converter page and fill in the form with "just an example". It shows an error, which I don't know how to fix. I tried looking it up but didn't find anything. I would appreciate any kind of help very much. Thanks in advance! from robobrowser import RoboBrowser br = RoboBrowser() br.open("https://ytmp3.cc/") form = br.get_form() form['input'] = 'just an example' br.submit_form(form)I tried doing the instructions what the error message said, but I don't know how to that exactly. Here is the line in which the error is caused and in which I probably need to pass the additional argument... def parsed(self): """Lazily parse response content, using HTML parser specified by the browser. """ return BeautifulSoup( self.response.content, features=self.browser.parser )
RE: RoboBrowser error - mlieqo - Mar-23-2019 It seems that you need to access form elements with their name attributes, you can see this if you print out your 'form' var: and then change the value of this element with:form['video'].value = 'just an example' RE: RoboBrowser error - metulburr - Mar-23-2019 I would suggest to use requests library or mechanize (or selenium if your stuck on javascript). RoboBrowser seems to have stalled development. The last update was 4 years ago and the whole project last one year total. It seems more like a college student project that he moved on. There is also more help for those libraries as they are more well known. I havent even heard about robobrowser until this thread. They are also more well developed and more features. |