Nonescaped characters no longer showing up in the results

This commit is contained in:
Jakub Kydlíček 2024-04-25 09:11:13 +02:00
parent 497a1e655c
commit 9c189b94ff
1 changed files with 15 additions and 15 deletions

View File

@ -13,29 +13,29 @@ get_zradylko() {
case "$day_of_week" in
1)
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1')
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1')
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g')
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/&nbsp;/ /g')
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/&nbsp;/ /g')
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/&nbsp;/ /g')
;;
2)
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==2')
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==2')
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g')
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/&nbsp;/ /g')
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==2' | sed 's/&nbsp;/ /g')
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/&nbsp;/ /g')
;;
3)
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==3')
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==3')
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g')
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/&nbsp;/ /g')
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==3' | sed 's/&nbsp;/ /g')
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/&nbsp;/ /g')
;;
4)
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==4')
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==4')
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g')
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/&nbsp;/ /g')
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==4' | sed 's/&nbsp;/ /g')
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/&nbsp;/ /g')
;;
5)
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==5')
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==5')
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g')
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/&nbsp;/ /g')
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==5' | sed 's/&nbsp;/ /g')
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/&nbsp;/ /g')
;;
*)
echo "Spatnej den v tydnu brasko"