smapp_collection.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:pysmap 作者: SMAPPNYU 项目源码 文件源码
def find_date_range(self):
        date_min = datetime.max
        date_max = datetime.min
        for tweet in self.collection.get_iterator():
            date_to_process = datetime.strptime(tweet['created_at'],'%a %b %d %H:%M:%S +0000 %Y')
            if date_to_process <= date_min:
                date_min = date_to_process
            if date_to_process >= date_max:
                date_max = date_to_process
        return {"date_min":date_min,"date_max":date_max}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号