From c101e53469c07f8d4fef316f90e8f4cd6d2d4384 Mon Sep 17 00:00:00 2001 From: Andrey Stolyarov Date: Thu, 28 Sep 2023 23:00:53 +0300 Subject: [PATCH] 2024 (closes #15) (#17) --- README.md | 15 +++-- build.gradle | 1 + json/calendar.json | 127 +++++++++++++++++++++++++++++++++++++- json/consultant2024.json | 129 +++++++++++++++++++++++++++++++++++++++ json/superjob2024.json | 129 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 393 insertions(+), 8 deletions(-) create mode 100644 json/consultant2024.json create mode 100644 json/superjob2024.json diff --git a/README.md b/README.md index 8386c74..3c0fa6c 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ [2021](json/superjob2021.json) [2022](json/superjob2022.json) [2023](json/superjob2023.json) +[2024](json/superjob2024.json) ## consultant @@ -38,6 +39,7 @@ [2021](json/consultant2021.json) [2022](json/consultant2022.json) [2023](json/consultant2023.json) +[2024](json/consultant2024.json) ## json structure @@ -105,26 +107,27 @@ downloadCalendar.doLast { Исходный код страниц можно взять из браузера. Пример прямых ссылок для chrome: - view-source:https://www.superjob.ru/proizvodstvennyj_kalendar/2023/ - view-source:https://www.consultant.ru/law/ref/calendar/proizvodstvennye/2023/ + view-source:https://www.superjob.ru/proizvodstvennyj_kalendar/2024/ + view-source:https://www.consultant.ru/law/ref/calendar/proizvodstvennye/2024/ Как альтернативный вариант, можно использовать headless chrome: mkdir html - export YEAR=2023 - + mkdir html + + export YEAR=2024 google-chrome --headless --disable-gpu --crash-dumps-dir=/tmp --dump-dom "https://www.superjob.ru/proizvodstvennyj_kalendar/$YEAR" > "html/superjob$YEAR.html" google-chrome --headless --disable-gpu --crash-dumps-dir=/tmp --dump-dom "https://www.consultant.ru/law/ref/calendar/proizvodstvennye/$YEAR/" > "html/consultant$YEAR.html" Запуск парсера superjob: - export YEAR=2023 + export YEAR=2024 ./gradlew runSuperjob --args="--input $PWD/html/superjob$YEAR.html --output $PWD/json/superjob$YEAR.json" Запуск парсера consultant: - export YEAR=2023 + export YEAR=2024 ./gradlew runConsultant --args="--input $PWD/html/consultant$YEAR.html --output $PWD/json/consultant$YEAR.json" diff --git a/build.gradle b/build.gradle index a8d86b1..607b95a 100644 --- a/build.gradle +++ b/build.gradle @@ -33,6 +33,7 @@ class MergeHolidaysJsonTask extends DefaultTask { @OutputFile File output + @Input Set exclude = [] @TaskAction diff --git a/json/calendar.json b/json/calendar.json index b7b840b..159756b 100644 --- a/json/calendar.json +++ b/json/calendar.json @@ -1534,7 +1534,125 @@ "2023-12-23", "2023-12-24", "2023-12-30", - "2023-12-31" + "2023-12-31", + "2024-01-01", + "2024-01-02", + "2024-01-03", + "2024-01-04", + "2024-01-05", + "2024-01-06", + "2024-01-07", + "2024-01-08", + "2024-01-13", + "2024-01-14", + "2024-01-20", + "2024-01-21", + "2024-01-27", + "2024-01-28", + "2024-02-03", + "2024-02-04", + "2024-02-10", + "2024-02-11", + "2024-02-17", + "2024-02-18", + "2024-02-23", + "2024-02-24", + "2024-02-25", + "2024-03-02", + "2024-03-03", + "2024-03-08", + "2024-03-09", + "2024-03-10", + "2024-03-16", + "2024-03-17", + "2024-03-23", + "2024-03-24", + "2024-03-30", + "2024-03-31", + "2024-04-06", + "2024-04-07", + "2024-04-13", + "2024-04-14", + "2024-04-20", + "2024-04-21", + "2024-04-28", + "2024-04-29", + "2024-04-30", + "2024-05-01", + "2024-05-04", + "2024-05-05", + "2024-05-09", + "2024-05-10", + "2024-05-11", + "2024-05-12", + "2024-05-18", + "2024-05-19", + "2024-05-25", + "2024-05-26", + "2024-06-01", + "2024-06-02", + "2024-06-08", + "2024-06-09", + "2024-06-12", + "2024-06-15", + "2024-06-16", + "2024-06-22", + "2024-06-23", + "2024-06-29", + "2024-06-30", + "2024-07-06", + "2024-07-07", + "2024-07-13", + "2024-07-14", + "2024-07-20", + "2024-07-21", + "2024-07-27", + "2024-07-28", + "2024-08-03", + "2024-08-04", + "2024-08-10", + "2024-08-11", + "2024-08-17", + "2024-08-18", + "2024-08-24", + "2024-08-25", + "2024-08-31", + "2024-09-01", + "2024-09-07", + "2024-09-08", + "2024-09-14", + "2024-09-15", + "2024-09-21", + "2024-09-22", + "2024-09-28", + "2024-09-29", + "2024-10-05", + "2024-10-06", + "2024-10-12", + "2024-10-13", + "2024-10-19", + "2024-10-20", + "2024-10-26", + "2024-10-27", + "2024-11-03", + "2024-11-04", + "2024-11-09", + "2024-11-10", + "2024-11-16", + "2024-11-17", + "2024-11-23", + "2024-11-24", + "2024-11-30", + "2024-12-01", + "2024-12-07", + "2024-12-08", + "2024-12-14", + "2024-12-15", + "2024-12-21", + "2024-12-22", + "2024-12-29", + "2024-12-30", + "2024-12-31" ], "preholidays": [ "2011-02-22", @@ -1592,7 +1710,12 @@ "2022-11-03", "2023-02-22", "2023-03-07", - "2023-11-03" + "2023-11-03", + "2024-02-22", + "2024-03-07", + "2024-05-08", + "2024-06-11", + "2024-11-02" ], "nowork": [ "2020-03-30", diff --git a/json/consultant2024.json b/json/consultant2024.json new file mode 100644 index 0000000..1a60b95 --- /dev/null +++ b/json/consultant2024.json @@ -0,0 +1,129 @@ +{ + "holidays": [ + "2024-01-01", + "2024-01-02", + "2024-01-03", + "2024-01-04", + "2024-01-05", + "2024-01-06", + "2024-01-07", + "2024-01-08", + "2024-01-13", + "2024-01-14", + "2024-01-20", + "2024-01-21", + "2024-01-27", + "2024-01-28", + "2024-02-03", + "2024-02-04", + "2024-02-10", + "2024-02-11", + "2024-02-17", + "2024-02-18", + "2024-02-23", + "2024-02-24", + "2024-02-25", + "2024-03-02", + "2024-03-03", + "2024-03-08", + "2024-03-09", + "2024-03-10", + "2024-03-16", + "2024-03-17", + "2024-03-23", + "2024-03-24", + "2024-03-30", + "2024-03-31", + "2024-04-06", + "2024-04-07", + "2024-04-13", + "2024-04-14", + "2024-04-20", + "2024-04-21", + "2024-04-28", + "2024-04-29", + "2024-04-30", + "2024-05-01", + "2024-05-04", + "2024-05-05", + "2024-05-09", + "2024-05-10", + "2024-05-11", + "2024-05-12", + "2024-05-18", + "2024-05-19", + "2024-05-25", + "2024-05-26", + "2024-06-01", + "2024-06-02", + "2024-06-08", + "2024-06-09", + "2024-06-12", + "2024-06-15", + "2024-06-16", + "2024-06-22", + "2024-06-23", + "2024-06-29", + "2024-06-30", + "2024-07-06", + "2024-07-07", + "2024-07-13", + "2024-07-14", + "2024-07-20", + "2024-07-21", + "2024-07-27", + "2024-07-28", + "2024-08-03", + "2024-08-04", + "2024-08-10", + "2024-08-11", + "2024-08-17", + "2024-08-18", + "2024-08-24", + "2024-08-25", + "2024-08-31", + "2024-09-01", + "2024-09-07", + "2024-09-08", + "2024-09-14", + "2024-09-15", + "2024-09-21", + "2024-09-22", + "2024-09-28", + "2024-09-29", + "2024-10-05", + "2024-10-06", + "2024-10-12", + "2024-10-13", + "2024-10-19", + "2024-10-20", + "2024-10-26", + "2024-10-27", + "2024-11-03", + "2024-11-04", + "2024-11-09", + "2024-11-10", + "2024-11-16", + "2024-11-17", + "2024-11-23", + "2024-11-24", + "2024-11-30", + "2024-12-01", + "2024-12-07", + "2024-12-08", + "2024-12-14", + "2024-12-15", + "2024-12-21", + "2024-12-22", + "2024-12-29", + "2024-12-30", + "2024-12-31" + ], + "preholidays": [ + "2024-02-22", + "2024-03-07", + "2024-05-08", + "2024-06-11", + "2024-11-02" + ] +} \ No newline at end of file diff --git a/json/superjob2024.json b/json/superjob2024.json new file mode 100644 index 0000000..1a60b95 --- /dev/null +++ b/json/superjob2024.json @@ -0,0 +1,129 @@ +{ + "holidays": [ + "2024-01-01", + "2024-01-02", + "2024-01-03", + "2024-01-04", + "2024-01-05", + "2024-01-06", + "2024-01-07", + "2024-01-08", + "2024-01-13", + "2024-01-14", + "2024-01-20", + "2024-01-21", + "2024-01-27", + "2024-01-28", + "2024-02-03", + "2024-02-04", + "2024-02-10", + "2024-02-11", + "2024-02-17", + "2024-02-18", + "2024-02-23", + "2024-02-24", + "2024-02-25", + "2024-03-02", + "2024-03-03", + "2024-03-08", + "2024-03-09", + "2024-03-10", + "2024-03-16", + "2024-03-17", + "2024-03-23", + "2024-03-24", + "2024-03-30", + "2024-03-31", + "2024-04-06", + "2024-04-07", + "2024-04-13", + "2024-04-14", + "2024-04-20", + "2024-04-21", + "2024-04-28", + "2024-04-29", + "2024-04-30", + "2024-05-01", + "2024-05-04", + "2024-05-05", + "2024-05-09", + "2024-05-10", + "2024-05-11", + "2024-05-12", + "2024-05-18", + "2024-05-19", + "2024-05-25", + "2024-05-26", + "2024-06-01", + "2024-06-02", + "2024-06-08", + "2024-06-09", + "2024-06-12", + "2024-06-15", + "2024-06-16", + "2024-06-22", + "2024-06-23", + "2024-06-29", + "2024-06-30", + "2024-07-06", + "2024-07-07", + "2024-07-13", + "2024-07-14", + "2024-07-20", + "2024-07-21", + "2024-07-27", + "2024-07-28", + "2024-08-03", + "2024-08-04", + "2024-08-10", + "2024-08-11", + "2024-08-17", + "2024-08-18", + "2024-08-24", + "2024-08-25", + "2024-08-31", + "2024-09-01", + "2024-09-07", + "2024-09-08", + "2024-09-14", + "2024-09-15", + "2024-09-21", + "2024-09-22", + "2024-09-28", + "2024-09-29", + "2024-10-05", + "2024-10-06", + "2024-10-12", + "2024-10-13", + "2024-10-19", + "2024-10-20", + "2024-10-26", + "2024-10-27", + "2024-11-03", + "2024-11-04", + "2024-11-09", + "2024-11-10", + "2024-11-16", + "2024-11-17", + "2024-11-23", + "2024-11-24", + "2024-11-30", + "2024-12-01", + "2024-12-07", + "2024-12-08", + "2024-12-14", + "2024-12-15", + "2024-12-21", + "2024-12-22", + "2024-12-29", + "2024-12-30", + "2024-12-31" + ], + "preholidays": [ + "2024-02-22", + "2024-03-07", + "2024-05-08", + "2024-06-11", + "2024-11-02" + ] +} \ No newline at end of file