Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function WGET {
- userAgent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) "
- userAgent+="Gecko/20100101 Firefox/48.0"
- curl -s -A "$userAgent" -e https://www.accuweather.com "$@"
- }
- url="https://www.accuweather.com/en/ma/el-ksiba/246068/weather-forecast/246068"
- data="[$(WGET "$url" |grep 'acm_RecentLocationsCarousel.push' |head -1|sed 's/acm_RecentLocationsCarousel.push//'|tr -d '();')]"
- echo "$data"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement