All keywords
pth
Registered Users Posts: 49 Big grins
I think I know the answer to this question, but I want to be wrong :-)
Is there an API method to collect all keywords (better yet with their usage count)? There is a tag cloud on the homepage, so this data is available, but shy of collecting all albums and their photos, I do not see how I could gather this information with the API.
Thanks
pth
Is there an API method to collect all keywords (better yet with their usage count)? There is a tag cloud on the homepage, so this data is available, but shy of collecting all albums and their photos, I do not see how I could gather this information with the API.
Thanks
pth
0
Comments
Unfortunately not. You'd have to create your own function that effectively trawled through all the images/albums and grab the keywords. This would be very painful and time consuming so I wouldn't recommend it.
Personal Blog | Tech Blog | phpSmug
I decided to write such a function for pysmug and it turned out to be both easy and fast if you use batchables. I can build a dictionary of {keyword:count} for over 80 galleries and 3200+ photos in less than 30 seconds -- depends on your definition of fast of course. The function takes an optional keyword parsing function since keywords appear to be variable in format.
I added this for the 0.5 release of pysmug, but it will work perfectly well with version 0.4 (code here, look for "tagcloud").
Use it like this:
thanks, brian
--
Brian Zimmer / bzimmer.ziclix.com
thanks, brian
http://yoursite.smugmug.com/keyword/
--Darryl
Why scrape when you can get reliable structured content from the API?