|
|
@ -3,7 +3,6 @@ |
|
|
|
url='https://kafeterya.metu.edu.tr/' |
|
|
|
url='https://kafeterya.metu.edu.tr/' |
|
|
|
outfile='kafe.txt' |
|
|
|
outfile='kafe.txt' |
|
|
|
|
|
|
|
|
|
|
|
echo "Günün yemeği:" > ${outfile} |
|
|
|
echo "# Günün yemeği:" >> ${outfile} |
|
|
|
curl -s ${url} | /snap/bin/xmllint --html --xpath '//div[@class="yemek"]/p' --format - | sed -e 's/<[^>]*>//g' -e '/*/d' -e 's/^/+ /g' -e 's/./\L&/g4' >> ${outfile} |
|
|
|
curl -s ${url} | grep "<h2>" | cut -d '>' -f3 | cut -d '<' -f1 | sed -e 's/<[^>]*>//g' -e '/*/d' -e 's/^/+ /g' -e 's/./\L&/g4' | sed '5,6d'| less >> ${outfile} |
|
|
|
|
|
|
|
|
|
|
|
python3 kafeterya.py |
|
|
|
|
|
|
|