~davidc3/onehundredscopes/youporn-precise

« back to all changes in this revision

Viewing changes to src/unity-scope-youporn

  • Committer: David Callé
  • Date: 2012-03-24 13:09:43 UTC
  • Revision ID: davidc@framli.eu-20120324130943-ogbpy3hcvkc9hivd
* Fix "More results" button (temporary)
* Add a new icon check

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
                model.append (uri, icon_hint, 0,"text/html", title, comment, dnd_uri)
95
95
            model.flush_revision_queue ()
96
96
        print counter
97
 
        if counter == 28 or counter == 31 or counter == 32:
 
97
        if counter > 0:
98
98
            model.append ("page__"+str(page)+"__"+str(search), "add", 0,"text/html", "More results", "", "")
99
99
 
100
100
    def youporn(self, search, cat_name, cat_id, page):
120
120
    # Parse for thumbnails
121
121
            for img in tree.cssselect('a img'):
122
122
                try:
123
 
                    if '/thumbnail/' in img.get('src') or '/screenshot/' in img.get('src'):
 
123
                    if '/thumbnail/' in img.get('src') or '/screenshot/' in img.get('src') or '.image.' in img.get('src'):
124
124
                        icons.append(img.get('src'))
125
125
                except:
126
126
                    pass