this seems a little fragile. perhaps

video_id = entry["id"]["$t"].replace("http://gdata.youtube.com/feeds/api/videos/", "")
assert len(video_id) == 11
video_ids.add(video_id)

so there's at least a small sanity check.