Opener: When you get a URL, you use a opener (Openerdirector). Under normal circumstances we have been using the default opener, through Urlopen, but you can also create custom openers.
Opener use handler to handle tasks, all the heavy work is given to these handlers to do. Each handler knows how to open a URL with a specific URL protocol, or how to handle certain aspects of opening a URL, such as an HTTP redirect, or an HTTP cookie. (copy of)
Install_opener is used to create a (global) default opener. This indicates that calling Urlopen will use the opener you installed.
The opener object has an open method. This method can be used to obtain URLs as directly as the Urlopen function: it is not usually necessary to call Install_opener, except to facilitate
That is, you want to use Urlopen, if you do not define opener as a global, Urlopen will still use the default, so you crawl out of the result is still 403.
Python install_opener usage