| changeset 693 | 2ef837069108 |
| parent 487 | 323b5f770fa0 |
| child 886 | 1e110b03ae96 |
| 692:51072e5e6ea9 | 693:2ef837069108 |
|---|---|
293 ts = tweet_ts |
293 ts = tweet_ts |
294 tweet_ts_rel = (tweet_ts-ts) * 1000 |
294 tweet_ts_rel = (tweet_ts-ts) * 1000 |
295 username = None |
295 username = None |
296 profile_url = "" |
296 profile_url = "" |
297 if tw.user is not None: |
297 if tw.user is not None: |
298 username = tw.user.name |
298 username = tw.user.screen_name |
299 profile_url = tw.user.profile_image_url if tw.user.profile_image_url is not None else "" |
299 profile_url = tw.user.profile_image_url if tw.user.profile_image_url is not None else "" |
300 if not username: |
300 if not username: |
301 username = "anon." |
301 username = "anon." |
302 |
302 |
303 element = etree.SubElement(elements, u"element" , {u"id":unicode(uuid.uuid4())+u"-"+unicode(tw.id), u"color":unicode(options.color), u"author":unicode(username), u"date":unicode(tweet_ts_dt.strftime("%Y/%m/%d")), u"begin": unicode(tweet_ts_rel), u"dur":u"0", u"src":unicode(profile_url)}) |
303 element = etree.SubElement(elements, u"element" , {u"id":unicode(uuid.uuid4())+u"-"+unicode(tw.id), u"color":unicode(options.color), u"author":unicode(username), u"date":unicode(tweet_ts_dt.strftime("%Y/%m/%d")), u"begin": unicode(tweet_ts_rel), u"dur":u"0", u"src":unicode(profile_url)}) |