Skip to content

Commit

Permalink
resolves #6
Browse files Browse the repository at this point in the history
  • Loading branch information
pushshift committed May 22, 2018
1 parent 6be3942 commit 17fcb30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ There is a caveat however -- SSE streams currently only work via http (no SSL).
| comment_backfill | Starts stream X comments ago (up to 100,000 submissions) | INT (1-100000) |
| submission_start_id | Starts stream at specific comment ID (Used for continuation if stream is broken | INT |
| comment_start_id | Starts stream at specific submission ID (Used for continuation if stream is broken) | INT |

| over_18 | Restrict submissions in stream to NSFW or SFW content | Boolean (true or falue) |

## Examples:

Expand Down
4 changes: 4 additions & 0 deletions sse.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ def eventStream():
created_utc = submission['created_utc']
author = submission['author']
subreddit = submission['subreddit']
over_18 = submission['over_18']

if 'over_18' in params:
if params['over_18'][0].lower() != over_18.lower(): continue

if 'author' in params:
if author in params['author']:
Expand Down

0 comments on commit 17fcb30

Please sign in to comment.