Skip to content

Commit

Permalink
Multi language support 🌎
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoar committed Dec 5, 2019
1 parent 8cde6ec commit cdcc666
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions factorialsucks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,26 @@

URL_SIGN_IN = "https://factorialhr.com/users/sign_in"
URL_CLOCK_IN = "https://app.factorialhr.com/attendance/clock-in"
VALID_WEEKDAYS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
WEEKEND_DAYS = [
"Saturday",
"Sunday",
"sábado",
"domingo",
"dissabte",
"diumenge",
"zaterdag",
"zondag",
"sabato",
"domenica",
"lördag",
"söndag",
"Samstag",
"Sonntag",
"samedi",
"dimanche",
"Sábado",
"Domingo",
]

SELECTORS = {
"leave": "(elem) => elem.querySelector('div[class*=\"leaveContent\"]').textContent", # noqa
Expand Down Expand Up @@ -126,7 +145,7 @@ async def main():
if leave:
print("❌", leave)
continue
elif week_day not in VALID_WEEKDAYS:
elif week_day in WEEKEND_DAYS:
print("❌", week_day)
continue
elif inputed_hours != "0h":
Expand Down

0 comments on commit cdcc666

Please sign in to comment.