Skip to content

Commit

Permalink
Reddit: Use session cookies.
Browse files Browse the repository at this point in the history
  • Loading branch information
nottalulah committed Sep 20, 2024
1 parent c9998ec commit b88009c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/logical/source/extractor/reddit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ def share_url
parsed_urls.find(&:share_id)
end

def http
super.cookies(reddit_session: Danbooru.config.reddit_session_cookie)
end

def api_url
"https://reddit.com/gallery/#{work_id}" if work_id.present?
end
Expand Down
4 changes: 4 additions & 0 deletions config/danbooru_default_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,10 @@ def bluesky_identifier
def bluesky_password
end

# Your Reddit "reddit_session" cookie.
def reddit_session_cookie
end

# A list of tags that should be removed when a post is replaced. Regexes allowed.
def post_replacement_tag_removals
%w[replaceme .*_sample resized upscaled downscaled md5_mismatch
Expand Down

0 comments on commit b88009c

Please sign in to comment.