title: How to get the max historical price data from yahoo finance?
body: <p>I want to get the max  historical price data  with scrapy from yahoo finance.<br>
  Here is url of fb(facebook) max historical price data.</p>
  
  <pre><code>https://query1.finance.yahoo.com/v7/finance/download/FNMA?period1=221115600&amp;period2=1508472000&amp;interval=1d&amp;events=history&amp;crumb=1qRuQKELxmM
  </code></pre>
  
  <p>In order to write a stock price web crawler ,two problems i can't solve.<br>
  1.How to get the argument period1 ?<br>
  You can get it by hand in the web page,just to click max.<br>
  How to get the argument with python codes?<br>
  Different stock has the different period1 value.      </p>
  
  <p><a href="https://i.stack.imgur.com/9IGR3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9IGR3.png" alt="enter image description here"></a></p>
  
  <p>2.How to create the argument crumb=1qRuQKELxmM automatically ,different stocks with different crumb value?<br>
  Here is my stock max historical data with scrapy framework.</p>
  
  <pre><code>import scrapy
  
  class TestSpider(scrapy.Spider):
      name = "quotes"
      allowed_domains = ["finance.yahoo.com"]
  
      def __init__(self, *args, **kw):
          self.timeout = 10
  
      def start_requests(self):
          stockName =  get-it and ommit the codes 
          for stock in stockName:
              period1 =  how to fill it
              crumb = how to fill it
              per_stock_max_data = "https://query1.finance.yahoo.com/v7/finance\
                    download/"+stock+"?period1="+period1+"&amp;period2=1508472000&amp;\
                    interval=1d&amp;events=history&amp;"+"crumb="crumb
              yield scrapy.Request(per_stock_max_data,callback=self.parse)
  
      def parse(self, response):
          content = response.body
          target = response.url
          #do something
  </code></pre>
  
  <p>How to fill the blank above in my web scrawler framework?</p>