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 = ['https://query1.finance.yahoo.com/v7/finance/download/'...
    symbol '?period1=1523854870&period2=1526446870&interval=1d&events=history&crumb=edOIX0.EyGl'];
websave('data.csv',url);

Error using websave (line 103)
The server returned the message: "Unauthorized" for URL,
'https://query1.finance.yahoo.com/v7/finance/download/FANG?period1=1523854870&period2=1526446870&interval=1d&events=history&crumb=edOIX0.EyGl'
(with HTTP response code 401).

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