I am a beginner using Python 3.6.4 and RoboBrowser 0.5.3. I have saved some HTML webpage and I am trying to pick up the information in the page.
Most likely incorrectly, I took inspiration from a similar question on beautifulSoup. The beautifulSoup solution works for me (BeautifulSoup 4.6.0).
In contrast, the following, based on roboBrowser, does not seem to work:
from robobrowser import RoboBrowser
br = RoboBrowser(parser='html.parser')
br.open(open("my_file.html"))
with error:
MissingSchema: Invalid URL "<_io.TextIOWrapper name='my_file.html' mode='r' encoding='UTF-8'>": No schema supplied. Perhaps you meant http://<_io.TextIOWrapper name='my_file.html' mode='r' encoding='UTF-8'>?
I understand that the code expected a "http"-based url. I tried prepending "file://" to the absolute path of my file, to no avail.
Is there any way to communicate with the library that it is a local file, or perhaps such functionality is not part of roboBrowser?