Fix: Hide the "Click to see NSFW" button

The page locator couldn't find the "Click to see NSFW" button. It was still visible on screenshots. After changing it to look for text (innerHTML), instead, it worked.
pull/991/head
RiveN 3 years ago committed by GitHub
parent 38fcb835cf
commit 32b8c93ced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -50,7 +50,7 @@ def download_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: in
print_substep("Post is NSFW. You are spicy...")
page.locator('[data-testid="content-gate"] button').click()
page.locator(
'[data-click-id="text"] button'
'text=Click to see nsfw'
).click() # Remove "Click to see nsfw" Button in Screenshot
# translate code

Loading…
Cancel
Save