Nonescaped characters no longer showing up in the results
This commit is contained in:
parent
497a1e655c
commit
9c189b94ff
30
zradylko.sh
30
zradylko.sh
|
@ -13,29 +13,29 @@ get_zradylko() {
|
||||||
|
|
||||||
case "$day_of_week" in
|
case "$day_of_week" in
|
||||||
1)
|
1)
|
||||||
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1')
|
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/ / /g')
|
||||||
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/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' | sed 's/ / /g')
|
||||||
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g')
|
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/ / /g')
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==2')
|
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/ / /g')
|
||||||
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/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' | sed 's/ / /g')
|
||||||
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g')
|
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/ / /g')
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==3')
|
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/ / /g')
|
||||||
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/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' | sed 's/ / /g')
|
||||||
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g')
|
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/ / /g')
|
||||||
;;
|
;;
|
||||||
4)
|
4)
|
||||||
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==4')
|
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/ / /g')
|
||||||
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/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' | sed 's/ / /g')
|
||||||
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g')
|
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/ / /g')
|
||||||
;;
|
;;
|
||||||
5)
|
5)
|
||||||
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==5')
|
soup=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/ / /g')
|
||||||
main_course=$(echo "$html_snippet" | grep -oP '(?<=<h2 class="table">Hlavní jídlo<\/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' | sed 's/ / /g')
|
||||||
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g')
|
weekly_course=$(echo "$html_snippet" | grep -oP '(?<=<h3>Celý týden nabízíme</h3>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/ / /g')
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Spatnej den v tydnu brasko"
|
echo "Spatnej den v tydnu brasko"
|
||||||
|
|
Loading…
Reference in New Issue