I use chrome Momentum extension to customize my browser new tab and would like to write a python script to get its daily dashboard wallpaper
By now I know I can reach desired page through the url
chrome-extension://laookkfknpbbblfpciffpaejjkokdgca/dashboard.html
However, when I try to call urllib.request.urlopen with this url the following error is raised:
urllib.error.URLError: <urlopen error unknown url type: chrome-extension>
Is possible to include custom protocols to be open by urllib?
Or would there be another way to get page html result?
If the file exists locally and not on the web then using urllib won't do you much good since it's not a URL.
use webbrowser lib instead and provide a path to your file: