Return Strict Amount

Mikey1234

Banned
May 6, 2012
1,441
0
0
UK
how can i return like only 12 items instead of the lot

Code:
        for url in match:
            url1='http://www.flipbooth.com/yt/%s/' % url
            req = urllib2.Request(url1)
            req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
            response = urllib2.urlopen(req)
            link=response.read()
            response.close()
            match1 = re.compile('property="og:title" content="(.+?)"/>\r\n<meta').findall(link)
            for name in match1:            
                iconimage = 'http://i.ytimg.com/vi/%s/0.jpg' % url
                name = str(name).replace("'","'") .replace("&","and")
                addDir(name,url,7,iconimage)            
                xbmc.executebuiltin("Container.SetViewMode(500)")