No need to default upper
, just let it be None.
This commit is contained in:
parent
3e9aa946b1
commit
0f66efc771
1 changed files with 2 additions and 5 deletions
|
@ -61,11 +61,6 @@ def timesearch(
|
|||
if lower is None:
|
||||
lower = 0
|
||||
|
||||
if upper is None:
|
||||
upper = common.get_now() + 86400
|
||||
|
||||
form = '{lower} - {upper} +{gain}'
|
||||
|
||||
if username:
|
||||
submissions = pushshift.get_submissions_from_user(username, lower=lower, upper=upper)
|
||||
else:
|
||||
|
@ -74,6 +69,8 @@ def timesearch(
|
|||
if do_supplement:
|
||||
submissions = pushshift.supplement_reddit_data(submissions, chunk_size=100)
|
||||
submissions = common.generator_chunker(submissions, 200)
|
||||
|
||||
form = '{lower} - {upper} +{gain}'
|
||||
for chunk in submissions:
|
||||
chunk.sort(key=lambda x: x.created_utc)
|
||||
new_count = database.insert(chunk)['new_submissions']
|
||||
|
|
Loading…
Reference in a new issue