tweetcount.py 文件源码

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

项目:twitter_word_count 作者: prrateekk 项目源码 文件源码
def success(name,tme):
    global count

    # Splits the time duration into relevant information
    d,waste1,waste2 = tme.split()
    d=eval(d)

    # runs when needs to make STREAMLISTENER API Calls
    if d>7:
        twitter_stream = Stream(auth, MyListener(time_limit=d))
        twitter_stream.filter(track=[name])
    else:
        # runs when needs to make REST API Calls
        past(name,d)

    return render_template('welcome.html',count=count,name=name,duration=tme)


# collects the input data from the FORM and then redirects the input to the next page
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号