Probably with the official Reddit API? There are several libraries for it.
It took me 36 hours to collect the 4M posts. Reddit API returns results in batches of 100 results, and then sleeps for 2 seconds.
You can find some more details on how it was built here https://blog.valohai.com/machine-learning-pipeline-classifyi...
I can publish on Github the repository that runs two commands to collect the data if your are interested.
I was curious since it seems like it was using the BigQuery dataset, but PRAW works too.