5 Commits

Author SHA1 Message Date
5e5f7f7407 Implement "timezonedates" 2024-10-18 13:03:16 +02:00
0cc42823ff Add new cards (election, dictionary) 2024-10-15 11:51:55 +02:00
56c858fa90 Adding new "explore on Bing" cards 2024-10-08 09:07:01 +02:00
adf91ac8f0 Ignoring MS Security activity (it would be better to detect it before clicking) 2024-10-01 09:03:50 +02:00
2721c76686 Fix LegacyKeyValueFormat warning
"ENV key=value" should be used instead of legacy "ENV key value" format
2024-09-19 11:57:25 +02:00
3 changed files with 43 additions and 3 deletions

View File

@ -1,5 +1,5 @@
FROM python:3.10 FROM python:3.10
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app/ WORKDIR /app/
# Initial apt install # Initial apt install

42
V6.py
View File

@ -461,7 +461,45 @@ def explore_on_bing(activity: str, config: Config):
elif "financemarket" in activity: elif "financemarket" in activity:
search_bing( search_bing(
f"cours action {['AIR LIQUIDE', 'Airbus', 'BNP Paribas', 'Michelin', 'Stellantis', 'Vinci'][randint(0, 5)]}") f"cours action {['AIR LIQUIDE', 'Airbus', 'BNP Paribas', 'Michelin', 'Stellantis', 'Vinci'][randint(0, 5)]}")
elif "sports" in activity:
equipes = random.sample([
"Toulon", "toulouse",
"stade Rochelais", "castres",
"clermont", "perpignan",
"aviron bayonnais", "vannes"
], k=2)
search_bing(f"{['score', 'résultats'][randint(0, 1)]} rugby {equipes[0]} {equipes[1]}")
elif "videogames" in activity:
search_bing(random.choice([
"Minecraft", "GTA V",
"Tetris", "PUBG",
"Mario Kart 8",
"Red Dead Redemption II",
"Terraria",
"The Witcher",
"Animal Crossing",
"Pokémon rouge & bleu",
"Super Mario Bros",
"The legend of Zelda BOTW",
"Call of Duty Modern Warfare",
"The Witcher III"
]))
elif "dictionary" in activity:
search_bing(f"définition {config.wordlist.get_word()}")
elif "election" in activity or "timezonedates" in activity:
#! I don't understand the name of "timezonedates" but this seems to be the same activity
state = random.choice([
"Alaska", "Alabama", "Arkansas", "American Samoa", "Arizona", "California", "Colorado",
"Connecticut", "District ", "of Columbia", "Delaware", "Florida", "Georgia", "Guam",
"Hawaii", "Iowa", "Idaho", "Illinois", "Indiana", "Kansas", "Kentucky", "Louisiana",
"Massachusetts", "Maryland", "Maine", "Michigan", "Minnesota", "Missouri", "Mississippi",
"Montana", "North Carolina", "North Dakota", "Nebraska", "New Hampshire", "New Jersey",
"New Mexico", "Nevada", "New York", "Ohio", "Oklahoma", "Oregon", "Pennsylvania",
"Puerto Rico", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas",
"Utah", "Virginia", "Virgin Islands", "Vermont", "Washington", "Wisconsin",
"West Virginia", "Wyoming"
])
search_bing(f"governor candidates {state} 2024")
else: else:
log_error(f"Explore on bing: {activity} not found.") log_error(f"Explore on bing: {activity} not found.")
@ -527,6 +565,8 @@ def try_play(nom="unknown", activity=""):
info(f"Explore on bing: {activity}") info(f"Explore on bing: {activity}")
explore_on_bing(activity, config) explore_on_bing(activity, config)
custom_sleep(uniform(3, 5)) custom_sleep(uniform(3, 5))
elif "Optimisez votre sécurité avec Microsoft" in driver.page_source:
info("Still not paying Office 365 ?")
else: else:
info(f"Nothing obvious to do on page `{nom}`.") info(f"Nothing obvious to do on page `{nom}`.")
custom_sleep(uniform(3, 5)) custom_sleep(uniform(3, 5))

View File

@ -1 +1 @@
v6.8.62 v6.8.65