The problem is about Python's CSS selectors.
I can't write a selector in the right way to select the item with "Last". I tried with:
div.pager a:[text*='Last']
Elements within which that item lies:
<div class="pager"><a href="/search/1080p/" class="current">1</a> <a href="/search/1080p/t-23/">23</a> <a href="/search/1080p/t-255/">Last</a> </div>