Scrape historical stock data using MATLAB

What's the easiest way of scraping historical stock prices in an easy-to-use format using MATLAB? For Yahoo, the following URL works only when I manually click the download link button.

symbol = FANG
url = [''...
    symbol '?period1=1523854870&period2=1526446870&interval=1d&events=history&crumb=edOIX0.EyGl'];

Error using websave (line 103)
The server returned the message: "Unauthorized" for URL,
(with HTTP response code 401).

Most of the solutions for scrapping data from Google is out of data after they changed their API.