OK I ran this:
Code:
# This test program is for finding the correct Regular expressions on a page to insert into the plugin template.
# After you have entered the url between the url='here' - use ctrl-v
# Copy the info from the source html and put it between the match=re.compile('here')
# press F5 to run if match is blank close and try again.
import urllib2,urllib,re
url = 'http://deturl.com/www.youtube.com/results?search_query=adele+karaoke'
req = urllib2.Request(url)
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()
match=re.compile('src="http://i1.ytimg.com/vi/(.+?)/1.jpg').findall(link)
print match
i = 0
for url in match:
i +=1
if i >= 11:
break
else:
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)
print match1
and I get the result:
Code:
['TGVhQ61C6IU', 'sTE9s43rdT8', 'v5pJMwgKQcw', 'XUQVk4oG8LM', 'x-nTWktLBL8', 'Cgdes6lFjzM', 'vWaXO1wnOKU', 'L7nmEjjrKGc', 'fgfJLw9Zug4', '1l0drm-lM5M', 'uqhVqsPI5v8', 'KMOmkQ_LhYA', 'AX-kWqAwH1I', 'HHL0q-z7CyM', '59CPfYsIKc4', '2QC8DfcSe_0', 'SFRJpyNQ1K0', '3lrBve6xLw8', 'MgEyI3EFPP4', '_4fNgNCxQWk', '7D26e6l_5iI', 'JFwd16raBKU', 'LrW7Umr_5wM', 'SRn4Fh47kok', 'li9W-yEjK2g', 'uQCaVs5FGpc', '3bxsKcbKVa0', 'buG0HCAFy3s', '2AHVUH_bGBY', 'LtMb_fGHUY0', '4W5TO-woLmg', '0jF6XyW3QY4']
['Turning Tables ~ Adele Karaoke/Intrumental']
['Make You Feel My Love - Adele [Karaoke/Instrumental]']
['Someone Like You - ADELE (Karaoke)']
['Adele - Set Fire To The Rain (Karaoke)']
['One And Only -- Adele (karaoke - full version)']
['Adele - Someone Like You Karaoke']
[]
[]
['Set Fire To The Rain - Adele - Karaoke']
["I'll Be Waiting - Adele Karaoke/Instrumental + Lyrics"]
So it is definitely limiting, the two blanks were removed btw, might want to check for those before adding a 1 to i.