"""
Methods for getting NPHS tweets
"""

from SocialNPHS.sources.twitter.auth import api


def get_nphs_tweets():
    """ Get most recent tweets from the Twitter list of NPHS students """
    statuses = api.list_timeline("1Defenestrator", "NPHS")
    # Filter out retweets and return
    return [s.text for s in statuses if not s.text.startswith("RT @")]

@@ -34,16 +34,85 @@
 ts%0A%22%22%22%0A%0A
+from datetime import datetime, timedelta%0A%0Afrom tweepy import Cursor%0A%0A
 from Soc
@@ -173,16 +173,61 @@
 _tweets(
+since=datetime.utcnow() - timedelta(hours=24)
 ):%0A    %22
@@ -309,16 +309,273 @@
 atuses =
+ %5B%5D%0A%0A    # Find all tweets since the provided datetime%0A    for status in Cursor(api.list_timeline, %221Defenestrator%22, %22NPHS%22).items():%0A        if status.created_at %3C since:%0A            break%0A        else:%0A            statuses.append(status)%0A%0A    # statuses =
  api.lis
@@ -661,21 +661,16 @@
 eturn %5Bs
-.text
  for s i

Support downloading tweets by start time in get_nphs_tweets