Skip to content

[Reddit] How do I actually download comments #8992

@Dojjino858

Description

@Dojjino858

Title explains it all.
I have tried multiple times with various configs, but even when adding the --write-info-json flag and am having zero progress.
I have tried both rest and oath APIs. what's weirder is that if I do a json dump is that I do see the comments, but they aren't in {id}.info.json. How do I extract this content into that file?

{
  "extractor": {
    "reddit": {
      "comments": 100,
      "morecomments": true,
      "directory": ["reddit", "{subreddit}", "[{id}] {title[0:120]!t}"],
      "filename": {
        "extension == 'json'": "{id}.info.json",
        "": "{num:>03}.{filename}.{extension}"
      },
      "user-agent": "Python:gallery-dl:v1.0 (by /u/<my-username>)",
      "embeds": true,
      "recursion": 2,
      "selftext": true,
      "limit": 100,
      "whitelist": ["imgur", "*:image"],
      "api": "oath",
      "parent-metadata": "_reddit",
      "previews": true
    },
  "postprocessor": {
    "metadata": {
      "mode": "jsonl",
      "filename": "{id}.data.json"
    }
  }
}

sample output

> gallery-dl --config-ignore -c .\.config.json --verbose --write-metadata --write-info-json "https://www.reddit.com/r/ArtistLounge/comments/1qp0s75/what_can_i_use_to_make_a_painting_like_this/"

[gallery-dl][debug] Python 3.12.4 - Windows-10-10.0.19045-SP0
[gallery-dl][debug] requests 2.32.3 - urllib3 2.2.2
[gallery-dl][debug] Configuration Files ['.\\.config.json']
[gallery-dl][debug] Starting DownloadJob for 'https://www.reddit.com/r/ArtistLounge/comments/1qp0s75/what_can_i_use_to_make_a_painting_like_this/'
[reddit][debug] Using RedditSubmissionExtractor for 'https://www.reddit.com/r/ArtistLounge/comments/1qp0s75/what_can_i_use_to_make_a_painting_like_this/'
[reddit][debug] Using REST API
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.reddit.com:443
[urllib3.connectionpool][debug] https://www.reddit.com:443 "GET /comments/1qp0s75/.json?limit=100&raw_json=1 HTTP/11" 200 22886
[postprocessor][warning] module '' not found
[reddit][debug] Active postprocessor modules: [MetadataPP]
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): i.redd.it:443
[urllib3.connectionpool][debug] https://i.redd.it:443 "GET /k4n1558jk0gg1.jpeg HTTP/11" 200 353080
.\gallery-dl\reddit\ArtistLounge\[1qp0s75] What can I use to make a painting like this_\000.k4n1558jk0gg1.jpg
[urllib3.connectionpool][debug] https://i.redd.it:443 "GET /g4zti1vxa3gg1.jpeg HTTP/11" 200 840197
.\gallery-dl\reddit\ArtistLounge\[1qp0s75] What can I use to make a painting like this_\001.g4zti1vxa3gg1.jpg
[urllib3.connectionpool][debug] https://i.redd.it:443 "GET /3mpsxby7l5gg1.jpeg HTTP/11" 200 541595

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions