Skip to content

godwhoa/rquery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rquery - reddit query

rquery fetches given reddit users's posts/submissions and puts it in a local sqlite db.

Usage

usage: rquery.py [-h] --id ID --secret SECRET [--limit LIMIT] [--db DB]
                 user [user ...]

Puts given users's posts/submissions into a sqlite db.

positional arguments:
  user             Users you wanna store in sqlite

optional arguments:
  -h, --help       show this help message and exit
  --id ID          reddit client id
  --secret SECRET  reddit client secret
  --limit LIMIT    limit for how many comments/submissions to fetch
  --db DB          db path

Sample query:

SELECT 
submissions.user as submitter, 
comments.user as commenter,
submissions.url as submission_url, 
comments.url as comment_url,
comments.body as comment_body
FROM submissions
INNER JOIN comments ON comments.submission_id = submissions.id
WHERE commenter != submitter;

Output:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages