diff --git a/CHANGES.rst b/CHANGES.rst index ac5dae0d53..dd346262c2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -18,6 +18,8 @@ Unreleased - An import error when using PRAW in environments where ``libsqlite3-dev`` is needed to utilize the ``sqlite3`` builtin. +- Fixed bug where some keyword arguments that are passed to :meth:`.Draft.submit` would + not have an effect. 7.4.0 (2021/07/30) ------------------ diff --git a/praw/models/helpers.py b/praw/models/helpers.py index 670b878cc7..4eb5039b62 100644 --- a/praw/models/helpers.py +++ b/praw/models/helpers.py @@ -13,12 +13,19 @@ class DraftHelper(PRAWBase): - """Provide a set of functions to interact with Drafts.""" + r"""Provide a set of functions to interact with :class:`Draft` instances. + + .. note:: + + The methods provided by this class will only work on the currently authenticated + user's :class:`Draft`\ s. + + """ def __call__( self, *, draft_id: Optional[str] = None ) -> Union[List["praw.models.Draft"], "praw.models.Draft"]: - """Return a list of the currently authenticated user's Drafts. + """Return a list of :class:`.Draft` instances. :param draft_id: When provided, return :class:`.Draft` instance (default: ``None``). @@ -36,7 +43,7 @@ def __call__( .. code-block:: python draft_id = "124862bc-e1e9-11eb-aa4f-e68667a77cbb" - draft = reddit.drafts(draft_id) + draft = reddit.drafts(draft_id=draft_id) print(draft) """ @@ -45,9 +52,9 @@ def __call__( return self._draft_list() def _draft_list(self) -> List["praw.models.Draft"]: - """Get a list of Draft objects. + """Get a list of :class:`.Draft` instances. - :returns: A list of instances of :class:`.Draft`. + :returns: A list of :class:`.Draft` instances. """ return self._reddit.get(API_PATH["drafts"], params={"md_body": True}) @@ -70,7 +77,7 @@ def create( url: Optional[str] = None, **draft_kwargs, ): - """Create a new Draft. + """Create a new :class:`.Draft`. :param flair_id: The flair template to select (default: ``None``). :param flair_text: If the template's ``flair_text_editable`` value is ``True``, diff --git a/praw/models/reddit/draft.py b/praw/models/reddit/draft.py index 849b74d5b2..38a72503d2 100644 --- a/praw/models/reddit/draft.py +++ b/praw/models/reddit/draft.py @@ -12,7 +12,7 @@ class Draft(RedditBase): - """A class for submissions to reddit. + """A class that represents a Reddit submission draft. **Typical Attributes** @@ -25,7 +25,8 @@ class Draft(RedditBase): Attribute Description ========================== ====================================================== ``link_flair_template_id`` The link flair's ID. - ``link_flair_text`` The link flair's text content, or None if not flaired. + ``link_flair_text`` The link flair's text content, or ``None`` if not + flaired. ``modified`` Time the submission draft was modified, represented in `Unix Time`_. ``original_content`` Whether the submission draft will be set as original @@ -36,7 +37,7 @@ class Draft(RedditBase): ``subreddit`` Provides an instance of :class:`.Subreddit` or :class:`.UserSubreddit` (if set). ``title`` The title of the submission draft. - ``url`` The URL the submission draft links to. Will b + ``url`` The URL the submission draft links to. ========================== ====================================================== .. _unix time: https://en.wikipedia.org/wiki/Unix_time @@ -239,9 +240,9 @@ def submit( """Submit a draft. :param flair_id: The flair template to select (default: ``None``). - :param flair_text: If the template's ``flair_text_editable`` value is True, this - value will set a custom text (default: ``None``). ``flair_id`` is required - when ``flair_text`` is provided. + :param flair_text: If the template's ``flair_text_editable`` value is ``True``, + this value will set a custom text (default: ``None``). ``flair_id`` is + required when ``flair_text`` is provided. :param nsfw: Whether or not the submission should be marked NSFW (default: ``None``). :param selftext: The Markdown formatted content for a ``text`` submission. Use @@ -249,6 +250,8 @@ def submit( ``None``). :param spoiler: Whether or not the submission should be marked as a spoiler (default: ``None``). + :param subreddit: The subreddit to submit the draft to. This accepts a subreddit + display name, :class:`.Subreddit` object, or :class:`.UserSubreddit` object. :param title: The title of the submission (default: ``None``). :param url: The URL for a ``link`` submission (default: ``None``). @@ -289,17 +292,18 @@ def submit( raise ValueError( "`subreddit` must be set on the Draft or passed as a keyword argument." ) - for key in [ - "flair_id", - "flair_text", - "nsfw", - "selftext", - "spoiler", - "title", - "url", + for key, attribute in [ + ("flair_id", flair_id), + ("flair_text", flair_text), + ("nsfw", nsfw), + ("selftext", selftext), + ("spoiler", spoiler), + ("title", title), + ("url", url), ]: - if getattr(self, key, None) is not None: - submit_kwargs[key] = getattr(self, key) + value = attribute or getattr(self, key, None) + if value is not None: + submit_kwargs[key] = value if isinstance(subreddit, str): _subreddit = self._reddit.subreddit(subreddit) elif isinstance(subreddit, (Subreddit, UserSubreddit)): diff --git a/tests/integration/cassettes/TestDraft.test_submit__different_title.json b/tests/integration/cassettes/TestDraft.test_submit__different_title.json index 43c90215b4..6151387e24 100644 --- a/tests/integration/cassettes/TestDraft.test_submit__different_title.json +++ b/tests/integration/cassettes/TestDraft.test_submit__different_title.json @@ -1,7 +1,7 @@ { "http_interactions": [ { - "recorded_at": "2021-07-30T01:56:09", + "recorded_at": "2021-11-02T00:18:19", "request": { "body": { "encoding": "utf-8", @@ -27,7 +27,7 @@ "application/x-www-form-urlencoded" ], "User-Agent": [ - " PRAW/7.3.1.dev0 prawcore/2.2.0" + " PRAW/7.4.1.dev0 prawcore/2.3.0" ] }, "method": "POST", @@ -52,13 +52,13 @@ "application/json; charset=UTF-8" ], "Date": [ - "Fri, 30 Jul 2021 01:56:09 GMT" + "Tue, 02 Nov 2021 00:18:19 GMT" ], "Server": [ "snooserv" ], "Set-Cookie": [ - "edgebucket=kzEyba2o6SpmcZH9Uk; Domain=reddit.com; Max-Age=63071999; Path=/; secure" + "edgebucket=VG7pkLRioIyOfQ7dNL; Domain=reddit.com; Max-Age=63071999; Path=/; secure" ], "Strict-Transport-Security": [ "max-age=15552000; includeSubDomains; preload" @@ -82,13 +82,13 @@ "SAMEORIGIN" ], "x-ratelimit-remaining": [ - "294" + "297" ], "x-ratelimit-reset": [ - "231" + "101" ], "x-ratelimit-used": [ - "6" + "3" ], "x-xss-protection": [ "1; mode=block" @@ -102,7 +102,7 @@ } }, { - "recorded_at": "2021-07-30T01:56:10", + "recorded_at": "2021-11-02T00:18:19", "request": { "body": { "encoding": "utf-8", @@ -122,10 +122,10 @@ "keep-alive" ], "Cookie": [ - "edgebucket=kzEyba2o6SpmcZH9Uk" + "edgebucket=VG7pkLRioIyOfQ7dNL" ], "User-Agent": [ - " PRAW/7.3.1.dev0 prawcore/2.2.0" + " PRAW/7.4.1.dev0 prawcore/2.3.0" ] }, "method": "GET", @@ -134,7 +134,7 @@ "response": { "body": { "encoding": "UTF-8", - "string": "{\"subreddits\": [{\"user_flair_background_color\": null, \"submit_text_html\": null, \"restrict_posting\": true, \"user_is_banned\": false, \"free_form_reports\": true, \"wiki_enabled\": true, \"user_is_muted\": false, \"user_can_flair_in_sr\": null, \"display_name\": \"Joekp\", \"header_img\": null, \"title\": \"Joekp\", \"allow_galleries\": true, \"icon_size\": null, \"primary_color\": \"\", \"active_user_count\": null, \"icon_img\": \"\", \"display_name_prefixed\": \"r/Joekp\", \"accounts_active\": null, \"public_traffic\": false, \"subscribers\": 4, \"user_flair_richtext\": [], \"videostream_links_count\": 0, \"name\": \"t5_zgfca\", \"quarantine\": false, \"hide_ads\": false, \"prediction_leaderboard_entry_type\": \"IN_FEED\", \"emojis_enabled\": false, \"advertiser_category\": \"\", \"public_description\": \"\", \"comment_score_hide_mins\": 0, \"allow_predictions\": false, \"user_has_favorited\": false, \"user_flair_template_id\": null, \"community_icon\": \"\", \"banner_background_image\": \"\", \"original_content_tag_enabled\": false, \"community_reviewed\": false, \"submit_text\": \"\", \"description_html\": null, \"spoilers_enabled\": true, \"header_title\": \"\", \"header_size\": null, \"user_flair_position\": \"right\", \"all_original_content\": false, \"collections_enabled\": true, \"is_enrolled_in_new_modmail\": true, \"key_color\": \"\", \"event_posts_enabled\": true, \"can_assign_user_flair\": false, \"created\": 1554775563.0, \"wls\": null, \"show_media_preview\": true, \"submission_type\": \"any\", \"user_is_subscriber\": true, \"disable_contributor_requests\": false, \"allow_videogifs\": true, \"user_flair_type\": \"text\", \"allow_polls\": true, \"collapse_deleted_comments\": false, \"coins\": 0, \"emojis_custom_size\": null, \"public_description_html\": null, \"allow_videos\": true, \"is_crosspostable_subreddit\": true, \"notification_level\": \"low\", \"can_assign_link_flair\": false, \"has_menu_widget\": false, \"accounts_active_is_fuzzed\": false, \"submit_text_label\": \"\", \"link_flair_position\": \"\", \"user_sr_flair_enabled\": null, \"user_flair_enabled_in_sr\": false, \"allow_discovery\": true, \"user_sr_theme_enabled\": true, \"link_flair_enabled\": false, \"subreddit_type\": \"public\", \"suggested_comment_sort\": null, \"banner_img\": \"\", \"user_flair_text\": null, \"banner_background_color\": \"\", \"show_media\": true, \"id\": \"zgfca\", \"user_is_moderator\": true, \"over18\": false, \"description\": \"\", \"submit_link_label\": \"\", \"user_flair_text_color\": null, \"restrict_commenting\": false, \"user_flair_css_class\": null, \"allow_images\": true, \"lang\": \"en\", \"whitelist_status\": null, \"url\": \"/r/Joekp/\", \"created_utc\": 1554775563.0, \"banner_size\": null, \"mobile_banner_image\": \"\", \"user_is_contributor\": false, \"allow_predictions_tournament\": false}], \"drafts\": [{\"body\": \"https://reddit.com\", \"subreddit\": \"t5_zgfca\", \"content_category\": null, \"nsfw\": false, \"id\": \"e33ac5d8-f0d8-11eb-a777-9e90ac1a79eb\", \"spoiler\": false, \"kind\": \"link\", \"title\": \"test\", \"original_content\": false, \"modified\": 1627609988081, \"send_replies\": true, \"created\": 1627609988081, \"is_public_link\": false, \"flair\": null}, {\"body\": \"text\", \"subreddit\": \"t5_zgfca\", \"content_category\": null, \"nsfw\": false, \"id\": \"b18b58c2-f0d3-11eb-bacf-e6c32a1c4986\", \"spoiler\": false, \"kind\": \"markdown\", \"title\": \"test2\", \"original_content\": false, \"modified\": 1627609968142, \"send_replies\": true, \"created\": 1627607757239, \"is_public_link\": false, \"flair\": null}]}" + "string": "{\"subreddits\": [{\"user_flair_background_color\": null, \"submit_text_html\": null, \"restrict_posting\": true, \"user_flair_enabled_in_sr\": false, \"user_is_banned\": false, \"free_form_reports\": true, \"wiki_enabled\": true, \"user_is_muted\": false, \"user_can_flair_in_sr\": null, \"display_name\": \"u_\", \"header_img\": null, \"title\": \"\", \"allow_galleries\": true, \"icon_size\": [256, 256], \"primary_color\": \"\", \"active_user_count\": null, \"icon_img\": \"https://styles.redditmedia.com/t5_1kfmld/styles/profileIcon_gxwaby5z0v771.jpg?width=256\\u0026height=256\\u0026crop=256:256,smart\\u0026s=ca063783c2180703273278910f7fceef1e50a63f\", \"display_name_prefixed\": \"u/\", \"accounts_active\": null, \"public_traffic\": false, \"subscribers\": 51, \"user_flair_richtext\": [], \"videostream_links_count\": 0, \"name\": \"t5_1kfmld\", \"quarantine\": false, \"hide_ads\": false, \"prediction_leaderboard_entry_type\": \"IN_FEED\", \"emojis_enabled\": false, \"advertiser_category\": \"\", \"public_description\": \"\", \"comment_score_hide_mins\": 0, \"allow_predictions\": false, \"user_has_favorited\": false, \"user_flair_template_id\": null, \"community_icon\": \"\", \"banner_background_image\": \"\", \"original_content_tag_enabled\": false, \"community_reviewed\": false, \"submit_text\": \"\", \"description_html\": null, \"spoilers_enabled\": true, \"header_title\": \"\", \"header_size\": null, \"user_flair_position\": \"right\", \"is_default_icon\": [false], \"all_original_content\": false, \"collections_enabled\": true, \"is_enrolled_in_new_modmail\": true, \"key_color\": \"\", \"event_posts_enabled\": true, \"can_assign_user_flair\": false, \"created\": 1562529507.0, \"wls\": null, \"show_media_preview\": true, \"submission_type\": \"any\", \"user_is_subscriber\": false, \"disable_contributor_requests\": false, \"allow_videogifs\": true, \"should_archive_posts\": false, \"user_flair_type\": \"text\", \"allow_polls\": true, \"collapse_deleted_comments\": true, \"coins\": 0, \"emojis_custom_size\": null, \"public_description_html\": null, \"allow_videos\": true, \"is_crosspostable_subreddit\": true, \"notification_level\": null, \"can_assign_link_flair\": false, \"has_menu_widget\": false, \"accounts_active_is_fuzzed\": false, \"allow_prediction_contributors\": false, \"submit_text_label\": \"\", \"link_flair_position\": \"\", \"user_sr_flair_enabled\": null, \"is_default_banner\": true, \"allow_discovery\": true, \"accept_followers\": true, \"user_sr_theme_enabled\": true, \"link_flair_enabled\": false, \"subreddit_type\": \"user\", \"suggested_comment_sort\": \"qa\", \"banner_img\": \"\", \"user_flair_text\": null, \"banner_background_color\": \"\", \"show_media\": true, \"id\": \"1kfmld\", \"user_is_moderator\": true, \"over18\": false, \"description\": \"\", \"submit_link_label\": \"\", \"user_flair_text_color\": null, \"restrict_commenting\": false, \"user_flair_css_class\": null, \"allow_images\": true, \"lang\": \"en\", \"whitelist_status\": null, \"url\": \"/user//\", \"created_utc\": 1562529507.0, \"banner_size\": null, \"mobile_banner_image\": \"\", \"user_is_contributor\": false, \"allow_predictions_tournament\": false}], \"drafts\": [{\"body\": \"\", \"subreddit\": \"t5_1kfmld\", \"content_category\": null, \"nsfw\": false, \"id\": \"582b870e-3b72-11ec-b79b-4e8a1c42f3ae\", \"spoiler\": false, \"kind\": \"markdown\", \"title\": \"test title\", \"original_content\": false, \"modified\": 1635812284453, \"send_replies\": true, \"created\": 1635812283320, \"is_public_link\": true, \"flair\": null}]}" }, "headers": { "Accept-Ranges": [ @@ -144,20 +144,21 @@ "keep-alive" ], "Content-Length": [ - "3317" + "3310" ], "Content-Type": [ "application/json; charset=UTF-8" ], "Date": [ - "Fri, 30 Jul 2021 01:56:10 GMT" + "Tue, 02 Nov 2021 00:18:20 GMT" ], "Server": [ "snooserv" ], "Set-Cookie": [ - "session_tracker=mjadknmarrqclkrafc.0.1627610170017.Z0FBQUFBQmhBMXc2UDZHSlgxc3p4Nm9yNmk5aGN2MFBjZ1hELU4xMUhlNm42cjQ2SWdLa2xmNEZLYkxhd3NwSUh6WjYyOHBMZ1VCN1RTekJRa05CWnQ2dmlab0ZrS0dLUVBsVW5LZ3dZc0I5QmxuNTN5SUs1aXdpbkF3NjVsbmlHaEtNcU1sQTZLVG4; Domain=reddit.com; Max-Age=7199; Path=/; expires=Fri, 30-Jul-2021 03:56:10 GMT; secure; SameSite=None; Secure", - "redesign_optout=true; Domain=reddit.com; Max-Age=94607999; Path=/; expires=Mon, 29-Jul-2024 01:56:10 GMT; secure", + "loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmhnSVBNZmx2NXQyLXBGZHdza1FPeUZhclVaMG5yZTNxdjVqcDRGU1VtUEJOTVFySFZNTzhlOV9BdlpEeVhXVUNEMmNOalZhU2dJTjlRYVlySF9rTWZrZWc2a3N5d0dnQTdPZlFCdVQ3Y1R6MGRYeHFweEhySDV1VnhaNl9oc04tenN5dGs; Domain=reddit.com; Max-Age=63071999; Path=/; expires=Thu, 02-Nov-2023 00:18:20 GMT; secure; SameSite=None; Secure", + "session_tracker=odarbncddkhbphmnjp.0.1635812299945.Z0FBQUFBQmhnSVBNbUttZmJzdEZkTk1zX2VHcTJwRjhkVkZSd1k5bDFIT3A3QkpXVUZCNHpWdmlwSklmbWgydXZ6STA3MEdzSm5pcXY4ME1FM2djNlBhN1p0UFphYm9lZEtUN08yYXdUeGdRUTdheTJURFJHNXgwQ0M3Z1doeF95dDVEanhJZUhqZ04; Domain=reddit.com; Max-Age=7199; Path=/; expires=Tue, 02-Nov-2021 02:18:20 GMT; secure; SameSite=None; Secure", + "redesign_optout=true; Domain=reddit.com; Max-Age=94607999; Path=/; expires=Fri, 01-Nov-2024 00:18:19 GMT; secure", "csv=1; Max-Age=63072000; Domain=.reddit.com; Path=/; Secure; SameSite=None" ], "Strict-Transport-Security": [ @@ -188,13 +189,13 @@ "SAMEORIGIN" ], "x-ratelimit-remaining": [ - "253.0" + "118.0" ], "x-ratelimit-reset": [ - "230" + "101" ], "x-ratelimit-used": [ - "347" + "482" ], "x-ua-compatible": [ "IE=edge" @@ -211,7 +212,7 @@ } }, { - "recorded_at": "2021-07-30T01:56:10", + "recorded_at": "2021-11-02T00:18:20", "request": { "body": { "encoding": "utf-8", @@ -231,10 +232,10 @@ "keep-alive" ], "Cookie": [ - "csv=1; edgebucket=kzEyba2o6SpmcZH9Uk; redesign_optout=true; session_tracker=mjadknmarrqclkrafc.0.1627610170017.Z0FBQUFBQmhBMXc2UDZHSlgxc3p4Nm9yNmk5aGN2MFBjZ1hELU4xMUhlNm42cjQ2SWdLa2xmNEZLYkxhd3NwSUh6WjYyOHBMZ1VCN1RTekJRa05CWnQ2dmlab0ZrS0dLUVBsVW5LZ3dZc0I5QmxuNTN5SUs1aXdpbkF3NjVsbmlHaEtNcU1sQTZLVG4" + "csv=1; edgebucket=VG7pkLRioIyOfQ7dNL; loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmhnSVBNZmx2NXQyLXBGZHdza1FPeUZhclVaMG5yZTNxdjVqcDRGU1VtUEJOTVFySFZNTzhlOV9BdlpEeVhXVUNEMmNOalZhU2dJTjlRYVlySF9rTWZrZWc2a3N5d0dnQTdPZlFCdVQ3Y1R6MGRYeHFweEhySDV1VnhaNl9oc04tenN5dGs; redesign_optout=true; session_tracker=odarbncddkhbphmnjp.0.1635812299945.Z0FBQUFBQmhnSVBNbUttZmJzdEZkTk1zX2VHcTJwRjhkVkZSd1k5bDFIT3A3QkpXVUZCNHpWdmlwSklmbWgydXZ6STA3MEdzSm5pcXY4ME1FM2djNlBhN1p0UFphYm9lZEtUN08yYXdUeGdRUTdheTJURFJHNXgwQ0M3Z1doeF95dDVEanhJZUhqZ04" ], "User-Agent": [ - " PRAW/7.3.1.dev0 prawcore/2.2.0" + " PRAW/7.4.1.dev0 prawcore/2.3.0" ] }, "method": "GET", @@ -243,7 +244,7 @@ "response": { "body": { "encoding": "UTF-8", - "string": "{\"subreddits\": [{\"user_flair_background_color\": null, \"submit_text_html\": null, \"restrict_posting\": true, \"user_is_banned\": false, \"free_form_reports\": true, \"wiki_enabled\": true, \"user_is_muted\": false, \"user_can_flair_in_sr\": null, \"display_name\": \"Joekp\", \"header_img\": null, \"title\": \"Joekp\", \"allow_galleries\": true, \"icon_size\": null, \"primary_color\": \"\", \"active_user_count\": null, \"icon_img\": \"\", \"display_name_prefixed\": \"r/Joekp\", \"accounts_active\": null, \"public_traffic\": false, \"subscribers\": 4, \"user_flair_richtext\": [], \"videostream_links_count\": 0, \"name\": \"t5_zgfca\", \"quarantine\": false, \"hide_ads\": false, \"prediction_leaderboard_entry_type\": \"IN_FEED\", \"emojis_enabled\": false, \"advertiser_category\": \"\", \"public_description\": \"\", \"comment_score_hide_mins\": 0, \"allow_predictions\": false, \"user_has_favorited\": false, \"user_flair_template_id\": null, \"community_icon\": \"\", \"banner_background_image\": \"\", \"original_content_tag_enabled\": false, \"community_reviewed\": false, \"submit_text\": \"\", \"description_html\": null, \"spoilers_enabled\": true, \"header_title\": \"\", \"header_size\": null, \"user_flair_position\": \"right\", \"all_original_content\": false, \"collections_enabled\": true, \"is_enrolled_in_new_modmail\": true, \"key_color\": \"\", \"event_posts_enabled\": true, \"can_assign_user_flair\": false, \"created\": 1554775563.0, \"wls\": null, \"show_media_preview\": true, \"submission_type\": \"any\", \"user_is_subscriber\": true, \"disable_contributor_requests\": false, \"allow_videogifs\": true, \"user_flair_type\": \"text\", \"allow_polls\": true, \"collapse_deleted_comments\": false, \"coins\": 0, \"emojis_custom_size\": null, \"public_description_html\": null, \"allow_videos\": true, \"is_crosspostable_subreddit\": true, \"notification_level\": \"low\", \"can_assign_link_flair\": false, \"has_menu_widget\": false, \"accounts_active_is_fuzzed\": false, \"submit_text_label\": \"\", \"link_flair_position\": \"\", \"user_sr_flair_enabled\": null, \"user_flair_enabled_in_sr\": false, \"allow_discovery\": true, \"user_sr_theme_enabled\": true, \"link_flair_enabled\": false, \"subreddit_type\": \"public\", \"suggested_comment_sort\": null, \"banner_img\": \"\", \"user_flair_text\": null, \"banner_background_color\": \"\", \"show_media\": true, \"id\": \"zgfca\", \"user_is_moderator\": true, \"over18\": false, \"description\": \"\", \"submit_link_label\": \"\", \"user_flair_text_color\": null, \"restrict_commenting\": false, \"user_flair_css_class\": null, \"allow_images\": true, \"lang\": \"en\", \"whitelist_status\": null, \"url\": \"/r/Joekp/\", \"created_utc\": 1554775563.0, \"banner_size\": null, \"mobile_banner_image\": \"\", \"user_is_contributor\": false, \"allow_predictions_tournament\": false}], \"drafts\": [{\"body\": \"https://reddit.com\", \"subreddit\": \"t5_zgfca\", \"content_category\": null, \"nsfw\": false, \"id\": \"e33ac5d8-f0d8-11eb-a777-9e90ac1a79eb\", \"spoiler\": false, \"kind\": \"link\", \"title\": \"test\", \"original_content\": false, \"modified\": 1627609988081, \"send_replies\": true, \"created\": 1627609988081, \"is_public_link\": false, \"flair\": null}, {\"body\": \"text\", \"subreddit\": \"t5_zgfca\", \"content_category\": null, \"nsfw\": false, \"id\": \"b18b58c2-f0d3-11eb-bacf-e6c32a1c4986\", \"spoiler\": false, \"kind\": \"markdown\", \"title\": \"test2\", \"original_content\": false, \"modified\": 1627609968142, \"send_replies\": true, \"created\": 1627607757239, \"is_public_link\": false, \"flair\": null}]}" + "string": "{\"subreddits\": [{\"user_flair_background_color\": null, \"submit_text_html\": null, \"restrict_posting\": true, \"user_flair_enabled_in_sr\": false, \"user_is_banned\": false, \"free_form_reports\": true, \"wiki_enabled\": true, \"user_is_muted\": false, \"user_can_flair_in_sr\": null, \"display_name\": \"u_\", \"header_img\": null, \"title\": \"\", \"allow_galleries\": true, \"icon_size\": [256, 256], \"primary_color\": \"\", \"active_user_count\": null, \"icon_img\": \"https://styles.redditmedia.com/t5_1kfmld/styles/profileIcon_gxwaby5z0v771.jpg?width=256\\u0026height=256\\u0026crop=256:256,smart\\u0026s=ca063783c2180703273278910f7fceef1e50a63f\", \"display_name_prefixed\": \"u/\", \"accounts_active\": null, \"public_traffic\": false, \"subscribers\": 51, \"user_flair_richtext\": [], \"videostream_links_count\": 0, \"name\": \"t5_1kfmld\", \"quarantine\": false, \"hide_ads\": false, \"prediction_leaderboard_entry_type\": \"IN_FEED\", \"emojis_enabled\": false, \"advertiser_category\": \"\", \"public_description\": \"\", \"comment_score_hide_mins\": 0, \"allow_predictions\": false, \"user_has_favorited\": false, \"user_flair_template_id\": null, \"community_icon\": \"\", \"banner_background_image\": \"\", \"original_content_tag_enabled\": false, \"community_reviewed\": false, \"submit_text\": \"\", \"description_html\": null, \"spoilers_enabled\": true, \"header_title\": \"\", \"header_size\": null, \"user_flair_position\": \"right\", \"is_default_icon\": [false], \"all_original_content\": false, \"collections_enabled\": true, \"is_enrolled_in_new_modmail\": true, \"key_color\": \"\", \"event_posts_enabled\": true, \"can_assign_user_flair\": false, \"created\": 1562529507.0, \"wls\": null, \"show_media_preview\": true, \"submission_type\": \"any\", \"user_is_subscriber\": false, \"disable_contributor_requests\": false, \"allow_videogifs\": true, \"should_archive_posts\": false, \"user_flair_type\": \"text\", \"allow_polls\": true, \"collapse_deleted_comments\": true, \"coins\": 0, \"emojis_custom_size\": null, \"public_description_html\": null, \"allow_videos\": true, \"is_crosspostable_subreddit\": true, \"notification_level\": null, \"can_assign_link_flair\": false, \"has_menu_widget\": false, \"accounts_active_is_fuzzed\": false, \"allow_prediction_contributors\": false, \"submit_text_label\": \"\", \"link_flair_position\": \"\", \"user_sr_flair_enabled\": null, \"is_default_banner\": true, \"allow_discovery\": true, \"accept_followers\": true, \"user_sr_theme_enabled\": true, \"link_flair_enabled\": false, \"subreddit_type\": \"user\", \"suggested_comment_sort\": \"qa\", \"banner_img\": \"\", \"user_flair_text\": null, \"banner_background_color\": \"\", \"show_media\": true, \"id\": \"1kfmld\", \"user_is_moderator\": true, \"over18\": false, \"description\": \"\", \"submit_link_label\": \"\", \"user_flair_text_color\": null, \"restrict_commenting\": false, \"user_flair_css_class\": null, \"allow_images\": true, \"lang\": \"en\", \"whitelist_status\": null, \"url\": \"/user//\", \"created_utc\": 1562529507.0, \"banner_size\": null, \"mobile_banner_image\": \"\", \"user_is_contributor\": false, \"allow_predictions_tournament\": false}], \"drafts\": [{\"body\": \"\", \"subreddit\": \"t5_1kfmld\", \"content_category\": null, \"nsfw\": false, \"id\": \"582b870e-3b72-11ec-b79b-4e8a1c42f3ae\", \"spoiler\": false, \"kind\": \"markdown\", \"title\": \"test title\", \"original_content\": false, \"modified\": 1635812284453, \"send_replies\": true, \"created\": 1635812283320, \"is_public_link\": true, \"flair\": null}]}" }, "headers": { "Accept-Ranges": [ @@ -253,19 +254,19 @@ "keep-alive" ], "Content-Length": [ - "3317" + "3310" ], "Content-Type": [ "application/json; charset=UTF-8" ], "Date": [ - "Fri, 30 Jul 2021 01:56:10 GMT" + "Tue, 02 Nov 2021 00:18:20 GMT" ], "Server": [ "snooserv" ], "Set-Cookie": [ - "session_tracker=mjadknmarrqclkrafc.0.1627610170434.Z0FBQUFBQmhBMXc2cTQ3aVUzVDdpVWV2eEs1WjNXNzVEWWlVamduNWcyU2p2VGMzd1llVmd0NXJqQXVxbjRpck9MSjJsRzR5eTNZQVNlZFpyQjdURFRGRzV6TGkyY19vQ2xYaW5IelRQRHQ1OEstbGxYaW5qeWVuTFM5cGpBMkxNcllFMEdTdUJFd0E; Domain=reddit.com; Max-Age=7199; Path=/; expires=Fri, 30-Jul-2021 03:56:10 GMT; secure; SameSite=None; Secure" + "session_tracker=odarbncddkhbphmnjp.0.1635812300132.Z0FBQUFBQmhnSVBNUVk4QVBZaGVfSERVaVluTXhGeE9mSW81VnNYbUR1Z3pfRk16M1oyOGs2ZVJEbWtWYWF4Q3hScTJtaW5JdkhBeUpVcUNNZnZmSXVyQzlzTW15dVk3enFLZlhkUXRxc2l5UWxYdmkxMGNVUEJmVVVOZ3l3bU90XzlPX3p4V3BSUGs; Domain=reddit.com; Max-Age=7199; Path=/; expires=Tue, 02-Nov-2021 02:18:20 GMT; secure; SameSite=None; Secure" ], "Strict-Transport-Security": [ "max-age=15552000; includeSubDomains; preload" @@ -295,13 +296,13 @@ "SAMEORIGIN" ], "x-ratelimit-remaining": [ - "251.0" + "117.0" ], "x-ratelimit-reset": [ - "230" + "100" ], "x-ratelimit-used": [ - "349" + "483" ], "x-ua-compatible": [ "IE=edge" @@ -318,11 +319,11 @@ } }, { - "recorded_at": "2021-07-30T01:56:10", + "recorded_at": "2021-11-02T00:18:20", "request": { "body": { "encoding": "utf-8", - "string": "api_type=json&draft_id=b18b58c2-f0d3-11eb-bacf-e6c32a1c4986&kind=self&nsfw=False&resubmit=True&sendreplies=True&spoiler=False&sr=Joekp&text=text&title=test2&validate_on_submit=False" + "string": "api_type=json&draft_id=582b870e-3b72-11ec-b79b-4e8a1c42f3ae&kind=self&nsfw=False&resubmit=True&sendreplies=True&spoiler=False&sr=u_&text=&title=new+title&validate_on_submit=False" }, "headers": { "Accept": [ @@ -338,16 +339,16 @@ "keep-alive" ], "Content-Length": [ - "188" + "191" ], "Content-Type": [ "application/x-www-form-urlencoded" ], "Cookie": [ - "csv=1; edgebucket=kzEyba2o6SpmcZH9Uk; redesign_optout=true; session_tracker=mjadknmarrqclkrafc.0.1627610170434.Z0FBQUFBQmhBMXc2cTQ3aVUzVDdpVWV2eEs1WjNXNzVEWWlVamduNWcyU2p2VGMzd1llVmd0NXJqQXVxbjRpck9MSjJsRzR5eTNZQVNlZFpyQjdURFRGRzV6TGkyY19vQ2xYaW5IelRQRHQ1OEstbGxYaW5qeWVuTFM5cGpBMkxNcllFMEdTdUJFd0E" + "csv=1; edgebucket=VG7pkLRioIyOfQ7dNL; loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmhnSVBNZmx2NXQyLXBGZHdza1FPeUZhclVaMG5yZTNxdjVqcDRGU1VtUEJOTVFySFZNTzhlOV9BdlpEeVhXVUNEMmNOalZhU2dJTjlRYVlySF9rTWZrZWc2a3N5d0dnQTdPZlFCdVQ3Y1R6MGRYeHFweEhySDV1VnhaNl9oc04tenN5dGs; redesign_optout=true; session_tracker=odarbncddkhbphmnjp.0.1635812300132.Z0FBQUFBQmhnSVBNUVk4QVBZaGVfSERVaVluTXhGeE9mSW81VnNYbUR1Z3pfRk16M1oyOGs2ZVJEbWtWYWF4Q3hScTJtaW5JdkhBeUpVcUNNZnZmSXVyQzlzTW15dVk3enFLZlhkUXRxc2l5UWxYdmkxMGNVUEJmVVVOZ3l3bU90XzlPX3p4V3BSUGs" ], "User-Agent": [ - " PRAW/7.3.1.dev0 prawcore/2.2.0" + " PRAW/7.4.1.dev0 prawcore/2.3.0" ] }, "method": "POST", @@ -356,7 +357,7 @@ "response": { "body": { "encoding": "UTF-8", - "string": "{\"json\": {\"errors\": [], \"data\": {\"url\": \"https://www.reddit.com/r/Joekp/comments/oubc1u/test2/\", \"drafts_count\": 1, \"id\": \"oubc1u\", \"name\": \"t3_oubc1u\"}}}" + "string": "{\"json\": {\"errors\": [], \"data\": {\"url\": \"https://www.reddit.com/r/u_/comments/qkrslh/new_title/\", \"drafts_count\": 0, \"id\": \"qkrslh\", \"name\": \"t3_qkrslh\"}}}" }, "headers": { "Accept-Ranges": [ @@ -366,13 +367,13 @@ "keep-alive" ], "Content-Length": [ - "161" + "168" ], "Content-Type": [ "application/json; charset=UTF-8" ], "Date": [ - "Fri, 30 Jul 2021 01:56:10 GMT" + "Tue, 02 Nov 2021 00:18:20 GMT" ], "Server": [ "snooserv" @@ -396,7 +397,7 @@ "-1" ], "set-cookie": [ - "session_tracker=mjadknmarrqclkrafc.0.1627610170592.Z0FBQUFBQmhBMXc2QlpYUDlGNlhPVUc2aTlEck5vSWFhbWJwSFd4NTlZcEU4NW5lRF9XR2JWbkxfaWtfNWdkTmYyVnU0T2hhNjZXOW5vM3dIVmhZUlpELU16eVlNaDVXRTY3UnZaZXdfNC1VOGxyemhuOEt4NjlKRHNfcVI5Q0xJNHhlRzZvYmkybjE; Domain=reddit.com; Max-Age=7199; Path=/; expires=Fri, 30-Jul-2021 03:56:10 GMT; secure" + "session_tracker=odarbncddkhbphmnjp.0.1635812300289.Z0FBQUFBQmhnSVBNM3lUUjh5N0xvTHhyRU1la1MwekltdkZoWFFCeVh2MkpubjdtTEVsM3FNYXM2bWVWR1labWlKSEloMFpNbm5QMDhCOV96V1NuZUxOSVVITXJlVmNhOHZmQlpRMU04V0h5aE9tQlNKZTNVS0RhNXdkdnluaUtMNlBwSlctSWhHZEE; Domain=reddit.com; Max-Age=7199; Path=/; expires=Tue, 02-Nov-2021 02:18:20 GMT; secure" ], "x-content-type-options": [ "nosniff" @@ -405,13 +406,13 @@ "SAMEORIGIN" ], "x-ratelimit-remaining": [ - "250.0" + "115.0" ], "x-ratelimit-reset": [ - "230" + "100" ], "x-ratelimit-used": [ - "350" + "485" ], "x-ua-compatible": [ "IE=edge" @@ -428,7 +429,7 @@ } }, { - "recorded_at": "2021-07-30T01:56:10", + "recorded_at": "2021-11-02T00:18:20", "request": { "body": { "encoding": "utf-8", @@ -448,19 +449,19 @@ "keep-alive" ], "Cookie": [ - "csv=1; edgebucket=kzEyba2o6SpmcZH9Uk; redesign_optout=true; session_tracker=mjadknmarrqclkrafc.0.1627610170592.Z0FBQUFBQmhBMXc2QlpYUDlGNlhPVUc2aTlEck5vSWFhbWJwSFd4NTlZcEU4NW5lRF9XR2JWbkxfaWtfNWdkTmYyVnU0T2hhNjZXOW5vM3dIVmhZUlpELU16eVlNaDVXRTY3UnZaZXdfNC1VOGxyemhuOEt4NjlKRHNfcVI5Q0xJNHhlRzZvYmkybjE" + "csv=1; edgebucket=VG7pkLRioIyOfQ7dNL; loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmhnSVBNZmx2NXQyLXBGZHdza1FPeUZhclVaMG5yZTNxdjVqcDRGU1VtUEJOTVFySFZNTzhlOV9BdlpEeVhXVUNEMmNOalZhU2dJTjlRYVlySF9rTWZrZWc2a3N5d0dnQTdPZlFCdVQ3Y1R6MGRYeHFweEhySDV1VnhaNl9oc04tenN5dGs; redesign_optout=true; session_tracker=odarbncddkhbphmnjp.0.1635812300289.Z0FBQUFBQmhnSVBNM3lUUjh5N0xvTHhyRU1la1MwekltdkZoWFFCeVh2MkpubjdtTEVsM3FNYXM2bWVWR1labWlKSEloMFpNbm5QMDhCOV96V1NuZUxOSVVITXJlVmNhOHZmQlpRMU04V0h5aE9tQlNKZTNVS0RhNXdkdnluaUtMNlBwSlctSWhHZEE" ], "User-Agent": [ - " PRAW/7.3.1.dev0 prawcore/2.2.0" + " PRAW/7.4.1.dev0 prawcore/2.3.0" ] }, "method": "GET", - "uri": "https://oauth.reddit.com/comments/oubc1u/?limit=2048&sort=confidence&raw_json=1" + "uri": "https://oauth.reddit.com/comments/qkrslh/?limit=2048&sort=confidence&raw_json=1" }, "response": { "body": { "encoding": "UTF-8", - "string": "[{\"kind\": \"Listing\", \"data\": {\"after\": null, \"dist\": 1, \"modhash\": null, \"geo_filter\": \"\", \"children\": [{\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"Joekp\", \"selftext\": \"text\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"test2\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/Joekp\", \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_oubc1u\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.Joekp\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_o77bz\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"public\", \"created\": 1627610170.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": \"\\u003C!-- SC_OFF --\\u003E\\u003Cdiv class=\\\"md\\\"\\u003E\\u003Cp\\u003Etext\\u003C/p\\u003E\\n\\u003C/div\\u003E\\u003C!-- SC_ON --\\u003E\", \"likes\": true, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": false, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": false, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"rte_mode\": \"markdown\", \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_zgfca\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"oubc1u\", \"is_robot_indexable\": true, \"num_duplicates\": 0, \"report_reasons\": [], \"author\": \"\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r/Joekp/comments/oubc1u/test2/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r/Joekp/comments/oubc1u/test2/\", \"subreddit_subscribers\": 4, \"created_utc\": 1627610170.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}], \"before\": null}}, {\"kind\": \"Listing\", \"data\": {\"after\": null, \"dist\": null, \"modhash\": null, \"geo_filter\": \"\", \"children\": [], \"before\": null}}]" + "string": "[{\"kind\": \"Listing\", \"data\": {\"after\": null, \"dist\": 1, \"modhash\": null, \"geo_filter\": \"\", \"children\": [{\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"u_\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"new title\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"u/\", \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_qkrslh\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_o77bz\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"user\", \"created\": 1635812300.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": true, \"suggested_sort\": \"qa\", \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": false, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": false, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"rte_mode\": \"markdown\", \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_1kfmld\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"qkrslh\", \"is_robot_indexable\": true, \"num_duplicates\": 0, \"report_reasons\": [], \"author\": \"\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r/u_/comments/qkrslh/new_title/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r/u_/comments/qkrslh/new_title/\", \"subreddit_subscribers\": 51, \"created_utc\": 1635812300.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}], \"before\": null}}, {\"kind\": \"Listing\", \"data\": {\"after\": null, \"dist\": null, \"modhash\": null, \"geo_filter\": \"\", \"children\": [], \"before\": null}}]" }, "headers": { "Accept-Ranges": [ @@ -470,19 +471,19 @@ "keep-alive" ], "Content-Length": [ - "3063" + "2958" ], "Content-Type": [ "application/json; charset=UTF-8" ], "Date": [ - "Fri, 30 Jul 2021 01:56:11 GMT" + "Tue, 02 Nov 2021 00:18:21 GMT" ], "Server": [ "snooserv" ], "Set-Cookie": [ - "session_tracker=mjadknmarrqclkrafc.0.1627610170941.Z0FBQUFBQmhBMXc3UFpUUXRSdjRIbzFBV28tdC1Qbnd4UXB1VHVqX1pqMk4wZEMyN1FaNGQwX1p2bUowUXYtTl9xNW5veWtyR2xfaVFsc1VWNjYya1VlRkZJV19iRGFzamhFNXZVeFUtTUpJdnhtQXBYblMtMldvOTQyYkJGLVk2a19NVUFPS2JuMzQ; Domain=reddit.com; Max-Age=7199; Path=/; expires=Fri, 30-Jul-2021 03:56:11 GMT; secure; SameSite=None; Secure" + "session_tracker=odarbncddkhbphmnjp.0.1635812300966.Z0FBQUFBQmhnSVBOOUFBaVltaWFLem51TjdDcFg3cHV5OHJ0U3dyRW85Tjdlb0hDbTY5TWdkM000b042dTlmbEFPUFVNZy1hS2ptbnhmc29TaHJ5ckhURVZwQXJkTllRVXl4NmFsb1JFVWhVOGg4QTI0MEpYdWt1dFlxZlJUb1hyVDIydGZjNTVqZWs; Domain=reddit.com; Max-Age=7199; Path=/; expires=Tue, 02-Nov-2021 02:18:21 GMT; secure; SameSite=None; Secure" ], "Strict-Transport-Security": [ "max-age=15552000; includeSubDomains; preload" @@ -512,13 +513,13 @@ "SAMEORIGIN" ], "x-ratelimit-remaining": [ - "249.0" + "114.0" ], "x-ratelimit-reset": [ - "230" + "100" ], "x-ratelimit-used": [ - "351" + "486" ], "x-ua-compatible": [ "IE=edge" @@ -531,11 +532,11 @@ "code": 200, "message": "OK" }, - "url": "https://oauth.reddit.com/comments/oubc1u/?limit=2048&sort=confidence&raw_json=1" + "url": "https://oauth.reddit.com/comments/qkrslh/?limit=2048&sort=confidence&raw_json=1" } }, { - "recorded_at": "2021-07-30T01:56:11", + "recorded_at": "2021-11-02T00:18:21", "request": { "body": { "encoding": "utf-8", @@ -555,10 +556,10 @@ "keep-alive" ], "Cookie": [ - "csv=1; edgebucket=kzEyba2o6SpmcZH9Uk; redesign_optout=true; session_tracker=mjadknmarrqclkrafc.0.1627610170941.Z0FBQUFBQmhBMXc3UFpUUXRSdjRIbzFBV28tdC1Qbnd4UXB1VHVqX1pqMk4wZEMyN1FaNGQwX1p2bUowUXYtTl9xNW5veWtyR2xfaVFsc1VWNjYya1VlRkZJV19iRGFzamhFNXZVeFUtTUpJdnhtQXBYblMtMldvOTQyYkJGLVk2a19NVUFPS2JuMzQ" + "csv=1; edgebucket=VG7pkLRioIyOfQ7dNL; loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmhnSVBNZmx2NXQyLXBGZHdza1FPeUZhclVaMG5yZTNxdjVqcDRGU1VtUEJOTVFySFZNTzhlOV9BdlpEeVhXVUNEMmNOalZhU2dJTjlRYVlySF9rTWZrZWc2a3N5d0dnQTdPZlFCdVQ3Y1R6MGRYeHFweEhySDV1VnhaNl9oc04tenN5dGs; redesign_optout=true; session_tracker=odarbncddkhbphmnjp.0.1635812300966.Z0FBQUFBQmhnSVBOOUFBaVltaWFLem51TjdDcFg3cHV5OHJ0U3dyRW85Tjdlb0hDbTY5TWdkM000b042dTlmbEFPUFVNZy1hS2ptbnhmc29TaHJ5ckhURVZwQXJkTllRVXl4NmFsb1JFVWhVOGg4QTI0MEpYdWt1dFlxZlJUb1hyVDIydGZjNTVqZWs" ], "User-Agent": [ - " PRAW/7.3.1.dev0 prawcore/2.2.0" + " PRAW/7.4.1.dev0 prawcore/2.3.0" ] }, "method": "GET", @@ -567,7 +568,7 @@ "response": { "body": { "encoding": "UTF-8", - "string": "{\"subreddits\": [{\"user_flair_background_color\": null, \"submit_text_html\": null, \"restrict_posting\": true, \"user_is_banned\": false, \"free_form_reports\": true, \"wiki_enabled\": true, \"user_is_muted\": false, \"user_can_flair_in_sr\": null, \"display_name\": \"Joekp\", \"header_img\": null, \"title\": \"Joekp\", \"allow_galleries\": true, \"icon_size\": null, \"primary_color\": \"\", \"active_user_count\": null, \"icon_img\": \"\", \"display_name_prefixed\": \"r/Joekp\", \"accounts_active\": null, \"public_traffic\": false, \"subscribers\": 4, \"user_flair_richtext\": [], \"videostream_links_count\": 0, \"name\": \"t5_zgfca\", \"quarantine\": false, \"hide_ads\": false, \"prediction_leaderboard_entry_type\": \"IN_FEED\", \"emojis_enabled\": false, \"advertiser_category\": \"\", \"public_description\": \"\", \"comment_score_hide_mins\": 0, \"allow_predictions\": false, \"user_has_favorited\": false, \"user_flair_template_id\": null, \"community_icon\": \"\", \"banner_background_image\": \"\", \"original_content_tag_enabled\": false, \"community_reviewed\": false, \"submit_text\": \"\", \"description_html\": null, \"spoilers_enabled\": true, \"header_title\": \"\", \"header_size\": null, \"user_flair_position\": \"right\", \"all_original_content\": false, \"collections_enabled\": true, \"is_enrolled_in_new_modmail\": true, \"key_color\": \"\", \"event_posts_enabled\": true, \"can_assign_user_flair\": false, \"created\": 1554775563.0, \"wls\": null, \"show_media_preview\": true, \"submission_type\": \"any\", \"user_is_subscriber\": true, \"disable_contributor_requests\": false, \"allow_videogifs\": true, \"user_flair_type\": \"text\", \"allow_polls\": true, \"collapse_deleted_comments\": false, \"coins\": 0, \"emojis_custom_size\": null, \"public_description_html\": null, \"allow_videos\": true, \"is_crosspostable_subreddit\": true, \"notification_level\": \"low\", \"can_assign_link_flair\": false, \"has_menu_widget\": false, \"accounts_active_is_fuzzed\": false, \"submit_text_label\": \"\", \"link_flair_position\": \"\", \"user_sr_flair_enabled\": null, \"user_flair_enabled_in_sr\": false, \"allow_discovery\": true, \"user_sr_theme_enabled\": true, \"link_flair_enabled\": false, \"subreddit_type\": \"public\", \"suggested_comment_sort\": null, \"banner_img\": \"\", \"user_flair_text\": null, \"banner_background_color\": \"\", \"show_media\": true, \"id\": \"zgfca\", \"user_is_moderator\": true, \"over18\": false, \"description\": \"\", \"submit_link_label\": \"\", \"user_flair_text_color\": null, \"restrict_commenting\": false, \"user_flair_css_class\": null, \"allow_images\": true, \"lang\": \"en\", \"whitelist_status\": null, \"url\": \"/r/Joekp/\", \"created_utc\": 1554775563.0, \"banner_size\": null, \"mobile_banner_image\": \"\", \"user_is_contributor\": false, \"allow_predictions_tournament\": false}], \"drafts\": [{\"body\": \"https://reddit.com\", \"subreddit\": \"t5_zgfca\", \"content_category\": null, \"nsfw\": false, \"id\": \"e33ac5d8-f0d8-11eb-a777-9e90ac1a79eb\", \"spoiler\": false, \"kind\": \"link\", \"title\": \"test\", \"original_content\": false, \"modified\": 1627609988081, \"send_replies\": true, \"created\": 1627609988081, \"is_public_link\": false, \"flair\": null}]}" + "string": "{\"subreddits\": [], \"drafts\": []}" }, "headers": { "Accept-Ranges": [ @@ -577,26 +578,23 @@ "keep-alive" ], "Content-Length": [ - "2989" + "32" ], "Content-Type": [ "application/json; charset=UTF-8" ], "Date": [ - "Fri, 30 Jul 2021 01:56:11 GMT" + "Tue, 02 Nov 2021 00:18:21 GMT" ], "Server": [ "snooserv" ], "Set-Cookie": [ - "session_tracker=mjadknmarrqclkrafc.0.1627610171119.Z0FBQUFBQmhBMXc3Y1RIM1U4SjZ1SzZwS0ctRHlKVDZmNDhJdThsVl9CakkxZEpvMmJ5aVhPME1fZTM0dnlqamI5d2EtQVlIdXRmXzk1SnpCMzlwWTdIUk5ldURxSS10cVh3OGNwc2FxUV96VmQyN2hzYVRzSzNNcVlmX0pBVkNweEE1RGRMY3ZURlE; Domain=reddit.com; Max-Age=7199; Path=/; expires=Fri, 30-Jul-2021 03:56:11 GMT; secure; SameSite=None; Secure" + "session_tracker=odarbncddkhbphmnjp.0.1635812301122.Z0FBQUFBQmhnSVBOUmVYTkluWDB0dWdQZGExeE9OcVNBTldOZEZnZGNDTFFySzVHN1oyZElOOTBacW84T1hCcjM0ZzNWTnRjT1lsLUszUHpBQ21oaEpJbEFlTzJyclROR1pUcDd4T1F0M0JmYVZZVWFRRWlRckQ2bzNjUVY2SWtnWDZGeGItbEU3TW8; Domain=reddit.com; Max-Age=7199; Path=/; expires=Tue, 02-Nov-2021 02:18:21 GMT; secure; SameSite=None; Secure" ], "Strict-Transport-Security": [ "max-age=15552000; includeSubDomains; preload" ], - "Vary": [ - "accept-encoding" - ], "Via": [ "1.1 varnish" ], @@ -619,13 +617,13 @@ "SAMEORIGIN" ], "x-ratelimit-remaining": [ - "248.0" + "113.0" ], "x-ratelimit-reset": [ - "229" + "99" ], "x-ratelimit-used": [ - "352" + "487" ], "x-ua-compatible": [ "IE=edge" diff --git a/tests/integration/models/reddit/test_draft.py b/tests/integration/models/reddit/test_draft.py index 0dc5da37a8..ddc5494e82 100644 --- a/tests/integration/models/reddit/test_draft.py +++ b/tests/integration/models/reddit/test_draft.py @@ -100,11 +100,12 @@ def test_submit__different_title(self): with self.use_cassette(): total_drafts = len(self.reddit.drafts()) - draft = self.reddit.drafts(draft_id="b18b58c2-f0d3-11eb-bacf-e6c32a1c4986") - submission = draft.submit(title="new title") - assert submission.title == draft.title + draft = self.reddit.drafts(draft_id="582b870e-3b72-11ec-b79b-4e8a1c42f3ae") + new_title = "new title" + submission = draft.submit(title=new_title) + assert submission.title == new_title assert submission.selftext == draft.selftext - assert submission.subreddit == draft.subreddit + assert str(submission.subreddit) == str(draft.subreddit) remaining_drafts = len(self.reddit.drafts()) assert remaining_drafts < total_drafts