1
0
Fork 0
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.
Warning: Missing License
We looked everywhere, but we couldn't find an OSI- or FSF-approved Free Software or Content License, which is a requirement for hosting content on Codeberg.
Learn about why no license or custom ones are a bad idea and get started on the docs.
Please consider carefully if you want to use (parts of) this project, as doing so might put you in legal trouble.

28 lines
6.8 KiB

#!/bin/bash
#Herren 1
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=70625&cmd=ps&ct=743785&og=3' | jq '.[0].content.score' | jq '[.[] | . + {"goals": "\(.numGoalsShot):\(.numGoalsGot)" }]' | jq '[.[] | . + {"points": "\(.pointsPlus):\(.pointsMinus)" }]' | jq 'map(del(.numGoalsShot, .numGoalsGot, .pointsPlus, .pointsMinus))' > /root/data/crawler-data/hhv1_scoreboard.json
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=70625&cmd=ps&ct=743785&og=3' | jq '.[0].content.futureGames.games' | jq '[.[] | . + {"score": "\(.gHomeGoals):\(.gGuestGoals)" }]' | jq '[.[] | if .gHomeGoals != " " and .gGuestGoeals != " " then .+ {"report": "https://spo.handball4all.de/misc/sboPublicReports.php?sGID=\(.sGID)" } else .+ {"report": "" } end ]' | jq 'map(del(.gID, .sGID, .gNo, .live, .gToken, .gAppid, .gGymnasiumID, .gGymnasiumNo, .gGymnasiumName, .gGymnasiumPostal, .gGymnasiumTown, .gGymnasiumStreet, .gGroupsortTxt))' > /root/data/crawler-data/hhv1_games.json
#Herren 2
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=70637&cmd=ps&ct=743913&og=3' | jq '.[0].content.score' | jq '[.[] | . + {"goals": "\(.numGoalsShot):\(.numGoalsGot)" }]' | jq '[.[] | . + {"points": "\(.pointsPlus):\(.pointsMinus)" }]' | jq 'map(del(.numGoalsShot, .numGoalsGot, .pointsPlus, .pointsMinus))' > /root/data/crawler-data/hhv2_scoreboard.json
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=70637&cmd=ps&ct=743913&og=3' | jq '.[0].content.futureGames.games' | jq '[.[] | . + {"score": "\(.gHomeGoals):\(.gGuestGoals)" }]' | jq '[.[] | if .gHomeGoals != " " and .gGuestGoeals != " " then .+ {"report": "https://spo.handball4all.de/misc/sboPublicReports.php?sGID=\(.sGID)" } else .+ {"report": "" } end ]' | jq 'map(del(.gID, .sGID, .gNo, .live, .gToken, .gAppid, .gGymnasiumID, .gGymnasiumNo, .gGymnasiumName, .gGymnasiumPostal, .gGymnasiumTown, .gGymnasiumStreet, .gGroupsortTxt))' > /root/data/crawler-data/hhv2_games.json
#Herren 3
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=70645&cmd=ps&ct=743977&og=3' | jq '.[0].content.score' | jq '[.[] | . + {"goals": "\(.numGoalsShot):\(.numGoalsGot)" }]' | jq '[.[] | . + {"points": "\(.pointsPlus):\(.pointsMinus)" }]' | jq 'map(del(.numGoalsShot, .numGoalsGot, .pointsPlus, .pointsMinus))' > /root/data/crawler-data/hhv3_scoreboard.json
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=70645&cmd=ps&ct=743977&og=3' | jq '.[0].content.futureGames.games' | jq '[.[] | . + {"score": "\(.gHomeGoals):\(.gGuestGoals)" }]' | jq '[.[] | if .gHomeGoals != " " and .gGuestGoeals != " " then .+ {"report": "https://spo.handball4all.de/misc/sboPublicReports.php?sGID=\(.sGID)" } else .+ {"report": "" } end ]' | jq 'map(del(.gID, .sGID, .gNo, .live, .gToken, .gAppid, .gGymnasiumID, .gGymnasiumNo, .gGymnasiumName, .gGymnasiumPostal, .gGymnasiumTown, .gGymnasiumStreet, .gGroupsortTxt))' > /root/data/crawler-data/hhv3_games.json
#Damen
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=70657&cmd=ps&ct=744073&og=3' | jq '.[0].content.score' | jq '[.[] | . + {"goals": "\(.numGoalsShot):\(.numGoalsGot)" }]' | jq '[.[] | . + {"points": "\(.pointsPlus):\(.pointsMinus)" }]' | jq 'map(del(.numGoalsShot, .numGoalsGot, .pointsPlus, .pointsMinus))' > /root/data/crawler-data/damen_scoreboard.json
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=70657&cmd=ps&ct=744073&og=3' | jq '.[0].content.futureGames.games' | jq '[.[] | . + {"score": "\(.gHomeGoals):\(.gGuestGoals)" }]' | jq '[.[] | if .gHomeGoals != " " and .gGuestGoeals != " " then .+ {"report": "https://spo.handball4all.de/misc/sboPublicReports.php?sGID=\(.sGID)" } else .+ {"report": "" } end ]' | jq 'map(del(.gID, .sGID, .gNo, .live, .gToken, .gAppid, .gGymnasiumID, .gGymnasiumNo, .gGymnasiumName, .gGymnasiumPostal, .gGymnasiumTown, .gGymnasiumStreet, .gGroupsortTxt))' > /root/data/crawler-data/damen_games.json
#B-Jugend
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=78866&cmd=ps&ct=811081&og=3' | jq '.[0].content.score' | jq '[.[] | . + {"goals": "\(.numGoalsShot):\(.numGoalsGot)" }]' | jq '[.[] | . + {"points": "\(.pointsPlus):\(.pointsMinus)" }]' | jq 'map(del(.numGoalsShot, .numGoalsGot, .pointsPlus, .pointsMinus))' > /root/data/crawler-data/b_jugend_scoreboard.json
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=78866&cmd=ps&ct=811081&og=3' | jq '.[0].content.futureGames.games' | jq '[.[] | . + {"score": "\(.gHomeGoals):\(.gGuestGoals)" }]' | jq '[.[] | if .gHomeGoals != " " and .gGuestGoeals != " " then .+ {"report": "https://spo.handball4all.de/misc/sboPublicReports.php?sGID=\(.sGID)" } else .+ {"report": "" } end ]' | jq 'map(del(.gID, .sGID, .gNo, .live, .gToken, .gAppid, .gGymnasiumID, .gGymnasiumNo, .gGymnasiumName, .gGymnasiumPostal, .gGymnasiumTown, .gGymnasiumStreet, .gGroupsortTxt))' > /root/data/crawler-data/b_jugend_games.json
#C-Jugend
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=78886&cmd=ps&ct=810876&og=3' | jq '.[0].content.score' | jq '[.[] | . + {"goals": "\(.numGoalsShot):\(.numGoalsGot)" }]' | jq '[.[] | . + {"points": "\(.pointsPlus):\(.pointsMinus)" }]' | jq 'map(del(.numGoalsShot, .numGoalsGot, .pointsPlus, .pointsMinus))' > /root/data/crawler-data/c_jugend_scoreboard.json
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=78886&cmd=ps&ct=810876&og=3' | jq '.[0].content.futureGames.games' | jq '[.[] | . + {"score": "\(.gHomeGoals):\(.gGuestGoals)" }]' | jq '[.[] | if .gHomeGoals != " " and .gGuestGoeals != " " then .+ {"report": "https://spo.handball4all.de/misc/sboPublicReports.php?sGID=\(.sGID)" } else .+ {"report": "" } end ]' | jq 'map(del(.gID, .sGID, .gNo, .live, .gToken, .gAppid, .gGymnasiumID, .gGymnasiumNo, .gGymnasiumName, .gGymnasiumPostal, .gGymnasiumTown, .gGymnasiumStreet, .gGroupsortTxt))' > /root/data/crawler-data/c_jugend_games.json
#D-Jugend
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=78921&cmd=ps&ct=811021&og=3' | jq '.[0].content.score' | jq '[.[] | . + {"goals": "\(.numGoalsShot):\(.numGoalsGot)" }]' | jq '[.[] | . + {"points": "\(.pointsPlus):\(.pointsMinus)" }]' | jq 'map(del(.numGoalsShot, .numGoalsGot, .pointsPlus, .pointsMinus))' > /root/data/crawler-data/d_jugend_scoreboard.json
curl 'https://spo.handball4all.de/service/if_g_json.php?ca=0&cl=78921&cmd=ps&ct=811021&og=3' | jq '.[0].content.futureGames.games' | jq '[.[] | . + {"score": "\(.gHomeGoals):\(.gGuestGoals)" }]' | jq '[.[] | if .gHomeGoals != " " and .gGuestGoeals != " " then .+ {"report": "https://spo.handball4all.de/misc/sboPublicReports.php?sGID=\(.sGID)" } else .+ {"report": "" } end ]' | jq 'map(del(.gID, .sGID, .gNo, .live, .gToken, .gAppid, .gGymnasiumID, .gGymnasiumNo, .gGymnasiumName, .gGymnasiumPostal, .gGymnasiumTown, .gGymnasiumStreet, .gGroupsortTxt))' > /root/data/crawler-data/d_jugend_games.json
cd /root/data/crawler-data
git pull
git add *
git commit -a -m "commit"
git push