diff -r 0f1a2764ad18 -r 93fd53a97d6d script/lib/iri_tweet/export_twitter_alchemy.py --- a/script/lib/iri_tweet/export_twitter_alchemy.py Sat Jan 29 06:34:45 2011 +0100 +++ b/script/lib/iri_tweet/export_twitter_alchemy.py Sun Jan 30 22:10:59 2011 +0100 @@ -199,13 +199,13 @@ media_nodes = root.xpath("//media") if len(media_nodes) > 0: media = media_nodes[0] - annotations_node = root.find(u"annotations") - if annotations_node is None: - annotations_node = etree.SubElement(root, u"annotations") - content_node = annotations_node.find(u"content") - if content_node is None: - content_node = etree.SubElement(annotations_node,u"content", id=media["id"]) - ensemble_parent = content_node + annotations_node = root.find(u"annotations") + if annotations_node is None: + annotations_node = etree.SubElement(root, u"annotations") + content_node = annotations_node.find(u"content") + if content_node is None: + content_node = etree.SubElement(annotations_node,u"content", id=media.get(u"id")) + ensemble_parent = content_node elif file_type == "iri": body_node = root.find(u"body") if body_node is None: