Advertisement
mosaid

Untitled

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