Pushpull had stale data so we changed the endpoints to use Artic Shift which has fresh data
This commit is contained in:
@@ -129,11 +129,10 @@ async def _poll_new_posts_async():
|
||||
client = create_client()
|
||||
async with client:
|
||||
for sub in subreddits:
|
||||
data = await fetch_json(client, "/reddit/search/submission/", {
|
||||
data = await fetch_json(client, "/api/posts/search", {
|
||||
"subreddit": sub["name"],
|
||||
"sort": "created_utc",
|
||||
"sort_type": "desc",
|
||||
"size": 100,
|
||||
"sort": "desc",
|
||||
"limit": 100,
|
||||
})
|
||||
if not data:
|
||||
continue
|
||||
@@ -163,11 +162,11 @@ async def _poll_hot_posts_async():
|
||||
client = create_client()
|
||||
async with client:
|
||||
for sub in subreddits:
|
||||
data = await fetch_json(client, "/reddit/search/submission/", {
|
||||
data = await fetch_json(client, "/api/posts/search", {
|
||||
"subreddit": sub["name"],
|
||||
"sort": "score",
|
||||
"sort_type": "desc",
|
||||
"size": 100,
|
||||
"sort": "desc",
|
||||
"sort_by": "score",
|
||||
"limit": 100,
|
||||
"after": after_epoch,
|
||||
})
|
||||
if not data:
|
||||
@@ -201,11 +200,10 @@ async def _collect_comments_async():
|
||||
client = create_client()
|
||||
async with client:
|
||||
for sub in subreddits:
|
||||
data = await fetch_json(client, "/reddit/search/comment/", {
|
||||
data = await fetch_json(client, "/api/comments/search", {
|
||||
"subreddit": sub["name"],
|
||||
"sort": "created_utc",
|
||||
"sort_type": "desc",
|
||||
"size": 100,
|
||||
"sort": "desc",
|
||||
"limit": 100,
|
||||
"after": cutoff_epoch,
|
||||
})
|
||||
if not data:
|
||||
@@ -273,11 +271,10 @@ async def _update_scores_async():
|
||||
client = create_client()
|
||||
async with client:
|
||||
for sub in subreddits:
|
||||
data = await fetch_json(client, "/reddit/search/submission/", {
|
||||
data = await fetch_json(client, "/api/posts/search", {
|
||||
"subreddit": sub["name"],
|
||||
"sort": "created_utc",
|
||||
"sort_type": "desc",
|
||||
"size": 100,
|
||||
"sort": "desc",
|
||||
"limit": 100,
|
||||
"after": after_epoch,
|
||||
})
|
||||
if not data:
|
||||
|
||||
Reference in New Issue
Block a user