Terence Eden on Nostr: Boring technical question which neither the documentation nor ChatGPT can answer. I ...
Boring technical question which neither the documentation nor ChatGPT can answer.
I want to automate screenshots using #Python's #Selenium Webdriver with #Chrome.
This works - but the non-logged in experience of Twitter forces dark-mode.
I want a light-mode screenshot.
I can't find a way to set SEC-CH-PREFERS-COLOR-SCHEME in Selenium. Nor can I find a light-mode toggle for non-logged in Twitter users.
Any clues gang?
(I want to automate replacing my Twitter embeds with a screenshot.)
Published at
2024-08-07 09:50:53 UTCEvent JSON
{
"id": "462c7176db337e1e6f115bfcd4ba14c0a03e87455d379d8a92939a70fa24538b",
"pubkey": "350b4da116bd4aa32feaa4d36a4aa69b544e430946c2a9fa1ac43b3342652b3e",
"created_at": 1723024253,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"t",
"chrome"
],
[
"proxy",
"https://mastodon.social/@Edent/112920117482971203",
"web"
],
[
"t",
"selenium"
],
[
"proxy",
"https://mastodon.social/users/Edent/statuses/112920117482971203",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.social/users/Edent/statuses/112920117482971203",
"pink.momostr"
],
[
"-"
]
],
"content": "Boring technical question which neither the documentation nor ChatGPT can answer.\n\nI want to automate screenshots using #Python's #Selenium Webdriver with #Chrome. \n\nThis works - but the non-logged in experience of Twitter forces dark-mode.\n\nI want a light-mode screenshot.\n\nI can't find a way to set SEC-CH-PREFERS-COLOR-SCHEME in Selenium. Nor can I find a light-mode toggle for non-logged in Twitter users.\n\nAny clues gang?\n\n(I want to automate replacing my Twitter embeds with a screenshot.)",
"sig": "3a46dcb6e60e11cb4387df3e62e2cb2001df6d358cd6533aebaa1c06cc5d9add382da4b71004398c8e1dd619df6c22e3e604f422d94aa76bede666310947156e"
}