input: Write a python function to scrape comments from a given Reddit URL.
  assert scrape_comments("https://www.reddit.com/r/askreddit/") != []
  assert isinstance(scrape_comments("https://www.reddit.com/r/learnpython/"), list)
  assert all(isinstance(comment, str) for comment in scrape_comments("https://www.reddit.com/r/python/"))
output: def scrape_comments(url):
      import requests
      import json
      import re
      from bs4 import BeautifulSoup
  
      headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}
      
      response = requests.get(url, headers=headers)
      if response.status_code != 200:
          return []
      
      soup = BeautifulSoup(response.content, 'html.parser')
      script_tags = soup.find_all('script', {'type': 'application/json'})
      
      comments = []
      for script in script_tags:
          if script.string and 'comments' in script.string:
              try:
                  json_data = json.loads(script.string)
                  comment_data = json_data['props']['pageProps']['comments']
                  for comment in comment_data:
                      body = comment['body']
                      if isinstance(body, str):
                          comments.append(body)
              except (KeyError, json.JSONDecodeError):
                  continue
      
      return comments