parameters: (cls, json_file)
return_statement: return page_list
docstring: Return the list of URLs from the json_file.
  
      One entry of the list may contain a html link and multiple resources.
docstring_summary: Return the list of URLs from the json_file.
docstring_tokens: Return the list of URLs from the json_file .
function: def ReadPages(cls, json_file):
      """Return the list of URLs from the json_file.
  
      One entry of the list may contain a html link and multiple resources.
      """
      page_list = []
      with open(json_file) as f:
        data = json.load(f)
        for page in data['pages']:
          url = page['url']
          if 'resources' in page:
            resources = page['resources']
          else:
            resources = None
          if not resources:
            page_list.append([url])
          else:
            urls = [url]
            # For url http://x.com/z/y.html, url_dir is http://x.com/z
            url_dir = url.rsplit('/', 1)[0]
            for resource in resources:
              urls.append(url_dir + '/' + resource)
            page_list.append(urls)
      return page_list
function_tokens: def ReadPages ( cls , json_file ) : page_list = [ ] with open ( json_file ) as f : data = json . load ( f ) for page in data [ 'pages' ] : url = page [ 'url' ] if 'resources' in page : resources = page [ 'resources' ] else : resources = None if not resources : page_list . append ( [ url ] ) else : urls = [ url ] # For url http://x.com/z/y.html, url_dir is http://x.com/z url_dir = url . rsplit ( '/' , 1 ) [ 0 ] for resource in resources : urls . append ( url_dir + '/' + resource ) page_list . append ( urls ) return page_list