Advertisement
Guest User

Untitled

a guest
Apr 25th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. tweets = etree.parse("tweets.xml")
  2. count = 0
  3.  
  4. for tweet in tweets.xpath("/tweets/tweet/content"):
  5.         tweets = tweets.xpath("/tweets/tweet/content/text()")
  6.         count = count+1
  7.         print("Tweet n°%s" % count)
  8.         print("=> " + tweets[count])
  9.         print("===================================")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement