title: Scrapy login to site Unsuccessful
body: <p>I'm currently scraping a site which requires I login to view certain info
  I've gone through  a bunch of s/o's and other forums, but none proved helpful.</p>
  <p>this is my current code:</p>
  <pre><code>class Test(scrapy.Spider):
      name= 'alpha'
  
      start_urls =['https://www.spapartsvortex.eu/customer/account/login/']
  
      def parse(self,response):
          soup = Soup(response.text, 'lxml')
          token =soup.find('input',{'name':&quot;form_key&quot;}).get('value')
          print(token)
          body= {
              'form_key': token,
              'login[username]': &quot;email&quot;,
              'login[password]': &quot;password&quot;,
              'send': ''
          }
          body = json.dumps(body)
          yield scrapy.Request(
              response.url,
              body=body,
              callback=self.start,
              method='POST',
              headers={
              'User-Agent':&quot;Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; http://www.google.com/bot.html) Chrome/W.X.Y.Z‡ Safari/537.36 &quot;,
              'origin': 'https://www.spapartsvortex.eu'})
  
      def start(self,response):
          if 'My Account' in response.text:
              url ='https://www.spapartsvortex.eu/categories?limit=all'
              yield scrapy.Request(
                  url,
                  callback=self.parseLevel0)
          else:
              open_in_browser(response)
              print('Login unsuccessful')
  </code></pre>