Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for _ in range(random.randint(0, 500)):
- try:
- post = posts.next()
- except StopIteration:
- break
- # get timestamp of current post
- if 'created' in post[1]: # see if created is inserted as column, else use WRITETIME of guid as created.
- created = post[1]['created'][0]
- else:
- created = post[1]['data'][1]
- timestamp = Toolbox.time.usToUtcDatetime(int(created))
- timestamp = timestamp.replace(microsecond=0)
- # empty list and start saving new timestamps.
- if (currTimeStamp is None) or (currTimeStamp != timestamp):
- postToCheck = []
- postsToCheck.append(post)
- elif (currTimeStamp == timestamp):
- postToCheck.append(post)
- else:
- print "this shouldnt happen, help"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement