]> code.communitydata.science - cdsc_reddit.git/blobdiff - pull_pushshift_submissions.sh
bugfix in retrieving old data and rename file.
[cdsc_reddit.git] / pull_pushshift_submissions.sh
diff --git a/pull_pushshift_submissions.sh b/pull_pushshift_submissions.sh
new file mode 100755 (executable)
index 0000000..f64a09f
--- /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 -nc $base_url
+wget -r --no-parent -A 'RS_20*.xz' -U $user_agent -P $output_dir -nd -nc $base_url
+wget -r --no-parent -A 'RS_20*.zst' -U $user_agent -P $output_dir -nd -nc $base_url
+wget -r --no-parent -A 'RS_20*.bz2' -U $user_agent -P $output_dir -nd -nc $base_url/old_v1_data/
+wget -r --no-parent -A 'RS_20*.xz' -U $user_agent -P $output_dir -nd -nc $base_url/old_v1_data/
+wget -r --no-parent -A 'RS_20*.zst' -U $user_agent -P $output_dir -nd -nc $base_url/old_v1_data/
+
+

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