So far I managed to write a code which shows results (not really; it shows just titles) of one search. I would like to change it so it shows results of 20 different searches. I know it can be done with use of for loop but I tried and cannot achieve anything. Basically I want to run the code with variable "instruments" changing each time to different word from the list.
list of the words for "instrument" variable: guitar, mandolin, piano, bazouki, ukulele, bones, sintar, oud, pipa, clarinet, rebab, lute, fiddle, santoor, lyre, tres, tambura, koto, harp, shamisen
that is what I have so far:
- Code: Select all
instrument = "Guitar"
secpart = "performance"
yt_service = gdata.youtube.service.YouTubeService()
query = gdata.youtube.service.YouTubeVideoQuery()
query.vq = instrument + secpart
query.max_results = 2
query.orderby = 'viewCount'
query.racy = 'include'
feed = yt_service.YouTubeQuery(query)
for entry in feed.entry:
+ if anyone knows how to change it from showing only titles to showing actuall videos I would be more than grateful!