]> code.communitydata.science - cdsc_reddit.git/commitdiff
script for getting submissions dumps from pushshift.
authorNate E TeBlunthuis <nathante@n2347.hyak.local>
Fri, 3 Jul 2020 00:40:17 +0000 (17:40 -0700)
committerNate E TeBlunthuis <nathante@n2347.hyak.local>
Fri, 3 Jul 2020 00:40:17 +0000 (17:40 -0700)
pull_pushift_submissions.sh [new file with mode: 0755]

diff --git a/pull_pushift_submissions.sh b/pull_pushift_submissions.sh
new file mode 100755 (executable)
index 0000000..addc01c
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+user_agent='nathante teblunthuis <nathante@uw.edu>'
+output_dir='/gscratch/comdata/raw_data/reddit_dumps/submissions'
+base_url='https://files.pushshift.io/reddit/submissions/'
+
+wget -r --no-parent -A 'RS_20*.bz2' -U $user_agent -P $output_dir -nd $base_url
+wget -r --no-parent -A 'RS_20*.xz' -U $user_agent -P $output_dir -nd $base_url
+wget -r --no-parent -A 'RS_20*.zst' -U $user_agent -P $output_dir -nd $base_url
+wget -r --no-parent -A 'RS_20*.bz2' -U $user_agent -P $output_dir -nd $base_url/old_v1_data
+wget -r --no-parent -A 'RS_20*.xz' -U $user_agent -P $output_dir -nd $base_url/old_v1_data
+wget -r --no-parent -A 'RS_20*.zst' -U $user_agent -P $output_dir -nd $base_url/old_v1_data
+
+

Community Data Science Collective || Want to submit a patch?