You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RedditVideoMakerBot/utils/playwright.py

6 lines
253 B

def clear_cookie_by_name(context, cookie_cleared_name):
cookies = context.cookies()
filtered_cookies = [cookie for cookie in cookies if cookie["name"] != cookie_cleared_name]
context.clear_cookies()
context.add_cookies(filtered_cookies)