Bilgiler [Deðerli Ziyaretci, linki görmeniz icin bu mesaja cevap yazmanýz gerekiyorÜye olmak icin burayý týklayýnýz] sitesinden alýnmýstýr en gercek hava tahmini burada yapýlmaktadýr
suan ki hava durumunu ruzgarýn hýzýný nem basýnc uv filtresi gunesin dogusu batýsý ayýn dogusu batýsý vs detaylý bilgiler bulunmaktadýr
scripti kullanabimeniz icin cihazýnýza curl komutunu yuklemeniz gerekmektedir wget komutu https olan sitelerde calýsmýyor
curl komutunu telnetten yukleyebilirsiniz
opkg install curl
istediginiz sehirin id sini [Deðerli Ziyaretci, linki görmeniz icin bu mesaja cevap yazmanýz gerekiyorÜye olmak icin burayý týklayýnýz] sitesinden bulabilirsiniz ornek verecek olursak
ankara id 316938
[Deðerli Ziyaretci, linki görmeniz icin bu mesaja cevap yazmanýz gerekiyorÜye olmak icin burayý týklayýnýz]ankara/316938/current-weather/316938
istanbul 318251
[Deðerli Ziyaretci, linki görmeniz icin bu mesaja cevap yazmanýz gerekiyorÜye olmak icin burayý týklayýnýz]istanbul/318251/current-weather/318251
site linki
[Deðerli Ziyaretci, linki görmeniz icin bu mesaja cevap yazmanýz gerekiyorÜye olmak icin burayý týklayýnýz]/weather-forecast/318251
bu sekilde kafanýz karýsmasýn bunu eklemiyorsunuz weather-forecast yerine /current-weather/ ekliyorsunuz
daha az karmasýk olarak anlatacak olursak
[Deðerli Ziyaretci, linki görmeniz icin bu mesaja cevap yazmanýz gerekiyorÜye olmak icin burayý týklayýnýz]/sehir/id/current-weather/id/
sehir ve id olan bolumu degistiriyorsunuz onlarda sitede mevcud ulke sehir yazdýgýnýzda
zaten id kýsmý gorunuyor onlarý degistirmeniz yeterli
ankara hava durumu
Kod:#!/bin/sh curl -k -sA "Chrome" -L "https://www.accuweather.com/tr/tr/istanbul/318251/current-weather/318251/" -q | sed -e 's/<[^>]*>//g;s/^ //g' > /tmp/a.txt sed -i -e '/^\s*$/d' /tmp/a.txt awk '/t\üm\ü/ {for(i=1; i<=70; i++) {getline; print}}' /tmp/a.txt > /tmp/b.txt sed -i -e 's/\ü/u/g' -e 's/\ç/c/g' -e 's/\ÄŸ/g/g' -e 's/\ı/i/g' -e 's/\ÅŸ/s/g' -e 's/\ö/o/g' -e 's/\Ö/O/g' -e 's/\Ç/C/g' -e 's/\Äž/G/g' -e 's/\Ä°/I/g' -e 's/\Åž/S/g' -e 's/\Ãœ/U/g' -e 's/\°/ derece/g' -e 's/\®//g' -e 's/\↑//g' /tmp/b.txt sed 's/^[ \t]*//' /tmp/b.txt >> /tmp/c.txt awk '/Next/ {for(i=2; i<=29; i++) {getline; print}}' /tmp/c.txt > /tmp/5.txt sed -i -e 's/Fazlasý//g' -e '1,6d' /tmp/5.txt sed -i -e '1i4 GUNLUK HAVA DURUMU' /tmp/5.txt sed -i -e '/^\s*$/d' /tmp/5.txt sed -i -e 's/\///g' -e 's/dereceC//g' -e 's/derece//g' -e '4s/^/En yuksek : /g' -e '9s/^/En yuksek : /g' -e '14s/^/En yuksek : /g' -e '19s/^/En yuksek : /g' -e '5s/^/En dusuk : /g' -e '10s/^/En dusuk : /g' -e '15s/^/En dusuk : /g' -e '20s/^/En dusuk : /g' /tmp/5.txt awk '/Astronom/ {for(i=0; i<=5; i++) {getline; print}}' /tmp/c.txt > /tmp/d.txt sed -i -e '2,3d' -e '6d' -e 's/SICAKLIK .ZET./Saat : /g' -e 's/.imdi/Simdi: /g' -e 's'/`printf "\xb0"`'//g' -e 's'/`printf "\xc5"`'//g' /tmp/d.txt cat /tmp/d.txt | xargs > /tmp/e.txt sed 's/ /&\n/3' /tmp/e.txt > /tmp/f.txt sed -i -e '1iANLIK HAVA DURUMU' /tmp/f.txt awk '/Gunluk/ {for(i=0; i<=21; i++) {getline; print}}' /tmp/c.txt > /tmp/g.txt sed -i -e '/Astronom./d' -e '/Saat/d' -e '/derece/d' -e '/Bat.../d' -e 's/\°\;\ \;C/ derece/g' -e 's/hr//g' -e 's/\&darr\;//g' /tmp/g.txt sed -e '3s/^/Ruzgarýn hýzý :/g' /tmp/g.txt >> /tmp/h.txt cat /tmp/f.txt /tmp/h.txt /tmp/5.txt > /tmp/m.txt sed -i -e '/^\s*$/d' /tmp/m.txt cat /tmp/m.txt rm -rf /tmp/*.txt exit
Paylaþ