master be1738d0e649 cached
26 files
342.4 KB
102.5k tokens
51 symbols
1 requests
Download .txt
Showing preview only (355K chars total). Download the full file or copy to clipboard to get everything.
Repository: ziplokk1/incapsula-cracker-py3
Branch: master
Commit: be1738d0e649
Files: 26
Total size: 342.4 KB

Directory structure:
gitextract_b7gw_h1l/

├── .gitignore
├── LICENSE.txt
├── README.md
├── circle.yml
├── docs/
│   ├── Makefile
│   ├── conf.py
│   ├── index.rst
│   ├── make.bat
│   └── source/
│       ├── incapsula.rst
│       └── modules.rst
├── incapsula/
│   ├── __init__.py
│   ├── errors.py
│   ├── parsers.py
│   └── session.py
├── requirements.txt
├── setup.cfg
├── setup.py
├── tests/
│   ├── __init__.py
│   ├── helpers.py
│   ├── test_IframeResourceParser.py
│   └── whoscored/
│       ├── __init__.py
│       ├── index.html
│       ├── jsTest.html
│       ├── test_whoscored.py
│       └── whoscored-index_unblocked.html
└── tools.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
# Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

*.idea


================================================
FILE: LICENSE.txt
================================================
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>

================================================
FILE: README.md
================================================
[![CircleCI](https://circleci.com/gh/ziplokk1/incapsula-cracker-py3.svg?style=shield)](https://circleci.com/gh/ziplokk1/incapsula-cracker-py3)
# Description

This module is used to wrap any request to a webpage blocked by incapsula. Despite the name, this library should be ok to use with python2.7.

Incapsula has begun using re-captcha after too many requests which may seem malicious. As of now, there is no way around it.

Currently in order to detect that, I just simply raise an IncapBlocked error when the page is blocked by re-captcha.

## Documentation can be found [here](https://ziplokk1.github.io/incapsula-cracker-py3/).

# Usage

```python
from incapsula import IncapSession
session = IncapSession()
response = session.get('http://example.com')  # url is not blocked by incapsula
```

```python
# Sometimes incapsula will block based on user agent.
from incapsula import IncapSession
session = IncapSession(user_agent='any-user-agent-string')
respose = session.get('http://example.com')

# This can also be done after instantiation.
session.headers['User-Agent'] = 'some-other-user-agent-string'

# It can also be done on a per request basis, just like requests.
response = session.get('http://example.com', headers={'User-Agent': 'another-user-agent-string'})
```

```python
# Since IncapSession inherits from requests.Session, you can pass all the same arguments to it.
# See the requests documentation here (http://docs.python-requests.org/en/master/user/advanced/#session-objects)
from __future__ import print_function
from incapsula import IncapSession
session = IncapSession()
session.cookies.set('cookie-key', 'cookie-value')
response = session.get('http://example.com', headers={'Referer': 'http://other-example.com'})
print(session.cookies)
```

```python
# Handling re-captcha blocks.
from incapsula import IncapSession, RecaptchaBlocked
session = IncapSession()
try:
    response = session.get('http://example.com')
except RecaptchaBlocked as e:
    raise
```

```python
# Sending a request to a page which is not blocked by incapsula
from incapsula import IncapSession
session = IncapSession()

# When using the bypass_crack param, the IncapSession will not send out extra requests to bypass incapsula.
# This will speed up the requests significantly so if you're making a scraper which
# accesses multiple sites and some don't use incapsula, you can just bypass the crack.
response = session.get('http://example.com', bypass_crack=True)
```

# Setup

`pip install incapsula-cracker-py3`

# Notes

* As of now, this is only proven to work with the following sites:
  * whoscored.com
  * coursehero.com
  * offerup.com
  * dollargeneral.com
* I understand that there's minimal commenting and that's because I'm not sure exactly why incapsula is sending requests to certain pages other than to obtain cookies. This is just a literal reverse engineer of incapsulas javascript code.
* Feel free to contribute. Unfortunately webscraping is such a dynamic field that I can't always put out updates and make changes for specific sites. So I turn to the community to help with those issues. Thank you for your understanding. For anyone who is using this library and it works for your site, please send me a note so i can add it to the list.

# How it works:
Lets start with how incapsula works first:
1. When you navigate to a webpage, incapsula runs some javascript code which tests your browser to see if it's using selenium, phantomJS, mechanize, etc.
2. A cookie is created which holds the results of this test.
3. A request is then sent out which "applies" the cookie and now sends back a few other cookies necessary to obtain access to the site.
4. Any subsequent request is now authorized to access the site until the cookie expires.
5. If there are too many requests being made to the site despite the cookie authentication, incapsula will serve back a re-captcha instead.

When detecting whether a resource is blocked, by default, we look for two elements.

```html
<!-- element 1 -->
<meta name="ROBOTS"/>

<!-- element 2 -->
<iframe src="link to some incapsula resource"></iframe>
```

Finding both of these elements is necessary because unless both tags are present (from what I have seen) then the resource is not blocked.

Once we have determined that the resource is blocked, we send a get request to the `src` of the `iframe` to determine its contents.

If the contents contain a re-captcha, then there's nothing we can do and we raise a `IncapBlocked` exception. Otherwise we set the `___utvmc` cookie, send the GET request to apply the cookie, and send a new request to the original url.


# Customizing
### The iframe src isn't contained in what I have coded already, here is how to expand the list to search.
```html
<head>
    <meta name="ROBOTS"/>
</head>
<body>
    <iframe src="http://some-site-i-havent-added.com"></iframe>
</body>
```
```python
from incapsula import IncapSession, WebsiteResourceParser

class MyResourceParser(WebsiteResourceParser):
    # List of arguments to pass into BeautifulSoup().find() method.
    extra_find_iframe_args = [
        ('iframe', {'src': 'http://some-site-i-havent-added.com'})
    ]

incap_session = IncapSession(resource_parser=MyResourceParser)
# more code here
```
### The resource is blocked by incapsula but there's no `<meta name="ROBOTS"/>` so this library isn't detecting that it's blocked.
```html
<head></head>
<body>
    <iframe src="//content.incapsula.com/jsTest.html"></iframe>
</body>
```
```python
from incapsula import IncapSession, WebsiteResourceParser

class NoRobotsMetaResourceParser(WebsiteResourceParser):
    def is_blocked(self):
        return bool(self.incapsula_iframe)
        
incap_session = IncapSession(resource_parser=NoRobotsMetaResourceParser)
# More code here
```
### The iframe contents have a captcha, but my library isn't detecting that.
```html
<!-- Response from iframe request -->
<body>
    <div class="some-recaptcha-class" id="recaptcha-div">
        <!-- Recaptcha contents -->
    </div>
</body>
```
```python
from incapsula import IncapSession, IframeResourceParser

class MyIframeResourceParser(IframeResourceParser):
    # List of arguments to pass into BeautifulSoup().find() method.
    extra_find_recaptcha_args = [
        ('div', {'class': 'some-recaptcha-class', 'id': 'recaptcha-div'})
    ]
    
incap_session = IncapSession(iframe_parser=MyIframeResourceParser)
```
### Since I've tried to keep this pretty site agnostic, its not always going to work with some sites. I've tried to keep it as extensible as possible so that it's easy to tailor it to a specific site.

## As Always: Scrape responsibly, obey timeouts, and obey the robots.txt. ;)

feel free to contact me at sdscdeveloper@gmail.com


================================================
FILE: circle.yml
================================================
defaults: &defaults
  working_directory: ~/incapsula-cracker-py3
  docker:
    - image: ubuntu:14.04
  steps:
    - run:
        name: "Update package manager..."
        command: "apt-get -y update"
    - run:
        name: "Install git..."
        command: "apt-get install -y git"
    - checkout

python_defaults: &python_defaults
  working_directory: ~/incapsula-cracker-py3
  steps:
    - run:
        name: "Update package manager"
        command: "apt-get -y update"
    - run:
        name: "Install git"
        command: "apt-get install -y git"
    - checkout
    - run:
        name: "Install dependencies"
        command: "python -m pip install -r requirements.txt"
    - run:
        name: "Install nose"
        command: "python -m pip install nose"
    - run:
        name: "Python version"
        command: "printf Using- && python --version"
    - run:
        name: "Nosetests"
        command: "nosetests -v"

version: 2
jobs:
  build:
    <<: *defaults
  build-p27:
    <<: *python_defaults
    docker:
      - image: python:2.7
  build-p34:
    <<: *python_defaults
    docker:
      - image: python:3.4

workflows:
  version: 2
  build_and_test:
    jobs:
      - build-p27:
          filters:
            branches:
              ignore: gh-pages
      - build-p34:
          filters:
            branches:
              ignore: gh-pages

================================================
FILE: docs/Makefile
================================================
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS    =
SPHINXBUILD   = python -msphinx
SPHINXPROJ    = IncapsulaCracker
SOURCEDIR     = .
BUILDDIR      = ../../incapsula-cracker-py3-docs

# Put it first so that "make" without argument is like "make help".
help:
	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

================================================
FILE: docs/conf.py
================================================
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Incapsula Cracker documentation build configuration file, created by
# sphinx-quickstart on Sat Jun 17 21:53:21 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../'))


# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = 'Incapsula Cracker'
copyright = '2017, Mark Sanders'
author = 'Mark Sanders'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.1.8.1'
# The full version, including alpha/beta/rc tags.
release = '0.1.8.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'IncapsulaCrackerdoc'


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
    # The paper size ('letterpaper' or 'a4paper').
    #
    # 'papersize': 'letterpaper',

    # The font size ('10pt', '11pt' or '12pt').
    #
    # 'pointsize': '10pt',

    # Additional stuff for the LaTeX preamble.
    #
    # 'preamble': '',

    # Latex figure (float) alignment
    #
    # 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
#  author, documentclass [howto, manual, or own class]).
latex_documents = [
    (master_doc, 'IncapsulaCracker.tex', 'Incapsula Cracker Documentation',
     'Mark Sanders', 'manual'),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
    (master_doc, 'incapsulacracker', 'Incapsula Cracker Documentation',
     [author], 1)
]


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
#  dir menu entry, description, category)
texinfo_documents = [
    (master_doc, 'IncapsulaCracker', 'Incapsula Cracker Documentation',
     author, 'IncapsulaCracker', 'One line description of project.',
     'Miscellaneous'),
]





================================================
FILE: docs/index.rst
================================================
.. Incapsula Cracker documentation master file, created by
   sphinx-quickstart on Sat Jun 17 21:53:21 2017.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Welcome to Incapsula Cracker's documentation!
=============================================

.. toctree::
   :maxdepth: 2
   :caption: Contents:



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


================================================
FILE: docs/make.bat
================================================
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
	set SPHINXBUILD=python -msphinx
)
set SOURCEDIR=.
set BUILDDIR=_build
set SPHINXPROJ=IncapsulaCracker

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
	echo.
	echo.The Sphinx module was not found. Make sure you have Sphinx installed,
	echo.then set the SPHINXBUILD environment variable to point to the full
	echo.path of the 'sphinx-build' executable. Alternatively you may add the
	echo.Sphinx directory to PATH.
	echo.
	echo.If you don't have Sphinx installed, grab it from
	echo.http://sphinx-doc.org/
	exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd


================================================
FILE: docs/source/incapsula.rst
================================================
incapsula package
=================

Submodules
----------

incapsula\.errors module
------------------------

.. automodule:: incapsula.errors
    :members:
    :undoc-members:
    :show-inheritance:

incapsula\.parsers module
-------------------------

.. automodule:: incapsula.parsers
    :members:
    :undoc-members:
    :show-inheritance:

incapsula\.session module
-------------------------

.. automodule:: incapsula.session
    :members:
    :undoc-members:
    :show-inheritance:


Module contents
---------------

.. automodule:: incapsula
    :members:
    :undoc-members:
    :show-inheritance:


================================================
FILE: docs/source/modules.rst
================================================
incapsula
=========

.. toctree::
   :maxdepth: 4

   incapsula


================================================
FILE: incapsula/__init__.py
================================================
from .errors import IncapBlocked, MaxRetriesExceeded, RecaptchaBlocked
from .parsers import ResourceParser, WebsiteResourceParser, IframeResourceParser
from .session import IncapSession


================================================
FILE: incapsula/errors.py
================================================
class IncapBlocked(ValueError):
    """
    Base exception for exceptions in this module.

    :param response: The response which was being processed when this error was raised.
    :type response: requests.Response
    :param *args: Additional arguments to pass to :class:`ValueError`.
    """
    def __init__(self, response, *args):
        self.response = response
        super(IncapBlocked, self).__init__(*args)


class MaxRetriesExceeded(IncapBlocked):
    """
    Raised when the number attempts to bypass incapsula has exceeded the amount specified.

    :param response: The response which was being processed when this error was raised.
    :type response: requests.Response
    :param *args: Additional arguments to pass to :class:`ValueError`.
    """
    pass


class RecaptchaBlocked(IncapBlocked):
    """
    Raised when re-captcha is encountered.

    :param response: The response which contains the re-captcha.
    :type response: requests.Response
    :param *args: Additional arguments to pass to :class:`ValueError`.
    """
    pass


================================================
FILE: incapsula/parsers.py
================================================
import re
from six.moves.urllib.parse import urlsplit

from bs4 import BeautifulSoup


class ResourceParser(object):
    """
    Superclass for all other parser objects.

    :param response: Response from GET request.
    :type response: requests.Response
    """

    def __init__(self, response):
        """
        :param response: Response from GET request.
        :type response: requests.Response
        """
        self.response = response
        split = urlsplit(response.url)
        self.scheme = split.scheme
        self.host = split.netloc
        self.soup = BeautifulSoup(self.response.content, 'html.parser')

    def is_blocked(self):
        """
        Override this method to determine whether or not the resource is blocked.

        .. note:: If this class is passed into :class:`IncapSession` as the ``resource_parser`` parameter then this
            method will be used to determine whether to attempt to bypass incapsula or raise
            a :class:`MaxRetriesExceeded` error on too many retries.

        .. note:: If this class is passed into :class:`IncapSession` as the ``iframe_parser`` parameter then
            this method will be used to determine whether to raise a :class:`RecaptchaBlocked` error when a
            re-captcha is encountered.

        :return: True if resource is blocked otherwise False
        """
        raise NotImplementedError('`is_blocked()` is not implemented')


class IframeResourceParser(ResourceParser):
    """
    Parser object to obtain the contents of the incapsula iframe.

    :param response: The response of the request sent to the incapsula iframe url.
    :type response: requests.Response
    """

    # Standard args to use with soup.find() when searching for the element which contains a recaptcha.
    default_find_recaptcha_args = [
        ('form', {'id': 'captcha-form'}),
        ('div', {'class': 'g-recaptcha'})
    ]

    # Extra find recaptcha args to use when subclassing.
    # Note: when searching for the recaptcha, it will search for the recaptcha using the values in this list first then
    # it will search using the default_find_iframe_args list.
    extra_find_recaptcha_args = []

    def __init__(self, response):
        """

        :param response: The response of the request sent to the incapsula iframe url.
        :type response: requests.Response
        """
        super(IframeResourceParser, self).__init__(response)

    @property
    def recaptcha_element(self):
        """
        Recaptcha element in the document.

        :rtype: bs4.element.Tag
        """
        # Iterate over user defined list first.
        for element in self.extra_find_recaptcha_args:
            elem = self.soup.find(*element)
            if elem:
                return elem
        # Then iterate over defaults.
        for element in self.default_find_recaptcha_args:
            elem = self.soup.find(*element)
            if elem:
                return elem

    def is_blocked(self):
        """
        Determine whether the iframe contents is a google recaptcha.

        This is determined by simply iterating over the combined results of default_find_recaptcha_args and
        extra_find_recaptcha_args then seeing if the element is found in the document.

        :return: True if the iframe contains a google recaptcha.
        :rtype: bool
        """
        return bool(self.recaptcha_element)


class WebsiteResourceParser(ResourceParser):
    """
    Parser object to extract the robots meta element, incapsula iframe element, and the incapsula iframe url.

    :param response: The response of the request sent to the targeted host.
    :type response: requests.Response
    """

    # Standard args to use with soup.find() when searching for the iframe.
    default_find_iframe_args = [
        ('iframe', {'src': re.compile('^/_Incapsula_Resource.*')}),
        ('iframe', {'src': re.compile('^//content\.incapsula\.com.*')})
    ]

    # Extra find iframe args to use when subclassing.
    # Note: when searching for the iframe, it will search for the iframe using the values in this list first then
    # it will search using the default_find_iframe_args list.
    extra_find_iframe_args = []

    def __init__(self, response):
        """

        :param response: The response of the request sent to the targeted host.
        :type response: requests.Response
        """
        super(WebsiteResourceParser, self).__init__(response)

    @property
    def incapsula_script_url(self):
        """
        The script url to get the b var value
        
        :rtype: str
        """
        scripts = self.soup.find_all('script')
        if len(scripts) > 1:
            return scripts[0].get('src')

        return None

    @property
    def robots_meta(self):
        """
        The meta robots tag which is so commonly found in incapsula blocked resources.

        :rtype: bs4.element.Tag
        """
        return self.soup.find('meta', {'name': re.compile('^robots$', re.IGNORECASE)})

    @property
    def incapsula_iframe(self):
        """
        The iframe which contains the javascript code that runs on browser load.

        :rtype: bs4.element.Tag
        """
        # Iterate over user defined args first.
        for element in self.extra_find_iframe_args:
            iframe = self.soup.find(*element)
            if iframe:
                return iframe
        # Then iterate over defaults.
        for element in self.default_find_iframe_args:
            iframe = self.soup.find(*element)
            if iframe:
                return iframe

    @property
    def incapsula_iframe_url(self):
        """
        The src attribute value of the incapsula iframe.

        :rtype: str
        """
        if self.incapsula_iframe:
            uri = self.incapsula_iframe.get('src')
            # Case when uri isn't actually a uri, but an external resource.
            if uri.startswith('//'):
                return self.scheme + ':' + uri
            return self.scheme + '://' + self.host + uri

    def is_blocked(self):
        """
        Determine whether the resource is blocked by incapsula or not.

        If the resource has the <meta name="ROBOTS"> tag and the incapsula IFrame
        then we can assume the resource is blocked.

        :return: True if the robots meta tag and the incapsula iframe are both found in the document.
        :rtype: bool
        """
        return bool(self.robots_meta) and bool(self.incapsula_iframe)


================================================
FILE: incapsula/session.py
================================================
from __future__ import absolute_import

import re
import time
import logging
import datetime
import random
from six.moves.urllib.parse import quote, urlsplit

from requests import Session

from .parsers import WebsiteResourceParser, IframeResourceParser
from .errors import RecaptchaBlocked, MaxRetriesExceeded


logger = logging.getLogger('incapsula')

# A list of valid values which are tested in the incapsula test method.
# These values are pulled straight from my browser and should be enough to spoof
# the robot check when setting the cookie.
o = [
    ('navigator', 'true'),
    ('navigator.vendor', 'Google Inc.'),
    ('navigator.appName', 'Netscape'),
    ('navigator.plugins.length==0', 'false'),
    ('navigator.platform', 'Linux x86_64'),
    ('navigator.webdriver', 'undefined'),
    ('plugin_ext', 'no extention'),
    ('plugin_ext', 'so'),
    ('ActiveXObject', 'false'),
    ('webkitURL', 'true'),
    ('_phantom', 'false'),
    ('callPhantom', 'false'),
    ('chrome', 'true'),
    ('yandex', 'false'),
    ('opera', 'false'),
    ('opr', 'false'),
    ('safari', 'false'),
    ('awesomium', 'false'),
    ('puffinDevice', 'false'),
    ('__nightmare', 'false'),
    ('_Selenium_IDE_Recorder', 'false'),
    ('document.__webdriver_script_fn', 'false'),
    ('document.$cdc_asdjflasutopfhvcZLmcfl_', 'false'),
    ('process.version', 'false'),
    ('navigator.cpuClass', 'false'),
    ('navigator.oscpu', 'false'),
    ('navigator.connection', 'false'),
    ('window.outerWidth==0', 'false'),
    ('window.outerHeight==0', 'false'),
    ('window.WebGLRenderingContext', 'true'),
    ('document.documentMode', 'undefined'),
    ('eval.toString().length', '33')
]


def test():
    """
    Quote each value in the tuple list and return a comma delimited string of the parameters.

    This method is a shortened version of incapsulas test method. What the original method does is check
    for specific plugins in your browser and set a cookie based on which extensions you have installed.
    The list of the values is taken from my own browser after running the test method so they are all valid.

    This is just more of a shortcut method instead of trying to reverse engineer the entire code that they had.
    :return:
    """
    # safe param set to () for the single parameter with the key of "eval.toString().length".
    # This is needed to match the cookie value exactly with what is expected from incapsula.
    r = [quote('='.join(x), safe='()') for x in o]
    return ','.join(r)


def simple_digest(s):
    """
    Create a sum of the ordinal values of the characters passed in from s.

    .. code-block: javascript
        // The original javascript code.
        function simpleDigest(mystr) {
            var res = 0;
            for (var i = 0; i < mystr.length; i++) {
                res += mystr.charCodeAt(i);
            }
            return res;
        }

    :param s: The string to calculate the digest from.
    :return: Sum of ordinal values converted to a string.
    """
    res = 0
    for ch in s:
        res += ord(ch)
    return str(res)


class IncapSession(Session):
    """
    Session object to bypass sites which are guarded by incapsula.

    :param max_retries: The number of times to attempt to get the incapsula resource before
        raising a :class:`MaxRetriesExceeded` error. Set this to `None` to never give up.
    :param user_agent: Change the default user agent when sending requests.
    :param cookie_domain: Use this param to change the domain which is set in the cookie.
        Sometimes the domain set for the cookie isn't the same as the actual host.
        i.e. .domain.com instead of www.domain.com.
    :param resource_parser: :class:`ResourceParser` to use when checking whether the website served back a page which
        is blocked by incapsula. Default: :class:`WebsiteResourceParser`.
    :param iframe_parser: :class:`ResourceParser` class (not instance) to use when checking whether the iframe
        contains a captcha. Default: :class:`IframeResourceParser`.
    """

    def __init__(self, max_retries=3, user_agent=None, cookie_domain='', resource_parser=WebsiteResourceParser,
                 iframe_parser=IframeResourceParser):
        super(IncapSession, self).__init__()

        default_useragent = 'IncapUnblockSession (https://github.com/ziplokk1/incapsula-cracker-py3)'
        user_agent = user_agent or default_useragent

        self.max_retries = max_retries
        self.cookie_domain = cookie_domain
        self.headers['User-Agent'] = user_agent

        self.ResourceParser = resource_parser
        self.IframeParser = iframe_parser

    def _get_session_cookies(self):
        """
        Get a list of cookies needed for making the simple digest when setting the ___utvmc cookie.

        .. note:: Translated from:
            function getSessionCookies() {
                var cookieArray = new Array();
                var cName = /^\s?incap_ses_/;
                var c = document.cookie.split(";");
                for (var i = 0; i < c.length; i++) {
                    var key = c[i].substr(0, c[i].indexOf("="));
                    var value = c[i].substr(c[i].indexOf("=") + 1, c[i].length);
                    if (cName.test(key)) {
                        cookieArray[cookieArray.length] = value;
                    }
                }
                return cookieArray;
            }

        :return: List of cookies where the cookie name starts with "incap_ses_".
        """
        return [cookie.value for cookie in self.cookies if cookie.name.startswith('incap_ses_')]

    def _create_cookie(self, name, value, seconds, domain=''):
        """
        Set the incapsula cookie needed to make verification request.

        :param name: Cookie name.
        :param value: Cookie value.
        :param seconds: Cookie expiry seconds from the current time.
        :param domain: Cookie domain.
        :return:
        """
        expires = None
        if seconds:
            d = datetime.datetime.now()
            d += datetime.timedelta(seconds=seconds)
            expires = round((d - datetime.datetime.utcfromtimestamp(0)).total_seconds() * 1000)
        self.cookies.set(name, value, domain=domain, path='/', expires=expires)

    def _set_incap_cookie(self, v_array, domain='', sl=None):
        """
        Calculate the final value for the cookie needed to bypass incapsula.

        .. note:: Translated from:
            function setIncapCookie(vArray) {
                var res;
                try {
                    var cookies = getSessionCookies();
                    var digests = new Array(cookies.length);
                    for (var i = 0; i < cookies.length; i++) {
                        digests[i] = simpleDigest((vArray) + cookies[i]);
                    }
                    var sl = "jcMQV+ffvh2BmAcW8nq2a1HZRZcsB5poBUV2Ew==";
                    var dd = digests.join();
                    var asl = '';
                    for (var i=0;i<sl.length;i++) {
                        asl += (sl.charCodeAt(i) + dd.charCodeAt(i % dd.length)).toString(16);
                    }
                    res = vArray + ",digest=" + dd + ",s=" + asl;
                } catch (e) {
                    res = vArray + ",digest=" + (encodeURIComponent(e.toString()));
                }
                createCookie("___utmvc", res, 20);
            }

        :param v_array: Comma delimited, urlencoded string which was returned from :func:`simple_digest`.
        :param domain: Cookie domain.
        :return:
        """
        cookies = self._get_session_cookies()
        digests = []
        for cookie_val in cookies:
            digests.append(simple_digest(v_array + cookie_val))

        dd = ','.join(digests)

        asl = self._get_incapsula_asl(dd, sl)

        res = v_array + ',digest=' + dd + ",s=" + asl

        logger.debug('setting ___utmvc cookie to {}'.format(res))
        self._create_cookie('___utmvc', res, 20, domain=domain)

    def _raise_for_recaptcha(self, resource):
        """
        Raise an IncapBlocked exception if the iframe contains a recaptcha.

        Send get request to iframe url to get the contents and raise if the contents contain a re-captcha.

        :param resource: Resource object from original request.
        :return:
        """
        # Get the content from the iframe.
        iframe_response = self.get(resource.incapsula_iframe_url, bypass_crack=True)
        iframe_resource = self.IframeParser(iframe_response)

        if iframe_resource.is_blocked():
            raise RecaptchaBlocked(iframe_response, 'resource blocked by re-captcha')

    def _get_incapsula_b(self, incapsula_script_url):
        """
        Get the b var value, which is the obfuscated JS code of incapsula.
        
        :param incapsula_script_url: The url where the b var can be found.
        :return: 
        """
        response = self.get(incapsula_script_url, bypass_crack=True)

        b_search = re.search(r"var b=\"(.*?)\"", response.text)

        if not b_search:
            return None

        return b_search.group(1)

    def _get_incapsula_sl(self, b):
        """
        Get the sl var value from the obfuscated JS code.
        
        .. note:: Code provided by Hades1996 in:
            https://github.com/ziplokk1/incapsula-cracker-py3/issues/4
        
        :param b: Obfuscated JS code where is the sl var value.
        :return: 
        """

        if not b:
            return None

        char_list = []
        for i in range(0, len(b), 2):
            char_list.append(int(b[i:i + 2], base=16))

        code = ""
        for char in char_list:
            code = code + chr(char)

        sl_search = re.search('sl = "(.+)";', code)\

        if sl_search:
            return sl_search.group(1)

        return None

    def _get_incapsula_asl(self, dd, sl):
        """
        Get the asl value to set in the incapsula cookies.
        
        .. note:: Code provided by Hades1996 in:
            https://github.com/ziplokk1/incapsula-cracker-py3/issues/4
        
        :param dd: Digests joined.
        :param sl: SL var value.
        :return: 
        """

        asl = ""
        for i in range(0, len(sl)):
            asl = asl + format(ord(sl[i]) + ord(dd[i % len(dd)]), 'x')
        return asl

    def _apply_cookies(self, original_url, incapsula_script_url):
        """
        Set the session cookies and send the necessary GET request to "apply" the cookies.

        :param original_url: The url of the original request.
            Needed to determine the scheme and host of the domain to send the request to apply the cookies.
        :param incapsula_script_url: The url where the b var can be found.
        :return:
        """

        # Split the url so that no matter what site is being requested, we can figure out the host of
        # the incapsula resource.
        split = urlsplit(original_url)
        scheme = split.scheme
        host = split.netloc

        b = self._get_incapsula_b(scheme + '://' + host + incapsula_script_url)

        sl = self._get_incapsula_sl(b)

        if sl:
            # Set the cookie then send request to incap resource to "apply" cookie.
            self._set_incap_cookie(test(), self.cookie_domain or host, sl)

            self.get(self.get_incapsula_resource_url(scheme, host), bypass_crack=True)

    def get_incapsula_resource_url(self, scheme, host):
        """
        Override this method to change the GET request after the cookies are set.

        After the cookies are set, there is a GET request which must get sent to validate the session.
        Override this method to return a different url to send the GET request to.
        This method is more of a future proofing measure than anything.

        :param scheme: 'http' or 'https'.
        :param host: The host of the incapsula resource url. e.x. 'www.example.com'.
        """
        rdm = random.random()
        return scheme + '://' + host + '/_Incapsula_Resource?SWKMTFSR=1&e={}'.format(rdm)

    def crack(self, resp, org=None, tries=0):
        """
        If the response is blocked by incapsula then set the necessary cookies and attempt to bypass it.

        :param resp: Response to check.
        :param org: Original response. Used only when called recursively.
        :param tries: Number of attempts. Used only when called recursively.
        :return:
        """
        # Use to hold the original request so that when attempting the new unblocked request, we have a reference
        # to the original url.
        org = org or resp

        # Return original response after too many tries to bypass incap.
        # If max_retries is None then this part will never get executed allowing a continuous retry.
        if self.max_retries is not None and tries >= self.max_retries:
            raise MaxRetriesExceeded(resp, 'max retries exceeded when attempting to crack incapsula')

        resource = self.ResourceParser(resp)
        if resource.is_blocked():
            logger.debug('Resource is blocked. attempt={} url={}'.format(tries, resp.url))
            # Raise if the response content's iframe contains a recaptcha.
            self._raise_for_recaptcha(resource)

            # Apply cookies and send GET request to apply them.
            self._apply_cookies(org.url, resource.incapsula_script_url)

            # Recursively call crack() again since if the request isn't blocked after the above cookie-set and request,
            # then it will just return the unblocked resource.
            return self.crack(self.get(org.url, bypass_crack=True), org=org, tries=tries + 1)

        return resp

    def get(self, url, bypass_crack=False, **kwargs):
        """
        Override :class:`Session`.:func:`get`

        :param url: URL for the new :class:`Request` object.
        :param bypass_crack: Use when sending a request that you dont want to go through the incapsula crack.
        :param kwargs: Optional arguments that ``request`` takes.
            Used in this class so when sending a get request from this instance,
            we dont end up creating an infinate loop by calling .get() then .crack() which calls .get()
            and repeat x infinity. Also any requests made to get incapsula resources don't need to be cracked.
        :rtype: requests.Response
        """

        kwargs.setdefault('allow_redirects', True)

        # If the request is to get the incapsula resources, then we dont call crack().
        if bypass_crack:
            return self.request('GET', url, **kwargs)

        return self.crack(self.request('GET', url, **kwargs))


================================================
FILE: requirements.txt
================================================
beautifulsoup4==4.6.0
requests==2.14.2
six==1.10.0


================================================
FILE: setup.cfg
================================================
[metadata]
description-file = README.md


================================================
FILE: setup.py
================================================
from __future__ import unicode_literals

from setuptools import setup

version = '0.1.8.1'

REQUIREMENTS = [
    'requests',
    'beautifulsoup4',
    'six'
]

setup(
    name='incapsula-cracker-py3',
    version=version,
    packages=['incapsula'],
    url='https://github.com/ziplokk1/incapsula-cracker-py3',
    license='Unlicense',
    author='Mark Sanders',
    author_email='sdscdeveloper@gmail.com',
    install_requires=REQUIREMENTS,
    description='A way to bypass incapsula robot checks when using requests.',
    include_package_data=True
)


================================================
FILE: tests/__init__.py
================================================


================================================
FILE: tests/helpers.py
================================================
from requests import Response


def make_response(url, content, status_code=200):
    response = Response()
    response.url = url
    response._content = content
    response.status_code = status_code
    return response


================================================
FILE: tests/test_IframeResourceParser.py
================================================
from __future__ import absolute_import

import unittest

from tests.helpers import make_response
from incapsula import IframeResourceParser


class TestIframeResourceParserReCaptcha(unittest.TestCase):

    body = """
    <div class="container">
        <div class="container-inner">
            <div class="main">
                <div class="main-inner">
                    <div class="error-headline">
                        <div class="headline-inner">
                            <h1>dollargeneral.com -</h1>
                            <p>Additional security check is required</p>
                        </div>
                    </div>
                    <div class="error-content">
                        <div class="captcha">
                            <div class="form_container">
                                <div class="g-recaptcha" data-sitekey="6Ld38BkUAAAAAPATwit3FXvga1PI6iVTb6zgXw62" data-callback="onCaptchaFinished" ></div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="powered-by">
                    <span class="text">Powered by</span>
                    <a href="//www.incapsula.com/why-am-i-seeing-this-page.html?src=23&amp;utm_source=blockingpages" target="_blank" class="copyrights">Incapsula</a>
                </div>

                <div class="info-text">
                    <strong>What is this page?</strong>
                    <p>The web site you are visiting is protected and accelerated by Incapsula. Your computer might have been infected by some kind of malware and flagged by Incapsula network. This page is presented by Incapsula to verify that a human is behind the traffic to this site and not malicious software.</p>

                    <strong>What should i do?</strong>
                    <p>Simply enter the two words in the image above to pass the security check, once you do that we will remember your answer and will not show this page again. You should run a virus and malware scan on your computer to remove any infection.</p>
                </div>
            </div>
        </div>
    </div>
    """

    def setUp(self):
        self.parser = IframeResourceParser(make_response('http://dollargeneral.com/iframe-fake-url', self.body))

    def test_is_blocked(self):
        self.assertTrue(self.parser.is_blocked())


================================================
FILE: tests/whoscored/__init__.py
================================================


================================================
FILE: tests/whoscored/index.html
================================================
<!-- Index from whoscored.com which is blocked by an older version of incapsula. -->
<html>
<head>
    <META NAME="robots" CONTENT="noindex,nofollow">
    <script>
        (function () {
            function getSessionCookies() {
                var cookieArray = new Array();
                var cName = /^\s?incap_ses_/;
                var c = document.cookie.split(";");
                for (var i = 0; i < c.length; i++) {
                    var key = c[i].substr(0, c[i].indexOf("="));
                    var value = c[i].substr(c[i].indexOf("=") + 1, c[i].length);
                    if (cName.test(key)) {
                        cookieArray[cookieArray.length] = value
                    }
                }
                return cookieArray
            }

            function setIncapCookie(vArray) {
                var res;
                try {
                    var cookies = getSessionCookies();
                    var digests = new Array(cookies.length);
                    for (var i = 0; i < cookies.length; i++) {
                        digests[i] = simpleDigest((vArray) + cookies[i])
                    }
                    res = vArray + ",digest=" + (digests.join())
                } catch (e) {
                    res = vArray + ",digest=" + (encodeURIComponent(e.toString()))
                }
                createCookie("___utmvc", res, 20)
            }

            function simpleDigest(mystr) {
                var res = 0;
                for (var i = 0; i < mystr.length; i++) {
                    res += mystr.charCodeAt(i)
                }
                return res
            }

            function createCookie(name, value, seconds) {
                var expires = "";
                if (seconds) {
                    var date = new Date();
                    date.setTime(date.getTime() + (seconds * 1000));
                    var expires = "; expires=" + date.toGMTString()
                }
                document.cookie = name + "=" + value + expires + "; path=/"
            }

            function test(o) {
                var res = "";
                var vArray = new Array();
                for (var j = 0; j < o.length; j++) {
                    var test = o[j][0];
                    switch (o[j][1]) {
                        case"exists":
                            try {
                                if (typeof(eval(test)) != "undefined") {
                                    vArray[vArray.length] = encodeURIComponent(test + "=true")
                                } else {
                                    vArray[vArray.length] = encodeURIComponent(test + "=false")
                                }
                            } catch (e) {
                                vArray[vArray.length] = encodeURIComponent(test + "=false")
                            }
                            break;
                        case"value":
                            try {
                                try {
                                    res = eval(test);
                                    if (typeof(res) === "undefined") {
                                        vArray[vArray.length] = encodeURIComponent(test + "=undefined")
                                    } else if (res === null) {
                                        vArray[vArray.length] = encodeURIComponent(test + "=null")
                                    } else {
                                        vArray[vArray.length] = encodeURIComponent(test + "=" + res.toString())
                                    }
                                } catch (e) {
                                    vArray[vArray.length] = encodeURIComponent(test + "=cannot evaluate");
                                    break
                                }
                                break
                            } catch (e) {
                                vArray[vArray.length] = encodeURIComponent(test + "=" + e)
                            }
                        case"plugin_extentions":
                            try {
                                var extentions = [];
                                try {
                                    i = extentions.indexOf("i")
                                } catch (e) {
                                    vArray[vArray.length] = encodeURIComponent("plugin_ext=indexOf is not a function");
                                    break
                                }
                                try {
                                    var num = navigator.plugins.length;
                                    if (num == 0 || num == null) {
                                        vArray[vArray.length] = encodeURIComponent("plugin_ext=no plugins");
                                        break
                                    }
                                } catch (e) {
                                    vArray[vArray.length] = encodeURIComponent("plugin_ext=cannot evaluate");
                                    break
                                }
                                for (var i = 0; i < navigator.plugins.length; i++) {
                                    if (typeof(navigator.plugins[i]) == "undefined") {
                                        vArray[vArray.length] = encodeURIComponent("plugin_ext=plugins[i] is undefined");
                                        break
                                    }
                                    var filename = navigator.plugins[i].filename;
                                    var ext = "no extention";
                                    if (typeof(filename) == "undefined") {
                                        ext = "filename is undefined"
                                    } else if (filename.split(".").length > 1) {
                                        ext = filename.split('.').pop()
                                    }
                                    if (extentions.indexOf(ext) < 0) {
                                        extentions.push(ext)
                                    }
                                }
                                for (i = 0; i < extentions.length; i++) {
                                    vArray[vArray.length] = encodeURIComponent("plugin_ext=" + extentions[i])
                                }
                            } catch (e) {
                                vArray[vArray.length] = encodeURIComponent("plugin_ext=" + e)
                            }
                            break
                    }
                }
                vArray = vArray.join();
                return vArray
            }

            var o = [["navigator", "exists"], ["navigator.vendor", "value"], ["navigator.appName", "value"], ["navigator.plugins.length==0", "value"], ["navigator.platform", "value"], ["navigator.webdriver", "value"], ["platform", "plugin_extentions"], ["ActiveXObject", "exists"], ["webkitURL", "exists"], ["_phantom", "exists"], ["callPhantom", "exists"], ["chrome", "exists"], ["yandex", "exists"], ["opera", "exists"], ["opr", "exists"], ["safari", "exists"], ["awesomium", "exists"], ["puffinDevice", "exists"], ["__nightmare", "exists"], ["_Selenium_IDE_Recorder", "exists"], ["document.__webdriver_script_fn", "exists"], ["document.$cdc_asdjflasutopfhvcZLmcfl_", "exists"], ["process.version", "exists"], ["navigator.cpuClass", "exists"], ["navigator.oscpu", "exists"], ["navigator.connection", "exists"], ["window.outerWidth==0", "value"], ["window.outerHeight==0", "value"], ["window.WebGLRenderingContext", "exists"], ["document.documentMode", "value"], ["eval.toString().length", "value"]];
            try {
                setIncapCookie(test(o));
                document.createElement("img").src = "/_Incapsula_Resource?SWKMTFSR=1&e=" + Math.random()
            } catch (e) {
                img = document.createElement("img");
                img.src = "/_Incapsula_Resource?SWKMTFSR=1&e=" + e
            }
        })();
    </script>
    <script>
        (function () {
            var z = "";
            var b = "7472797B766172207868723B76617220743D6E6577204461746528292E67657454696D6528293B766172207374617475733D227374617274223B7661722074696D696E673D6E65772041727261792833293B77696E646F772E6F6E756E6C6F61643D66756E6374696F6E28297B74696D696E675B325D3D22723A222B286E6577204461746528292E67657454696D6528292D74293B646F63756D656E742E637265617465456C656D656E742822696D6722292E7372633D222F5F496E63617073756C615F5265736F757263653F4553324C555243543D363726743D373826643D222B656E636F6465555249436F6D706F6E656E74287374617475732B222028222B74696D696E672E6A6F696E28292B222922297D3B69662877696E646F772E584D4C4874747052657175657374297B7868723D6E657720584D4C48747470526571756573747D656C73657B7868723D6E657720416374697665584F626A65637428224D6963726F736F66742E584D4C4854545022297D7868722E6F6E726561647973746174656368616E67653D66756E6374696F6E28297B737769746368287868722E72656164795374617465297B6361736520303A7374617475733D6E6577204461746528292E67657454696D6528292D742B223A2072657175657374206E6F7420696E697469616C697A656420223B627265616B3B6361736520313A7374617475733D6E6577204461746528292E67657454696D6528292D742B223A2073657276657220636F6E6E656374696F6E2065737461626C6973686564223B627265616B3B6361736520323A7374617475733D6E6577204461746528292E67657454696D6528292D742B223A2072657175657374207265636569766564223B627265616B3B6361736520333A7374617475733D6E6577204461746528292E67657454696D6528292D742B223A2070726F63657373696E672072657175657374223B627265616B3B6361736520343A7374617475733D22636F6D706C657465223B74696D696E675B315D3D22633A222B286E6577204461746528292E67657454696D6528292D74293B6966287868722E7374617475733D3D323030297B706172656E742E6C6F636174696F6E2E72656C6F616428297D627265616B7D7D3B74696D696E675B305D3D22733A222B286E6577204461746528292E67657454696D6528292D74293B7868722E6F70656E2822474554222C222F5F496E63617073756C615F5265736F757263653F535748414E45444C3D353830353233353534373331373739393237392C31333939363439393632303537303139383231342C313536343932363633303635393535393036332C343133383138222C66616C7365293B7868722E73656E64286E756C6C297D63617463682863297B7374617475732B3D6E6577204461746528292E67657454696D6528292D742B2220696E6361705F6578633A20222B633B646F63756D656E742E637265617465456C656D656E742822696D6722292E7372633D222F5F496E63617073756C615F5265736F757263653F4553324C555243543D363726743D373826643D222B656E636F6465555249436F6D706F6E656E74287374617475732B222028222B74696D696E672E6A6F696E28292B222922297D3B";
            for (var i = 0; i < b.length; i += 2) {
                z = z + parseInt(b.substring(i, i + 2), 16) + ",";
            }
            z = z.substring(0, z.length - 1);
            eval(eval('String.fromCharCode(' + z + ')'));
        })();
    </script>
</head>
<body>
<iframe style="display:none;visibility:hidden;" src="//content.incapsula.com/jsTest.html" id="gaIframe"></iframe>
</body>
</html>

================================================
FILE: tests/whoscored/jsTest.html
================================================
<html>
	<head>
		<script type="text/javascript">

		  var _gaq = _gaq || [];
		  _gaq.push(['_setAccount', 'UA-31107342-1']);
		  _gaq.push(['_setDomainName', 'incapsula.com']);
		  _gaq.push(['_trackPageview']);

		  (function() {
			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		  })();

		</script>		
	</head>
	<body>
		Hello, I am a java script test analytics page
	</body>
</html>

================================================
FILE: tests/whoscored/test_whoscored.py
================================================
from __future__ import absolute_import

import os
import unittest

from bs4 import BeautifulSoup

from incapsula import WebsiteResourceParser, IframeResourceParser
from tests.helpers import make_response


test_root = os.path.dirname(os.path.abspath(__file__))
blocked_index = os.path.join(test_root, 'index.html')
unblocked_index = os.path.join(test_root, 'whoscored-index_unblocked.html')
iframe = os.path.join(test_root, 'jsTest.html')


class TestWhoScoredIndexBlocked(unittest.TestCase):

    def setUp(self):
        with open(blocked_index, 'rb') as f:
            content = f.read()
        self.parser = WebsiteResourceParser(make_response('http://whoscored.com', content))

    def test_robots_meta(self):
        robots_meta = BeautifulSoup('<META NAME="robots" CONTENT="noindex,nofollow">', 'html.parser').find('meta')
        self.assertEqual(self.parser.robots_meta, robots_meta)

    def test_incapsula_iframe(self):
        incapsula_iframe = BeautifulSoup('<iframe style="display:none;visibility:hidden;" src="//content.incapsula.com/jsTest.html" id="gaIframe"></iframe>', 'html.parser').find('iframe')
        self.assertEqual(self.parser.incapsula_iframe, incapsula_iframe)

    def test_incapsula_iframe_url(self):
        url = 'http://content.incapsula.com/jsTest.html'
        self.assertEqual(self.parser.incapsula_iframe_url, url)

    def test_is_blocked(self):
        self.assertTrue(self.parser.is_blocked())


class TestWhoScoredIndexUnblocked(unittest.TestCase):

    def setUp(self):
        with open(unblocked_index, 'rb') as f:
            content = f.read()
        self.parser = WebsiteResourceParser(make_response('http://whoscored.com', content))

    # We don't care about whether the iframe or robots tag exist in this case as long as is_blocked is false.

    def test_is_blocked(self):
        self.assertFalse(self.parser.is_blocked())


class TestWhoScoredIframeContentsNoRecaptcha(unittest.TestCase):

    def setUp(self):
        with open(iframe, 'rb') as f:
            content = f.read()
        self.parser = IframeResourceParser(make_response('http://content.incapsula.com/jsTest.html', content))

    def test_is_blocked(self):
        self.assertFalse(self.parser.is_blocked())


================================================
FILE: tests/whoscored/whoscored-index_unblocked.html
================================================


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>
    <meta name="apple-itunes-app" content="app-id=940048063">
    <!-- #220 -->
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge"><script type="text/javascript">window.NREUM||(NREUM={});NREUM.info = {"beacon":"bam.nr-data.net","errorBeacon":"bam.nr-data.net","licenseKey":"47235c2cb5","applicationID":"15883457","transactionName":"MVBVZhMHDEcCV0BdCwgaYkAISTBbDEA=","queueTime":0,"applicationTime":1,"agent":"","atts":""}</script><script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function(e,n,t){function r(t){if(!n[t]){var o=n[t]={exports:{}};e[t][0].call(o.exports,function(n){var o=e[t][1][n];return r(o||n)},o,o.exports)}return n[t].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<t.length;o++)r(t[o]);return r}({1:[function(e,n,t){function r(){}function o(e,n,t){return function(){return i(e,[c.now()].concat(u(arguments)),n?null:this,t),n?void 0:this}}var i=e("handle"),a=e(2),u=e(3),f=e("ee").get("tracer"),c=e("loader"),s=NREUM;"undefined"==typeof window.newrelic&&(newrelic=s);var p=["setPageViewName","setCustomAttribute","setErrorHandler","finished","addToTrace","inlineHit","addRelease"],d="api-",l=d+"ixn-";a(p,function(e,n){s[n]=o(d+n,!0,"api")}),s.addPageAction=o(d+"addPageAction",!0),s.setCurrentRouteName=o(d+"routeName",!0),n.exports=newrelic,s.interaction=function(){return(new r).get()};var m=r.prototype={createTracer:function(e,n){var t={},r=this,o="function"==typeof n;return i(l+"tracer",[c.now(),e,t],r),function(){if(f.emit((o?"":"no-")+"fn-start",[c.now(),r,o],t),o)try{return n.apply(this,arguments)}finally{f.emit("fn-end",[c.now()],t)}}}};a("setName,setAttribute,save,ignore,onEnd,getContext,end,get".split(","),function(e,n){m[n]=o(l+n)}),newrelic.noticeError=function(e){"string"==typeof e&&(e=new Error(e)),i("err",[e,c.now()])}},{}],2:[function(e,n,t){function r(e,n){var t=[],r="",i=0;for(r in e)o.call(e,r)&&(t[i]=n(r,e[r]),i+=1);return t}var o=Object.prototype.hasOwnProperty;n.exports=r},{}],3:[function(e,n,t){function r(e,n,t){n||(n=0),"undefined"==typeof t&&(t=e?e.length:0);for(var r=-1,o=t-n||0,i=Array(o<0?0:o);++r<o;)i[r]=e[n+r];return i}n.exports=r},{}],4:[function(e,n,t){n.exports={exists:"undefined"!=typeof window.performance&&window.performance.timing&&"undefined"!=typeof window.performance.timing.navigationStart}},{}],ee:[function(e,n,t){function r(){}function o(e){function n(e){return e&&e instanceof r?e:e?f(e,u,i):i()}function t(t,r,o,i){if(!d.aborted||i){e&&e(t,r,o);for(var a=n(o),u=m(t),f=u.length,c=0;c<f;c++)u[c].apply(a,r);var p=s[y[t]];return p&&p.push([b,t,r,a]),a}}function l(e,n){v[e]=m(e).concat(n)}function m(e){return v[e]||[]}function w(e){return p[e]=p[e]||o(t)}function g(e,n){c(e,function(e,t){n=n||"feature",y[t]=n,n in s||(s[n]=[])})}var v={},y={},b={on:l,emit:t,get:w,listeners:m,context:n,buffer:g,abort:a,aborted:!1};return b}function i(){return new r}function a(){(s.api||s.feature)&&(d.aborted=!0,s=d.backlog={})}var u="nr@context",f=e("gos"),c=e(2),s={},p={},d=n.exports=o();d.backlog=s},{}],gos:[function(e,n,t){function r(e,n,t){if(o.call(e,n))return e[n];var r=t();if(Object.defineProperty&&Object.keys)try{return Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!1}),r}catch(i){}return e[n]=r,r}var o=Object.prototype.hasOwnProperty;n.exports=r},{}],handle:[function(e,n,t){function r(e,n,t,r){o.buffer([e],r),o.emit(e,n,t)}var o=e("ee").get("handle");n.exports=r,r.ee=o},{}],id:[function(e,n,t){function r(e){var n=typeof e;return!e||"object"!==n&&"function"!==n?-1:e===window?0:a(e,i,function(){return o++})}var o=1,i="nr@id",a=e("gos");n.exports=r},{}],loader:[function(e,n,t){function r(){if(!x++){var e=h.info=NREUM.info,n=d.getElementsByTagName("script")[0];if(setTimeout(s.abort,3e4),!(e&&e.licenseKey&&e.applicationID&&n))return s.abort();c(y,function(n,t){e[n]||(e[n]=t)}),f("mark",["onload",a()+h.offset],null,"api");var t=d.createElement("script");t.src="https://"+e.agent,n.parentNode.insertBefore(t,n)}}function o(){"complete"===d.readyState&&i()}function i(){f("mark",["domContent",a()+h.offset],null,"api")}function a(){return E.exists&&performance.now?Math.round(performance.now()):(u=Math.max((new Date).getTime(),u))-h.offset}var u=(new Date).getTime(),f=e("handle"),c=e(2),s=e("ee"),p=window,d=p.document,l="addEventListener",m="attachEvent",w=p.XMLHttpRequest,g=w&&w.prototype;NREUM.o={ST:setTimeout,SI:p.setImmediate,CT:clearTimeout,XHR:w,REQ:p.Request,EV:p.Event,PR:p.Promise,MO:p.MutationObserver};var v=""+location,y={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",agent:"js-agent.newrelic.com/nr-1039.min.js"},b=w&&g&&g[l]&&!/CriOS/.test(navigator.userAgent),h=n.exports={offset:u,now:a,origin:v,features:{},xhrWrappable:b};e(1),d[l]?(d[l]("DOMContentLoaded",i,!1),p[l]("load",r,!1)):(d[m]("onreadystatechange",o),p[m]("onload",r)),f("mark",["firstbyte",u],null,"api");var x=0,E=e(4)},{}]},{},["loader"]);</script><script type="text/javascript">window.NREUM||(NREUM={});NREUM.info = {"beacon":"bam.nr-data.net","errorBeacon":"bam.nr-data.net","licenseKey":"47235c2cb5","applicationID":"15883457","transactionName":"MVBVZhMHDEcCV0BdCwgaemQiSSpbDlF3WwoSR1heDQMQGypaUFEc","queueTime":0,"applicationTime":550,"agent":"","atts":""}</script><script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function(e,n,t){function r(t){if(!n[t]){var o=n[t]={exports:{}};e[t][0].call(o.exports,function(n){var o=e[t][1][n];return r(o||n)},o,o.exports)}return n[t].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<t.length;o++)r(t[o]);return r}({1:[function(e,n,t){function r(){}function o(e,n,t){return function(){return i(e,[c.now()].concat(u(arguments)),n?null:this,t),n?void 0:this}}var i=e("handle"),a=e(2),u=e(3),f=e("ee").get("tracer"),c=e("loader"),s=NREUM;"undefined"==typeof window.newrelic&&(newrelic=s);var p=["setPageViewName","setCustomAttribute","setErrorHandler","finished","addToTrace","inlineHit","addRelease"],d="api-",l=d+"ixn-";a(p,function(e,n){s[n]=o(d+n,!0,"api")}),s.addPageAction=o(d+"addPageAction",!0),s.setCurrentRouteName=o(d+"routeName",!0),n.exports=newrelic,s.interaction=function(){return(new r).get()};var m=r.prototype={createTracer:function(e,n){var t={},r=this,o="function"==typeof n;return i(l+"tracer",[c.now(),e,t],r),function(){if(f.emit((o?"":"no-")+"fn-start",[c.now(),r,o],t),o)try{return n.apply(this,arguments)}finally{f.emit("fn-end",[c.now()],t)}}}};a("setName,setAttribute,save,ignore,onEnd,getContext,end,get".split(","),function(e,n){m[n]=o(l+n)}),newrelic.noticeError=function(e){"string"==typeof e&&(e=new Error(e)),i("err",[e,c.now()])}},{}],2:[function(e,n,t){function r(e,n){var t=[],r="",i=0;for(r in e)o.call(e,r)&&(t[i]=n(r,e[r]),i+=1);return t}var o=Object.prototype.hasOwnProperty;n.exports=r},{}],3:[function(e,n,t){function r(e,n,t){n||(n=0),"undefined"==typeof t&&(t=e?e.length:0);for(var r=-1,o=t-n||0,i=Array(o<0?0:o);++r<o;)i[r]=e[n+r];return i}n.exports=r},{}],4:[function(e,n,t){n.exports={exists:"undefined"!=typeof window.performance&&window.performance.timing&&"undefined"!=typeof window.performance.timing.navigationStart}},{}],ee:[function(e,n,t){function r(){}function o(e){function n(e){return e&&e instanceof r?e:e?f(e,u,i):i()}function t(t,r,o,i){if(!d.aborted||i){e&&e(t,r,o);for(var a=n(o),u=m(t),f=u.length,c=0;c<f;c++)u[c].apply(a,r);var p=s[y[t]];return p&&p.push([b,t,r,a]),a}}function l(e,n){v[e]=m(e).concat(n)}function m(e){return v[e]||[]}function w(e){return p[e]=p[e]||o(t)}function g(e,n){c(e,function(e,t){n=n||"feature",y[t]=n,n in s||(s[n]=[])})}var v={},y={},b={on:l,emit:t,get:w,listeners:m,context:n,buffer:g,abort:a,aborted:!1};return b}function i(){return new r}function a(){(s.api||s.feature)&&(d.aborted=!0,s=d.backlog={})}var u="nr@context",f=e("gos"),c=e(2),s={},p={},d=n.exports=o();d.backlog=s},{}],gos:[function(e,n,t){function r(e,n,t){if(o.call(e,n))return e[n];var r=t();if(Object.defineProperty&&Object.keys)try{return Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!1}),r}catch(i){}return e[n]=r,r}var o=Object.prototype.hasOwnProperty;n.exports=r},{}],handle:[function(e,n,t){function r(e,n,t,r){o.buffer([e],r),o.emit(e,n,t)}var o=e("ee").get("handle");n.exports=r,r.ee=o},{}],id:[function(e,n,t){function r(e){var n=typeof e;return!e||"object"!==n&&"function"!==n?-1:e===window?0:a(e,i,function(){return o++})}var o=1,i="nr@id",a=e("gos");n.exports=r},{}],loader:[function(e,n,t){function r(){if(!x++){var e=h.info=NREUM.info,n=d.getElementsByTagName("script")[0];if(setTimeout(s.abort,3e4),!(e&&e.licenseKey&&e.applicationID&&n))return s.abort();c(y,function(n,t){e[n]||(e[n]=t)}),f("mark",["onload",a()+h.offset],null,"api");var t=d.createElement("script");t.src="https://"+e.agent,n.parentNode.insertBefore(t,n)}}function o(){"complete"===d.readyState&&i()}function i(){f("mark",["domContent",a()+h.offset],null,"api")}function a(){return E.exists&&performance.now?Math.round(performance.now()):(u=Math.max((new Date).getTime(),u))-h.offset}var u=(new Date).getTime(),f=e("handle"),c=e(2),s=e("ee"),p=window,d=p.document,l="addEventListener",m="attachEvent",w=p.XMLHttpRequest,g=w&&w.prototype;NREUM.o={ST:setTimeout,SI:p.setImmediate,CT:clearTimeout,XHR:w,REQ:p.Request,EV:p.Event,PR:p.Promise,MO:p.MutationObserver};var v=""+location,y={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",agent:"js-agent.newrelic.com/nr-1039.min.js"},b=w&&g&&g[l]&&!/CriOS/.test(navigator.userAgent),h=n.exports={offset:u,now:a,origin:v,features:{},xhrWrappable:b};e(1),d[l]?(d[l]("DOMContentLoaded",i,!1),p[l]("load",r,!1)):(d[m]("onreadystatechange",o),p[m]("onload",r)),f("mark",["firstbyte",u],null,"api");var x=0,E=e(4)},{}]},{},["loader"]);</script>
    <meta name="p:domain_verify" content="353f79d2d02f885b1a54bBffe7ab9758f">
    
    
    <meta name="title" content="Football Statistics | Football Live Scores | WhoScored.com">
    <meta name="description" content="WhoScored brings you live scores, match results and player ratings from the top football leagues and competitions.">
    <meta name="keywords" content="football, football results, football tables, football fixtures, football statistics, football teams, football players, football news, football blog, football previews, football formations, football tactics, soccer, soccer results, soccer tables, soccer fixtures, soccer statistics, soccer teams, soccer players, soccer news, soccer blog, soccer previews, soccer formations, soccer tactics, player ratings">


    <title>
        
    
    Football Statistics | Football Live Scores | WhoScored.com


    </title>
    <link rel="icon" type="image/gif" href="https://d2zywfiolv4f83.cloudfront.net/img/favicon.gif">
    <link rel="stylesheet" type="text/css" href="https://d2zywfiolv4f83.cloudfront.net/css/ws-css.css?v=1494512676">

    
    
    <link rel="alternate" type="application/rss+xml" title="The latest previews and articles from WhoScored.com" href="/Rss">
    
    <link rel="alternate" hreflang="en" href="https://www.whoscored.com/">
    
    <link rel="alternate" hreflang="es" href="https://es.whoscored.com/">
    
    <link rel="alternate" hreflang="tr" href="https://tr.whoscored.com/">
    
    <link rel="alternate" hreflang="it" href="https://it.whoscored.com/">
    
    <link rel="alternate" hreflang="fr" href="https://fr.whoscored.com/">
    
    <link rel="alternate" hreflang="ar" href="https://sport360.whoscored.com/">
    
    <link rel="alternate" hreflang="ru" href="https://ru.whoscored.com/">
    

    <script type="text/javascript">
        var gDomain = null;
        var gLocalizationResourcesVersion = '636301869824100000';
        var gCurrentLocale = 'en';
        var gIsAssetsSourceLoaded = false;
        var gImageUrl = 'https://d2zywfiolv4f83.cloudfront.net/img/';
        var gUtcSeed = new Date(2017, 5, 17, 6, 6, 34);
        var gLoginUrl = 'https://www.whoscored.com/Accounts/Login/?originalUrl=http://www.whoscored.com/';
        var gIdentified = false;
        var gJsCurrentVersion = '1494339304';
        
        var gUtcOffSetNow =  60;
    </script>

    <script type="text/javascript" src="https://d2zywfiolv4f83.cloudfront.net/js/ws-js.js?v=1494339304"></script>


    <script type="text/javascript">

        WS.Localizer.init(gCurrentLocale, gLocalizationResourcesVersion);
        //moment.locale(gCurrentLocale);
        //$.datepicker.setDefaults($.datepicker.regional[gCurrentLocale]);
    </script>

    <script type="text/javascript">

        NG.Clock.init(gUtcSeed, gUtcOffSetNow);
    </script>

    <script type="text/javascript">
        NG.GA.init();
        NG.GA.trackPage();
    </script>
    
    <script type="text/javascript">
        $.ajaxSetup({
            headers: { 'Model-last-Mode': 'NJjTsuJ/H/ZGZ98ugDMpiIWevqfHvOsSNvUPN6i1i+E=' }
        });
    </script>
    
    

    <script type="text/javascript">
        $('#home-menuitem').addClass('selected');

        $(document).ready(function () {
            ChangeAllOddsToFractional();
        });
    </script>

    <script type="text/javascript">
                if (!window.gaModules) {
                    window.gaModules = {};
                }
                
                window.gaModules['ga-home'] = true;
            </script>





    
    
    
    
<script type='text/javascript'>
    var wsAds = { pageId: 'home', keyId: '', matchId: '1150206', subdomain:'www', ws_matchNAME: '' };
    var ws_matchID = '1150206';
</script>

<script type="text/javascript">
    var AD_UNITS_TOGGLE_ON = ["WS_1x1", "WS_2x2", "WS_300x150", "WS_300x250", "WS_300x60", "WS_300x600", "WS_668x150", "WS_728x90", "WS_970x250", "WS_668x70"];
</script>

<script type="text/javascript" src="//static.amp.services/clients/WhoScored/whoscored.js"></script>

    
    <meta name="apple-mobile-web-app-title" content="WhoScored.com">
    <link rel="apple-touch-icon" href="https://d2zywfiolv4f83.cloudfront.net/img/Mobile/Icon.png">
    <link rel="apple-touch-icon" sizes="72x72" href="https://d2zywfiolv4f83.cloudfront.net/img/Mobile/Icon-72.png">
    <link rel="apple-touch-icon" sizes="114x114" href="https://d2zywfiolv4f83.cloudfront.net/img/Mobile/Icon@2x.png">
    <link rel="apple-touch-icon" sizes="144x144" href="https://d2zywfiolv4f83.cloudfront.net/img/Mobile/Icon-72@2x.png">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <meta name="apple-itunes-app" content="app-id=940048063">

</head>

<body data-locale-code="en">

    <div class="cookie-disclaimer">
        We use cookies to give you the best experience on our website. By using our site, you agree to our use of cookies. 
        <a href="/TermsOfUse" target="_blank" style="margin-left: 2px">Learn more</a> <a href="#" id="agreed-too-cookies">OK</a>
    </div>

    <div id="locale-edition-exists">
        <div id="locale-edition-exists-message-text"></div>
        <a href="#" class="btn btn-close">X</a>
        <a href="#" class="btn btn-ok iconize iconize-icon-right ui-state-transparent-default ui-state-active rc-r">

            <span class="ui-icon ui-icon-circle-arrow-e"></span>
        </a>
    </div>

    
    
    
<!-- /79450181/WS_970x250 -->
  <div id='WS_970x250' style="text-align: center;">
    <script type='text/javascript'>
      googletag.cmd.push(function() { googletag.display('WS_970x250'); });
    </script>
  </div>



    <div id="user-bar-wrapper">
        
<div id="user-bar">
    <div id="clock">
        <span id="date"></span>
        <span id="time" class="rc-t"></span>
        <a href="/Accounts/#timeZoneId" id="tz" class="iconize iconize-icon-right ui-state-transparent-default ui-state-active rc">
            <span class="ui-icon ui-icon-circle-arrow-e"></span>
        </a>
    </div>

    <div id="locale-switcher">
        <span style="display: inline-block; vertical-align: middle;">Language:</span>
        
        <a href="https://www.whoscored.com/" 
            class="locale-flag locale-en selected"></a>
        
        <a href="https://es.whoscored.com/" 
            class="locale-flag locale-es "></a>
        
        <a href="https://tr.whoscored.com/" 
            class="locale-flag locale-tr "></a>
        
        <a href="https://it.whoscored.com/" 
            class="locale-flag locale-it "></a>
        
        <a href="https://fr.whoscored.com/" 
            class="locale-flag locale-fr "></a>
        
        <a href="https://sport360.whoscored.com/" 
            class="locale-flag locale-ar "></a>
        
        <a href="https://ru.whoscored.com/" 
            class="locale-flag locale-ru "></a>
        
    </div>

    <div id="accountInfoContainer">
        <iframe id="accountInfoFrame" scrolling="no" frameborder="0" src="" allowtransparency="true"></iframe>
    </div>

    

    <div data-identity="Users.Security.GuestIdentity"></div>
    
    <script type="text/javascript">


        var loggedInUsername = '';

        $('#accountInfoFrame').load(function () {

            function isValidUrl(url) {

                var controlUrl = url ? '?originalUrl=' + url.toLowerCase().substr(getLastIndexOfProtocolFromUrl(url)) : '';
                return !(-1 < controlUrl.indexOf('/register') || -1 < controlUrl.indexOf('/login') || -1 < controlUrl.indexOf('/verifyemail'));
            }

            function cleanUrl(url) {

                return isValidUrl(url)
                    ? (url ? '?originalUrl=' + url.substr(getLastIndexOfProtocolFromUrl(url)) : '')
                    : '';
            }

            function getLastIndexOfProtocolFromUrl(url) {

                if (-1 < url.indexOf('http://')) {

                    return url.lastIndexOf('http://');
                }

                if (-1 < url.indexOf('https://')) {

                    return url.lastIndexOf('https://');
                }

                return '';
            }

            var contents = $(this).contents(),
                originalUrl = cleanUrl(parent.location.toString());

            contents.find("#login").click(function (e) {
                e.preventDefault();
                parent.location = $(this).attr('href') + originalUrl;
            });

            contents.find("#register").click(function (e) {
                e.preventDefault();
                parent.location = $(this).attr('href') + originalUrl;
            });

            contents.find("#logout").click(function (e) {
                e.preventDefault();
                parent.location = $(this).attr('href') + originalUrl;
            });

        }).attr('src', '/Accounts/Info');

        $('body').on('accountControls-click', function (e, username) {
            $('#accountControlsDropdown').toggle();
            loggedInUsername = username;
        });
    </script>
</div>

    </div>
    <div id="header-wrapper">
        <div id="header-content-wrapper">
            <div id="header">
                <a id="logo" href="/">
                    <img alt="WhoScored.com" src="https://d2zywfiolv4f83.cloudfront.net/img/logo.png">
                </a>
                <div id="head-ad">
                    
    
    
  <!-- /79450181/WS_728x90 -->
  <div id='WS_728x90'>
    <script type='text/javascript'>
      googletag.cmd.push(function() { googletag.display('WS_728x90'); });
    </script>
  </div>


                </div>
            </div>
            <div id="main-navigation">
                <ul>
                    <li><a id="home-menuitem" href="/" title="home_tt">
                        <img src="https://d2zywfiolv4f83.cloudfront.net/img/homeicon.png" alt="" style="margin-top: 0.1em;"></a></li>
                    <li><a id="livescores-menuitem" href="/LiveScores">Live Scores</a></li>
                    <li><a id="statistics-menuitem" href="/Statistics">Statistics</a></li>
                    <li><a id="comparison-menuitem" href="/PlayerComparison">Comparison</a></li>
                    <li><a id="previews-menuitem" href="/Previews">Previews</a></li>
                    <li><a id="editorial-menuitem" href="/Editorial">News</a></li>
                    <li><a id="facts-menuitem" href="/Betting/Facts">Top Facts</a></li>
                    <li><a id="livestream-menuitem" href="/LiveScores#livestream">Live Stream</a></li>
                </ul>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            WS.Clock.init(NG.Clock);
        });
    </script>
    <div id="layout-wrapper">
        
    

<div id="tournament-nav-popup" class="rc-b" style="display:none;">
    <div class="option-group">
	    <ul id="tournament-groups" class="tabs">
            <li><label>Browse: </label></li>
		    <li><a href="#favourites" class="iconize iconize-icon-right ui-state-transparent-default"><span class="ui-icon ui-icon-triangle-1-s"></span><span class="text">My Favourites</span></a></li>
            <li><a href="#popular" class="iconize iconize-icon-right ui-state-transparent-default"><span class="ui-icon ui-icon-triangle-1-s"></span><span class="text">Detailed Tournaments</span></a></li>
            <li><a href="#domestic" class="iconize iconize-icon-right ui-state-transparent-default"><span class="ui-icon ui-icon-triangle-1-s"></span><span class="text">All Leagues & Cups</span></a></li>
            <li><a href="#international" class="iconize iconize-icon-right ui-state-transparent-default"><span class="ui-icon ui-icon-triangle-1-s"></span><span class="text">International Cups</span></a></li>
	    </ul>

        <div id="search-area">
            <form id="search-form" method="get" action="/Search/">
                <input id="search-box" type="text" class="idle rc-l" name="t" value="Search tournaments, teams and players" onfocus="$(this).val('').removeClass('idle')">
                <div id="search-button" class="iconize ui-state-transparent-default rc-r" onclick="if ($('#search-box').hasClass('idle')) $('#search-box').val(''); $('#search-form').submit();">
                    <span class="ui-icon ui-icon-circle-arrow-e"></span>
                </div>
            </form>
        </div>
    </div>
    <div id="favourites" class="nav-region">
        
        <div id="my-favorites-note">Add your favourite leagues and cups here to access them quickly and see them on top in live scores.</div>
        <ul id="favorite-tournaments-list"></ul>
    </div>
    <div id="popular" class="nav-region">
        <ul id="popular-tournaments-list"><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/252/Tournaments/2/England-Premier-League" title="England">Premier League<span class="ui-icon country flg-gb-eng"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/108/Tournaments/5/Italy-Serie-A" title="Italy">Serie A<span class="ui-icon country flg-it"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/206/Tournaments/4/Spain-La-Liga" title="Spain">La Liga<span class="ui-icon country flg-es"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/81/Tournaments/3/Germany-Bundesliga" title="Germany">Bundesliga<span class="ui-icon country flg-de"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/74/Tournaments/22/France-Ligue-1" title="France">Ligue 1<span class="ui-icon country flg-fr"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/177/Tournaments/21/Portugal-Liga-NOS" title="Portugal">Liga NOS<span class="ui-icon country flg-pt"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/155/Tournaments/13/Netherlands-Eredivisie" title="Netherlands">Eredivisie<span class="ui-icon country flg-nl"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/182/Tournaments/77/Russia-Premier-League" title="Russia">Premier League<span class="ui-icon country flg-ru"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/31/Tournaments/95/Brazil-Brasileirão" title="Brazil">Brasileirão<span class="ui-icon country flg-br"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/233/Tournaments/85/USA-Major-League-Soccer" title="USA">Major League Soccer<span class="ui-icon country flg-us"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/225/Tournaments/17/Turkey-Super-Lig" title="Turkey">Super Lig<span class="ui-icon country flg-tr"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/252/Tournaments/7/England-Championship" title="England">Championship<span class="ui-icon country flg-gb-eng"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/11/Tournaments/68/Argentina-Primera-División" title="Argentina">Primera División<span class="ui-icon country flg-ar"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/45/Tournaments/162/China-Super-league" title="China">Super league<span class="ui-icon country flg-cn"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/165/Tournaments/41/Norway-Eliteserien" title="Norway">Eliteserien<span class="ui-icon country flg-no"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/212/Tournaments/40/Sweden-Allsvenskan" title="Sweden">Allsvenskan<span class="ui-icon country flg-se"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/81/Tournaments/6/Germany-Bundesliga-II" title="Germany">Bundesliga II<span class="ui-icon country flg-de"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/250/Tournaments/12/Europe-UEFA-Champions-League" title="Europe">UEFA Champions League<span class="ui-icon country flg-ceu"></span></a><div class="toolbar"></div></li><li class="hover-target"><a class="pt iconize iconize-icon-left" href="/Regions/250/Tournaments/30/Europe-UEFA-Europa-League" title="Europe">UEFA Europa League<span class="ui-icon country flg-ceu"></span></a><div class="toolbar"></div></li></ul>
    </div>
    <div id="domestic" class="nav-region">
        <div id="domestic-index">
        </div>
        <div id="domestic-regions">
        </div>
    </div>
    <div id="international" class="nav-region"></div>
</div>
<script type="text/javascript">
var allRegions = [{type:1, id:248, flg:'flg-caf', name: 'Africa', tournaments: [{id:290, url:'/Regions/248/Tournaments/290/Africa-CAF-Champions-League', name:'CAF Champions League'},{id:573, url:'/Regions/248/Tournaments/573/Africa-', name:''},{id:574, url:'/Regions/248/Tournaments/574/Africa-', name:''},{id:505, url:'/Regions/248/Tournaments/505/Africa-CECAFA-Senior-Challenge-Cup', name:'CECAFA Senior Challenge Cup'}]},
{type:0, id:3, flg:'flg-al', name: 'Albania', tournaments: [{id:618, url:'/Regions/3/Tournaments/618/Albania-Kupa-e-Shqipërisë', name:'Kupa e Shqipërisë'},{id:182, url:'/Regions/3/Tournaments/182/Albania-Kategoria-Superiore', name:'Kategoria Superiore'},{id:406, url:'/Regions/3/Tournaments/406/Albania-Kategoria-e-Parë', name:'Kategoria e Parë'},{id:451, url:'/Regions/3/Tournaments/451/Albania-Kategoria-Superiore-qualification', name:'Kategoria Superiore qualification'}]},
{type:0, id:4, flg:'flg-dz', name: 'Algeria', tournaments: [{id:281, url:'/Regions/4/Tournaments/281/Algeria-Championnat-National', name:'Championnat National'},{id:518, url:'/Regions/4/Tournaments/518/Algeria-', name:''}]},
{type:0, id:6, flg:'flg-ad', name: 'Andorra', tournaments: [{id:142, url:'/Regions/6/Tournaments/142/Andorra-1-Division', name:'1. Division'},{id:397, url:'/Regions/6/Tournaments/397/Andorra-2-Division', name:'2. Division'},{id:526, url:'/Regions/6/Tournaments/526/Andorra-', name:''},{id:619, url:'/Regions/6/Tournaments/619/Andorra-Andorra-Cup-1', name:'Andorra Cup 1'}]},
{type:0, id:7, flg:'flg-ao', name: 'Angola', tournaments: [{id:245, url:'/Regions/7/Tournaments/245/Angola-1-Division', name:'1. Division'}]},
{type:0, id:10, flg:'flg-ag', name: 'Antigua and Barbuda', tournaments: [{id:378, url:'/Regions/10/Tournaments/378/Antigua-and-Barbuda-Premier-Division', name:'Premier Division'}]},
{type:0, id:11, flg:'flg-ar', name: 'Argentina', tournaments: [{id:68, url:'/Regions/11/Tournaments/68/Argentina-Primera-División', name:'Primera División'},{id:317, url:'/Regions/11/Tournaments/317/Argentina-Primera-B-Nacional', name:'Primera B Nacional'},{id:489, url:'/Regions/11/Tournaments/489/Argentina-', name:''},{id:541, url:'/Regions/11/Tournaments/541/Argentina-', name:''},{id:504, url:'/Regions/11/Tournaments/504/Argentina-', name:''},{id:605, url:'/Regions/11/Tournaments/605/Argentina-Argentina-4', name:'Argentina 4'},{id:463, url:'/Regions/11/Tournaments/463/Argentina-Primera-B-Metropolitana', name:'Primera B Metropolitana'},{id:450, url:'/Regions/11/Tournaments/450/Argentina-Primera-B-Nacional-Qualification', name:'Primera B Nacional - Qualification'}]},
{type:0, id:12, flg:'flg-am', name: 'Armenia', tournaments: [{id:156, url:'/Regions/12/Tournaments/156/Armenia-Premier-League', name:'Premier League'},{id:256, url:'/Regions/12/Tournaments/256/Armenia-Cup', name:'Cup'},{id:270, url:'/Regions/12/Tournaments/270/Armenia-Super-Cup', name:'Super Cup'}]},
{type:1, id:249, flg:'flg-cas', name: 'Asia', tournaments: [{id:287, url:'/Regions/249/Tournaments/287/Asia-AFC-Champions-League', name:'AFC Champions League'},{id:212, url:'/Regions/249/Tournaments/212/Asia-East-Asian-Championship', name:'East Asian Championship'},{id:241, url:'/Regions/249/Tournaments/241/Asia-Gulf-Cup', name:'Gulf Cup'},{id:490, url:'/Regions/249/Tournaments/490/Asia-', name:''},{id:575, url:'/Regions/249/Tournaments/575/Asia-', name:''},{id:576, url:'/Regions/249/Tournaments/576/Asia-', name:''},{id:635, url:'/Regions/249/Tournaments/635/Asia-Premier-League-Asia-Trophy', name:'Premier League Asia Trophy'}]},
{type:0, id:14, flg:'flg-au', name: 'Australia', tournaments: [{id:194, url:'/Regions/14/Tournaments/194/Australia-A-League', name:'A-League'},{id:312, url:'/Regions/14/Tournaments/312/Australia-Australia-2', name:'Australia 2'},{id:577, url:'/Regions/14/Tournaments/577/Australia-', name:''},{id:567, url:'/Regions/14/Tournaments/567/Australia-', name:''},{id:612, url:'/Regions/14/Tournaments/612/Australia-Australia-4', name:'Australia 4'},{id:596, url:'/Regions/14/Tournaments/596/Australia-Australia-Youth-1', name:'Australia Youth 1'},{id:597, url:'/Regions/14/Tournaments/597/Australia-Australia-Youth-2', name:'Australia Youth 2'}]},
{type:0, id:15, flg:'flg-at', name: 'Austria', tournaments: [{id:32, url:'/Regions/15/Tournaments/32/Austria-T-Mobile-Bundesliga', name:'T-Mobile Bundesliga'},{id:53, url:'/Regions/15/Tournaments/53/Austria-Erste-Liga', name:'Erste Liga'},{id:90, url:'/Regions/15/Tournaments/90/Austria-Playoff', name:'Playoff'},{id:83, url:'/Regions/15/Tournaments/83/Austria-Stiegl-Cup', name:'Stiegl Cup'},{id:93, url:'/Regions/15/Tournaments/93/Austria-T-Mobile-Super-Cup', name:'T-Mobile Super Cup'},{id:441, url:'/Regions/15/Tournaments/441/Austria-Regionalliga', name:'Regionalliga'},{id:440, url:'/Regions/15/Tournaments/440/Austria-Wienerliga', name:'Wienerliga'}]},
{type:0, id:16, flg:'flg-az', name: 'Azerbaijan', tournaments: [{id:173, url:'/Regions/16/Tournaments/173/Azerbaijan-Premier-League', name:'Premier League'},{id:409, url:'/Regions/16/Tournaments/409/Azerbaijan-1-Division', name:'1. Division'},{id:615, url:'/Regions/16/Tournaments/615/Azerbaijan-Azerbaijan-Cup-1', name:'Azerbaijan Cup 1'}]},
{type:0, id:18, flg:'flg-bh', name: 'Bahrain', tournaments: [{id:302, url:'/Regions/18/Tournaments/302/Bahrain-1-Division', name:'1. Division'}]},
{type:0, id:20, flg:'flg-bb', name: 'Barbados', tournaments: [{id:370, url:'/Regions/20/Tournaments/370/Barbados-Premier-Division', name:'Premier Division'}]},
{type:0, id:21, flg:'flg-by', name: 'Belarus', tournaments: [{id:157, url:'/Regions/21/Tournaments/157/Belarus-Premier-League', name:'Premier League'},{id:480, url:'/Regions/21/Tournaments/480/Belarus-', name:''},{id:620, url:'/Regions/21/Tournaments/620/Belarus-Belarus-Cup-1', name:'Belarus Cup 1'}]},
{type:0, id:22, flg:'flg-be', name: 'Belgium', tournaments: [{id:18, url:'/Regions/22/Tournaments/18/Belgium-Jupiler-League', name:'Jupiler League'},{id:28, url:'/Regions/22/Tournaments/28/Belgium-Cup', name:'Cup'},{id:117, url:'/Regions/22/Tournaments/117/Belgium-Super-Cup', name:'Super Cup'},{id:137, url:'/Regions/22/Tournaments/137/Belgium-Second-Division', name:'Second Division'},{id:161, url:'/Regions/22/Tournaments/161/Belgium-Play-Off', name:'Play Off'},{id:15, url:'/Regions/22/Tournaments/15/Belgium-Cup', name:'Cup'},{id:459, url:'/Regions/22/Tournaments/459/Belgium-3-Division', name:'3. Division'}]},
{type:0, id:24, flg:'flg-bj', name: 'Benin', tournaments: [{id:338, url:'/Regions/24/Tournaments/338/Benin-Championnat-National', name:'Championnat National'}]},
{type:0, id:25, flg:'flg-bm', name: 'Bermuda', tournaments: [{id:372, url:'/Regions/25/Tournaments/372/Bermuda-Premier-Division', name:'Premier Division'}]},
{type:0, id:27, flg:'flg-bo', name: 'Bolivia', tournaments: [{id:255, url:'/Regions/27/Tournaments/255/Bolivia-Liga-de-Fútbol-Profesional', name:'Liga de Fútbol Profesional'},{id:528, url:'/Regions/27/Tournaments/528/Bolivia-', name:''},{id:589, url:'/Regions/27/Tournaments/589/Bolivia-Bolivia-2', name:'Bolivia 2'}]},
{type:0, id:28, flg:'flg-ba', name: 'Bosnia-Herzegovina', tournaments: [{id:174, url:'/Regions/28/Tournaments/174/Bosnia-Herzegovina-Premier-League', name:'Premier League'},{id:404, url:'/Regions/28/Tournaments/404/Bosnia-Herzegovina-1-Division', name:'1. Division'},{id:616, url:'/Regions/28/Tournaments/616/Bosnia-Herzegovina-Bosnia-Herzegovina-Cup-1', name:'Bosnia-Herzegovina Cup 1'}]},
{type:0, id:29, flg:'flg-bw', name: 'Botswana', tournaments: [{id:339, url:'/Regions/29/Tournaments/339/Botswana-Premier-League', name:'Premier League'}]},
{type:0, id:31, flg:'flg-br', name: 'Brazil', tournaments: [{id:95, url:'/Regions/31/Tournaments/95/Brazil-Brasileirão', name:'Brasileirão'},{id:269, url:'/Regions/31/Tournaments/269/Brazil-Serie-B', name:'Serie B'},{id:321, url:'/Regions/31/Tournaments/321/Brazil-Serie-C', name:'Serie C'},{id:330, url:'/Regions/31/Tournaments/330/Brazil-Paulista-A1', name:'Paulista A1'},{id:383, url:'/Regions/31/Tournaments/383/Brazil-Cup', name:'Cup'},{id:115, url:'/Regions/31/Tournaments/115/Brazil-Copa-dos-Campeones', name:'Copa dos Campeones'},{id:570, url:'/Regions/31/Tournaments/570/Brazil-', name:''},{id:564, url:'/Regions/31/Tournaments/564/Brazil-', name:''},{id:583, url:'/Regions/31/Tournaments/583/Brazil-Brazil', name:'Brazil'}]},
{type:0, id:34, flg:'flg-bg', name: 'Bulgaria', tournaments: [{id:119, url:'/Regions/34/Tournaments/119/Bulgaria-A-PFG', name:'A PFG'},{id:398, url:'/Regions/34/Tournaments/398/Bulgaria-B-PFG', name:'B PFG'},{id:143, url:'/Regions/34/Tournaments/143/Bulgaria-Cup', name:'Cup'},{id:169, url:'/Regions/34/Tournaments/169/Bulgaria-Super-Cup', name:'Super Cup'},{id:535, url:'/Regions/34/Tournaments/535/Bulgaria-', name:''}]},
{type:0, id:35, flg:'flg-bf', name: 'Burkina Faso', tournaments: [{id:340, url:'/Regions/35/Tournaments/340/Burkina-Faso-Championnat-National', name:'Championnat National'}]},
{type:0, id:38, flg:'flg-cm', name: 'Cameroon', tournaments: [{id:247, url:'/Regions/38/Tournaments/247/Cameroon-1-Division', name:'1. Division'}]},
{type:0, id:39, flg:'flg-ca', name: 'Canada', tournaments: [{id:363, url:'/Regions/39/Tournaments/363/Canada-CSL', name:'CSL'}]},
{type:0, id:40, flg:'flg-cv', name: 'Cape Verde', tournaments: [{id:342, url:'/Regions/40/Tournaments/342/Cape-Verde-Campeonato-Nacional', name:'Campeonato Nacional'}]},
{type:0, id:43, flg:'flg-td', name: 'Tchad', tournaments: [{id:343, url:'/Regions/43/Tournaments/343/Tchad-Premiere-Division', name:'Premiere Division'}]},
{type:0, id:44, flg:'flg-cl', name: 'Chile', tournaments: [{id:147, url:'/Regions/44/Tournaments/147/Chile-Clausura', name:'Clausura'},{id:395, url:'/Regions/44/Tournaments/395/Chile-Cup', name:'Cup'},{id:554, url:'/Regions/44/Tournaments/554/Chile-', name:''}]},
{type:0, id:45, flg:'flg-cn', name: 'China', tournaments: [{id:162, url:'/Regions/45/Tournaments/162/China-Super-league', name:'Super league'},{id:640, url:'/Regions/45/Tournaments/640/China-', name:''},{id:591, url:'/Regions/45/Tournaments/591/China-China-Cup-1', name:'China Cup 1'}]},
{type:0, id:48, flg:'flg-co', name: 'Colombia', tournaments: [{id:193, url:'/Regions/48/Tournaments/193/Colombia-Mustang-Cup', name:'Mustang Cup'},{id:492, url:'/Regions/48/Tournaments/492/Colombia-', name:''},{id:590, url:'/Regions/48/Tournaments/590/Colombia-Colombia-Cup-1', name:'Colombia Cup 1'}]},
{type:0, id:50, flg:'flg-cg', name: 'Congo', tournaments: [{id:344, url:'/Regions/50/Tournaments/344/Congo-Linafoot', name:'Linafoot'}]},
{type:0, id:53, flg:'flg-cr', name: 'Costa Rica', tournaments: [{id:238, url:'/Regions/53/Tournaments/238/Costa-Rica-Primera-Division', name:'Primera Division'},{id:425, url:'/Regions/53/Tournaments/425/Costa-Rica-Liga-de-Ascenso', name:'Liga de Ascenso'}]},
{type:0, id:55, flg:'flg-hr', name: 'Croatia', tournaments: [{id:82, url:'/Regions/55/Tournaments/82/Croatia-Prva-HNL', name:'Prva HNL'},{id:401, url:'/Regions/55/Tournaments/401/Croatia-2-Division', name:'2. Division'},{id:109, url:'/Regions/55/Tournaments/109/Croatia-Cup', name:'Cup'},{id:133, url:'/Regions/55/Tournaments/133/Croatia-Super-Cup', name:'Super Cup'}]},
{type:0, id:56, flg:'flg-cu', name: 'Cuba', tournaments: [{id:367, url:'/Regions/56/Tournaments/367/Cuba-Campeonato-Nacional', name:'Campeonato Nacional'}]},
{type:0, id:57, flg:'flg-cy', name: 'Cyprus', tournaments: [{id:185, url:'/Regions/57/Tournaments/185/Cyprus-First-Division', name:'First Division'},{id:402, url:'/Regions/57/Tournaments/402/Cyprus-2-Division', name:'2. Division'},{id:236, url:'/Regions/57/Tournaments/236/Cyprus-Cup', name:'Cup'},{id:283, url:'/Regions/57/Tournaments/283/Cyprus-Super-Cup', name:'Super Cup'}]},
{type:0, id:58, flg:'flg-cz', name: 'Czech Republic', tournaments: [{id:78, url:'/Regions/58/Tournaments/78/Czech-Republic-Gambrinus-League', name:'Gambrinus League'},{id:234, url:'/Regions/58/Tournaments/234/Czech-Republic-Druha-League', name:'Druha League'},{id:84, url:'/Regions/58/Tournaments/84/Czech-Republic-Cup', name:'Cup'},{id:551, url:'/Regions/58/Tournaments/551/Czech-Republic-', name:''},{id:552, url:'/Regions/58/Tournaments/552/Czech-Republic-', name:''},{id:455, url:'/Regions/58/Tournaments/455/Czech-Republic-Super-Cup', name:'Super Cup'}]},
{type:0, id:59, flg:'flg-dk', name: 'Denmark', tournaments: [{id:1, url:'/Regions/59/Tournaments/1/Denmark-Superliga', name:'Superliga'},{id:34, url:'/Regions/59/Tournaments/34/Denmark-Viasat-Sport-Divisionen', name:'Viasat Sport Divisionen'},{id:35, url:'/Regions/59/Tournaments/35/Denmark-2-Division', name:'2. Division'},{id:39, url:'/Regions/59/Tournaments/39/Denmark-Cup', name:'Cup'},{id:456, url:'/Regions/59/Tournaments/456/Denmark-Reserve-League', name:'Reserve League'}]},
{type:0, id:63, flg:'flg-ec', name: 'Ecuador', tournaments: [{id:192, url:'/Regions/63/Tournaments/192/Ecuador-Serie-A', name:'Serie A'}]},
{type:0, id:64, flg:'flg-eg', name: 'Egypt', tournaments: [{id:277, url:'/Regions/64/Tournaments/277/Egypt-Premier-League', name:'Premier League'},{id:519, url:'/Regions/64/Tournaments/519/Egypt-', name:''}]},
{type:0, id:65, flg:'flg-sv', name: 'El Salvador', tournaments: [{id:250, url:'/Regions/65/Tournaments/250/El-Salvador-Primera-Division', name:'Primera Division'}]},
{type:0, id:252, flg:'flg-gb-eng', name: 'England', tournaments: [{id:2, url:'/Regions/252/Tournaments/2/England-Premier-League', name:'Premier League'},{id:26, url:'/Regions/252/Tournaments/26/England-FA-Cup', name:'FA Cup'},{id:29, url:'/Regions/252/Tournaments/29/England-League-Cup', name:'League Cup'},{id:96, url:'/Regions/252/Tournaments/96/England-Community-Shield', name:'Community Shield'},{id:7, url:'/Regions/252/Tournaments/7/England-Championship', name:'Championship'},{id:8, url:'/Regions/252/Tournaments/8/England-League-1', name:'League 1'},{id:9, url:'/Regions/252/Tournaments/9/England-League-2', name:'League 2'},{id:70, url:'/Regions/252/Tournaments/70/England-National-League-Premier', name:'National League Premier'},{id:314, url:'/Regions/252/Tournaments/314/England-National-League', name:'National League'},{id:315, url:'/Regions/252/Tournaments/315/England-Regional-League', name:'Regional League'},{id:23, url:'/Regions/252/Tournaments/23/England-Johnstones-Paint-Trophy', name:'Johnstones Paint Trophy'},{id:389, url:'/Regions/252/Tournaments/389/England-Professional-Development-League', name:'Professional Development League'},{id:479, url:'/Regions/252/Tournaments/479/England-FA-Trophy', name:'FA Trophy'}]},
{type:0, id:68, flg:'flg-ee', name: 'Estonia', tournaments: [{id:148, url:'/Regions/68/Tournaments/148/Estonia-Meistriliiga', name:'Meistriliiga'},{id:405, url:'/Regions/68/Tournaments/405/Estonia-Esiliiga', name:'Esiliiga'},{id:385, url:'/Regions/68/Tournaments/385/Estonia-Super-Cup', name:'Super Cup'},{id:621, url:'/Regions/68/Tournaments/621/Estonia-Estonia-Cup-2', name:'Estonia Cup 2'}]},
{type:1, id:250, flg:'flg-ceu', name: 'Europe', tournaments: [{id:62, url:'/Regions/250/Tournaments/62/Europe-UEFA-Super-Cup', name:'UEFA Super Cup'},{id:12, url:'/Regions/250/Tournaments/12/Europe-UEFA-Champions-League', name:'UEFA Champions League'},{id:30, url:'/Regions/250/Tournaments/30/Europe-UEFA-Europa-League', name:'UEFA Europa League'},{id:533, url:'/Regions/250/Tournaments/533/Europe-', name:''},{id:613, url:'/Regions/250/Tournaments/613/Europe-The-Atlantic-Cup', name:'The Atlantic Cup'}]},
{type:0, id:71, flg:'flg-fo', name: 'Faroe Islands', tournaments: [{id:160, url:'/Regions/71/Tournaments/160/Faroe-Islands-Formuladeildin', name:'Formuladeildin'},{id:622, url:'/Regions/71/Tournaments/622/Faroe-Islands-Faroe-Islands-Cup-1', name:'Faroe Islands Cup 1'}]},
{type:0, id:72, flg:'flg-fj', name: 'Fiji', tournaments: [{id:346, url:'/Regions/72/Tournaments/346/Fiji-National-League', name:'National League'}]},
{type:0, id:73, flg:'flg-fi', name: 'Finland', tournaments: [{id:43, url:'/Regions/73/Tournaments/43/Finland-Veikkausliiga', name:'Veikkausliiga'},{id:202, url:'/Regions/73/Tournaments/202/Finland-Ykkonen', name:'Ykkonen'},{id:319, url:'/Regions/73/Tournaments/319/Finland-Kakkonen', name:'Kakkonen'},{id:100, url:'/Regions/73/Tournaments/100/Finland-Playoff', name:'Playoff'},{id:243, url:'/Regions/73/Tournaments/243/Finland-League-Cup', name:'League Cup'},{id:51, url:'/Regions/73/Tournaments/51/Finland-Cup', name:'Cup'},{id:585, url:'/Regions/73/Tournaments/585/Finland-', name:''}]},
{type:0, id:74, flg:'flg-fr', name: 'France', tournaments: [{id:38, url:'/Regions/74/Tournaments/38/France-Coupe-de-la-Ligue', name:'Coupe de la Ligue'},{id:22, url:'/Regions/74/Tournaments/22/France-Ligue-1', name:'Ligue 1'},{id:16, url:'/Regions/74/Tournaments/16/France-Coupe-de-France', name:'Coupe de France'},{id:54, url:'/Regions/74/Tournaments/54/France-Trophée-des-Champions', name:'Trophée des Champions'},{id:37, url:'/Regions/74/Tournaments/37/France-Ligue-2', name:'Ligue 2'},{id:320, url:'/Regions/74/Tournaments/320/France-Championnat-National', name:'Championnat National'},{id:460, url:'/Regions/74/Tournaments/460/France-Championnat-de-France-Amateur', name:'Championnat de France Amateur'}]},
{type:0, id:78, flg:'flg-ga', name: 'Gabon', tournaments: [{id:345, url:'/Regions/78/Tournaments/345/Gabon-Championnat-National-de-D1', name:'Championnat National de D1'}]},
{type:0, id:79, flg:'flg-gm', name: 'Gambia', tournaments: [{id:347, url:'/Regions/79/Tournaments/347/Gambia-GFA-Premier-League', name:'GFA Premier League'}]},
{type:0, id:80, flg:'flg-ge', name: 'Georgia', tournaments: [{id:168, url:'/Regions/80/Tournaments/168/Georgia-Umaglesi-Liga', name:'Umaglesi Liga'},{id:522, url:'/Regions/80/Tournaments/522/Georgia-', name:''},{id:623, url:'/Regions/80/Tournaments/623/Georgia-Georgia-Cup-1', name:'Georgia Cup 1'},{id:507, url:'/Regions/80/Tournaments/507/Georgia-Umaglesi-Liga', name:'Umaglesi Liga'}]},
{type:0, id:81, flg:'flg-de', name: 'Germany', tournaments: [{id:3, url:'/Regions/81/Tournaments/3/Germany-Bundesliga', name:'Bundesliga'},{id:24, url:'/Regions/81/Tournaments/24/Germany-DFB-Pokal', name:'DFB Pokal'},{id:307, url:'/Regions/81/Tournaments/307/Germany-German-Super-Cup', name:'German Super Cup'},{id:6, url:'/Regions/81/Tournaments/6/Germany-Bundesliga-II', name:'Bundesliga II'},{id:308, url:'/Regions/81/Tournaments/308/Germany-Bundesliga-III', name:'Bundesliga III'},{id:56, url:'/Regions/81/Tournaments/56/Germany-Liga-Pokal', name:'Liga Pokal'},{id:274, url:'/Regions/81/Tournaments/274/Germany-Regionalliga', name:'Regionalliga'},{id:388, url:'/Regions/81/Tournaments/388/Germany-Promotion-Relegation-Playoff', name:'Promotion/Relegation Playoff'},{id:442, url:'/Regions/81/Tournaments/442/Germany-Oberliga', name:'Oberliga'}]},
{type:0, id:82, flg:'flg-gh', name: 'Ghana', tournaments: [{id:305, url:'/Regions/82/Tournaments/305/Ghana-Premier-League', name:'Premier League'}]},
{type:0, id:83, flg:'flg-gi', name: 'Gibraltar', tournaments: [{id:633, url:'/Regions/83/Tournaments/633/Gibraltar-Gibraltar-Cup', name:'Gibraltar Cup'},{id:632, url:'/Regions/83/Tournaments/632/Gibraltar-Gibraltar-Premier-League', name:'Gibraltar Premier League'}]},
{type:0, id:84, flg:'flg-gr', name: 'Greece', tournaments: [{id:65, url:'/Regions/84/Tournaments/65/Greece-Super-League', name:'Super League'},{id:69, url:'/Regions/84/Tournaments/69/Greece-Cup', name:'Cup'},{id:300, url:'/Regions/84/Tournaments/300/Greece-Super-Cup', name:'Super Cup'},{id:292, url:'/Regions/84/Tournaments/292/Greece-Second-Division', name:'Second Division'},{id:325, url:'/Regions/84/Tournaments/325/Greece-C-Ethniki-North', name:'C Ethniki North'},{id:536, url:'/Regions/84/Tournaments/536/Greece-', name:''}]},
{type:0, id:87, flg:'flg-gp', name: 'Guadeloupe', tournaments: [{id:379, url:'/Regions/87/Tournaments/379/Guadeloupe-1-Division', name:'1. Division'}]},
{type:0, id:89, flg:'flg-gt', name: 'Guatemala', tournaments: [{id:421, url:'/Regions/89/Tournaments/421/Guatemala-Primera-Division', name:'Primera Division'},{id:239, url:'/Regions/89/Tournaments/239/Guatemala-Liga-Nacional', name:'Liga Nacional'}]},
{type:0, id:91, flg:'flg-gn', name: 'Guinea', tournaments: [{id:354, url:'/Regions/91/Tournaments/354/Guinea-Championnat-National', name:'Championnat National'}]},
{type:0, id:94, flg:'flg-ht', name: 'Haiti', tournaments: [{id:376, url:'/Regions/94/Tournaments/376/Haiti-Première-Division', name:'Première Division'}]},
{type:0, id:97, flg:'flg-hn', name: 'Honduras', tournaments: [{id:240, url:'/Regions/97/Tournaments/240/Honduras-Liga-Nacional', name:'Liga Nacional'}]},
{type:0, id:98, flg:'flg-hk', name: 'Hong Kong', tournaments: [{id:332, url:'/Regions/98/Tournaments/332/Hong-Kong-1-Division', name:'1. Division'},{id:607, url:'/Regions/98/Tournaments/607/Hong-Kong-Hong-Kong-2', name:'Hong Kong 2'}]},
{type:0, id:99, flg:'flg-hu', name: 'Hungary', tournaments: [{id:75, url:'/Regions/99/Tournaments/75/Hungary-Soproni-Liga', name:'Soproni Liga'},{id:419, url:'/Regions/99/Tournaments/419/Hungary-NB-II', name:'NB II'},{id:102, url:'/Regions/99/Tournaments/102/Hungary-Cup', name:'Cup'},{id:132, url:'/Regions/99/Tournaments/132/Hungary-Super-Cup', name:'Super Cup'},{id:538, url:'/Regions/99/Tournaments/538/Hungary-', name:''}]},
{type:0, id:100, flg:'flg-is', name: 'Iceland', tournaments: [{id:129, url:'/Regions/100/Tournaments/129/Iceland-Landsbankadeildin', name:'Landsbankadeildin'},{id:208, url:'/Regions/100/Tournaments/208/Iceland-1-Deild', name:'1. Deild'},{id:206, url:'/Regions/100/Tournaments/206/Iceland-Cup', name:'Cup'}]},
{type:0, id:101, flg:'flg-in', name: 'India', tournaments: [{id:582, url:'/Regions/101/Tournaments/582/India-Indian-Super-League', name:'Indian Super League'},{id:333, url:'/Regions/101/Tournaments/333/India-I-League', name:'I League'}]},
{type:0, id:102, flg:'flg-id', name: 'Indonesia', tournaments: [{id:334, url:'/Regions/102/Tournaments/334/Indonesia-Super-Liga', name:'Super Liga'}]},
{type:1, id:247, flg:'flg-cint', name: 'International', tournaments: [{id:124, url:'/Regions/247/Tournaments/124/International-European-Championship', name:'European Championship'},{id:27, url:'/Regions/247/Tournaments/27/International-Int-Friendly', name:'Int. Friendly'},{id:104, url:'/Regions/247/Tournaments/104/International-Africa-Cup-of-Nations', name:'Africa Cup of Nations'},{id:36, url:'/Regions/247/Tournaments/36/International-FIFA-World-Cup', name:'FIFA World Cup'},{id:89, url:'/Regions/247/Tournaments/89/International-Confederations-Cup', name:'Confederations Cup'},{id:201, url:'/Regions/247/Tournaments/201/International-EURO-U-17', name:'EURO U-17'},{id:94, url:'/Regions/247/Tournaments/94/International-Copa-America', name:'Copa America'},{id:144, url:'/Regions/247/Tournaments/144/International-World-Championship-U-20', name:'World Championship U-20'},{id:67, url:'/Regions/247/Tournaments/67/International-FIFA-Club-World-Cup', name:'FIFA Club World Cup'},{id:219, url:'/Regions/247/Tournaments/219/International-World-Championship-U-17', name:'World Championship U-17'},{id:203, url:'/Regions/247/Tournaments/203/International-Toulon-Tournament', name:'Toulon Tournament'},{id:209, url:'/Regions/247/Tournaments/209/International-Peace-Cup', name:'Peace Cup'},{id:177, url:'/Regions/247/Tournaments/177/International-Summer-Olympics-Qualifiers', name:'Summer Olympics Qualifiers'},{id:167, url:'/Regions/247/Tournaments/167/International-Champions-World-Series', name:'Champions World Series'},{id:57, url:'/Regions/247/Tournaments/57/International-Club-Friendlies', name:'Club Friendlies'},{id:166, url:'/Regions/247/Tournaments/166/International-Asian-Cup', name:'Asian Cup'},{id:123, url:'/Regions/247/Tournaments/123/International-EURO-U-21', name:'EURO U-21'},{id:244, url:'/Regions/247/Tournaments/244/International-Friendly-U-21', name:'Friendly U-21'},{id:165, url:'/Regions/247/Tournaments/165/International-EURO-U-19', name:'EURO U-19'},{id:555, url:'/Regions/247/Tournaments/555/International-Champions-Cup', name:'Champions Cup'},{id:569, url:'/Regions/247/Tournaments/569/International-', name:''},{id:563, url:'/Regions/247/Tournaments/563/International-', name:''},{id:578, url:'/Regions/247/Tournaments/578/International-', name:''},{id:546, url:'/Regions/247/Tournaments/546/International-', name:''},{id:499, url:'/Regions/247/Tournaments/499/International-Kagame-Inter-Club-Cup', name:'Kagame Inter-Club Cup'}]},
{type:0, id:103, flg:'flg-ir', name: 'Iran', tournaments: [{id:279, url:'/Regions/103/Tournaments/279/Iran-Persian-Gulf-Pro-League', name:'Persian Gulf Pro League'},{id:587, url:'/Regions/103/Tournaments/587/Iran-Hazfi-Cup', name:'Hazfi Cup'},{id:534, url:'/Regions/103/Tournaments/534/Iran-', name:''},{id:556, url:'/Regions/103/Tournaments/556/Iran-', name:''}]},
{type:0, id:104, flg:'flg-iq', name: 'Iraq', tournaments: [{id:384, url:'/Regions/104/Tournaments/384/Iraq-Super-League', name:'Super League'}]},
{type:0, id:105, flg:'flg-ie', name: 'Ireland', tournaments: [{id:113, url:'/Regions/105/Tournaments/113/Ireland-Airtricity-League', name:'Airtricity League'},{id:197, url:'/Regions/105/Tournaments/197/Ireland-Second-Division', name:'Second Division'},{id:116, url:'/Regions/105/Tournaments/116/Ireland-FAI-Cup', name:'FAI Cup'},{id:220, url:'/Regions/105/Tournaments/220/Ireland-Playoff', name:'Playoff'},{id:141, url:'/Regions/105/Tournaments/141/Ireland-League-Cup', name:'League Cup'},{id:566, url:'/Regions/105/Tournaments/566/Ireland-', name:''},{id:506, url:'/Regions/105/Tournaments/506/Ireland-Setanta-Sports-Cup', name:'Setanta Sports Cup'}]},
{type:0, id:107, flg:'flg-il', name: 'Israel', tournaments: [{id:97, url:'/Regions/107/Tournaments/97/Israel-Ligat-ha-Al', name:'Ligat ha\'Al'},{id:181, url:'/Regions/107/Tournaments/181/Israel-Liga-Leumit', name:'Liga Leumit'},{id:400, url:'/Regions/107/Tournaments/400/Israel-Toto-Cup-Ligat-Al', name:'Toto Cup Ligat Al'},{id:447, url:'/Regions/107/Tournaments/447/Israel-Ligat-Al-playoff-Qualification', name:'Ligat-Al playoff Qualification'}]},
{type:0, id:108, flg:'flg-it', name: 'Italy', tournaments: [{id:5, url:'/Regions/108/Tournaments/5/Italy-Serie-A', name:'Serie A'},{id:60, url:'/Regions/108/Tournaments/60/Italy-Coppa-Italia', name:'Coppa Italia'},{id:64, url:'/Regions/108/Tournaments/64/Italy-Supercoppa-Italiana', name:'Supercoppa Italiana'},{id:19, url:'/Regions/108/Tournaments/19/Italy-Serie-B', name:'Serie B'},{id:106, url:'/Regions/108/Tournaments/106/Italy-Lega-Pro', name:'Lega Pro'},{id:435, url:'/Regions/108/Tournaments/435/Italy-Lega-Pro-Seconda-Divisione', name:'Lega Pro Seconda Divisione'},{id:91, url:'/Regions/108/Tournaments/91/Italy-Playoff', name:'Playoff'}]},
{type:0, id:255, flg:'flg-ci', name: 'Ivory Coast', tournaments: [{id:249, url:'/Regions/255/Tournaments/249/Ivory-Coast-Ligue-1', name:'Ligue 1'}]},
{type:0, id:109, flg:'flg-jm', name: 'Jamaica', tournaments: [{id:366, url:'/Regions/109/Tournaments/366/Jamaica-Premier-League', name:'Premier League'}]},
{type:0, id:110, flg:'flg-jp', name: 'Japan', tournaments: [{id:150, url:'/Regions/110/Tournaments/150/Japan-J-League', name:'J- League'},{id:324, url:'/Regions/110/Tournaments/324/Japan-J-League-2', name:'J. League 2'},{id:186, url:'/Regions/110/Tournaments/186/Japan-Cup', name:'Cup'},{id:358, url:'/Regions/110/Tournaments/358/Japan-Cup', name:'Cup'},{id:248, url:'/Regions/110/Tournaments/248/Japan-Super-Cup', name:'Super Cup'},{id:559, url:'/Regions/110/Tournaments/559/Japan-', name:''},{id:599, url:'/Regions/110/Tournaments/599/Japan-', name:''}]},
{type:0, id:112, flg:'flg-jo', name: 'Jordan', tournaments: [{id:284, url:'/Regions/112/Tournaments/284/Jordan-1-Division', name:'1. Division'}]},
{type:0, id:113, flg:'flg-kz', name: 'Kazakhstan', tournaments: [{id:153, url:'/Regions/113/Tournaments/153/Kazakhstan-Superliga', name:'Superliga'},{id:558, url:'/Regions/113/Tournaments/558/Kazakhstan-', name:''},{id:604, url:'/Regions/113/Tournaments/604/Kazakhstan-Kazakhstan-Cup-1', name:'Kazakhstan Cup 1'},{id:614, url:'/Regions/113/Tournaments/614/Kazakhstan-Kazakhstan-Cup-2', name:'Kazakhstan Cup 2'}]},
{type:0, id:114, flg:'flg-ke', name: 'Kenya', tournaments: [{id:355, url:'/Regions/114/Tournaments/355/Kenya-Premier-League', name:'Premier League'},{id:561, url:'/Regions/114/Tournaments/561/Kenya-', name:''},{id:500, url:'/Regions/114/Tournaments/500/Kenya-', name:''},{id:495, url:'/Regions/114/Tournaments/495/Kenya-FKL-Nationwide-One', name:'FKL Nationwide One'},{id:496, url:'/Regions/114/Tournaments/496/Kenya-Kenya-Cup', name:'Kenya Cup'}]},
{type:0, id:118, flg:'flg-kw', name: 'Kuwait', tournaments: [{id:293, url:'/Regions/118/Tournaments/293/Kuwait-1-Division', name:'1. Division'}]},
{type:0, id:121, flg:'flg-lv', name: 'Latvia', tournaments: [{id:155, url:'/Regions/121/Tournaments/155/Latvia-Virsliga', name:'Virsliga'},{id:586, url:'/Regions/121/Tournaments/586/Latvia-Latvia-Cup-1', name:'Latvia Cup 1'},{id:624, url:'/Regions/121/Tournaments/624/Latvia-Latvia-Cup-2', name:'Latvia Cup 2'}]},
{type:0, id:122, flg:'flg-lb', name: 'Lebanon', tournaments: [{id:298, url:'/Regions/122/Tournaments/298/Lebanon-1-Division', name:'1. Division'}]},
{type:0, id:123, flg:'flg-ls', name: 'Lesotho', tournaments: [{id:356, url:'/Regions/123/Tournaments/356/Lesotho-Buddie-Premier-League', name:'Buddie Premier League'}]},
{type:0, id:124, flg:'flg-lr', name: 'Liberia', tournaments: [{id:351, url:'/Regions/124/Tournaments/351/Liberia-1-Divsion', name:'1. Divsion'}]},
{type:0, id:125, flg:'flg-ly', name: 'Libya', tournaments: [{id:288, url:'/Regions/125/Tournaments/288/Libya-1-Division', name:'1. Division'}]},
{type:0, id:126, flg:'flg-li', name: 'Liechtenstein', tournaments: [{id:617, url:'/Regions/126/Tournaments/617/Liechtenstein-Liechtenstein-Cup-1', name:'Liechtenstein Cup 1'}]},
{type:0, id:127, flg:'flg-lt', name: 'Lithuania', tournaments: [{id:159, url:'/Regions/127/Tournaments/159/Lithuania-A-Lyga', name:'A Lyga'},{id:593, url:'/Regions/127/Tournaments/593/Lithuania-Lithuania-Cup-1', name:'Lithuania Cup 1'},{id:625, url:'/Regions/127/Tournaments/625/Lithuania-Lithuania-Cup-2', name:'Lithuania Cup 2'}]},
{type:0, id:128, flg:'flg-lu', name: 'Luxembourg', tournaments: [{id:172, url:'/Regions/128/Tournaments/172/Luxembourg-1-Division', name:'1. Division'},{id:407, url:'/Regions/128/Tournaments/407/Luxembourg-2-Division', name:'2. Division'},{id:452, url:'/Regions/128/Tournaments/452/Luxembourg-1-Division-Qualification', name:'1. Division Qualification'},{id:626, url:'/Regions/128/Tournaments/626/Luxembourg-Luxembourg-Cup-1', name:'Luxembourg Cup 1'}]},
{type:0, id:130, flg:'flg-mk', name: 'Macedonia', tournaments: [{id:396, url:'/Regions/130/Tournaments/396/Macedonia-Vtora-Liga', name:'Vtora Liga'},{id:453, url:'/Regions/130/Tournaments/453/Macedonia-', name:''},{id:627, url:'/Regions/130/Tournaments/627/Macedonia-Macedonia-Cup-2', name:'Macedonia Cup 2'}]},
{type:0, id:132, flg:'flg-mw', name: 'Malawi', tournaments: [{id:350, url:'/Regions/132/Tournaments/350/Malawi-Super-League', name:'Super League'}]},
{type:0, id:133, flg:'flg-my', name: 'Malaysia', tournaments: [{id:336, url:'/Regions/133/Tournaments/336/Malaysia-Super-Liga', name:'Super Liga'},{id:609, url:'/Regions/133/Tournaments/609/Malaysia-Malaysia-2', name:'Malaysia 2'}]},
{type:0, id:135, flg:'flg-ml', name: 'Mali', tournaments: [{id:352, url:'/Regions/135/Tournaments/352/Mali-Championnat-National', name:'Championnat National'}]},
{type:0, id:136, flg:'flg-mt', name: 'Malta', tournaments: [{id:184, url:'/Regions/136/Tournaments/184/Malta-Premier-League', name:'Premier League'},{id:410, url:'/Regions/136/Tournaments/410/Malta-1-Division', name:'1. Division'},{id:628, url:'/Regions/136/Tournaments/628/Malta-Malta-Cup-1', name:'Malta Cup 1'}]},
{type:0, id:138, flg:'flg-mq', name: 'Martinique', tournaments: [{id:353, url:'/Regions/138/Tournaments/353/Martinique-Division-d´Honneur', name:'Division d´Honneur'}]},
{type:0, id:140, flg:'flg-mu', name: 'Mauritius', tournaments: [{id:357, url:'/Regions/140/Tournaments/357/Mauritius-Barclays-League', name:'Barclays League'}]},
{type:0, id:142, flg:'flg-mx', name: 'Mexico', tournaments: [{id:103, url:'/Regions/142/Tournaments/103/Mexico-Primera-Division', name:'Primera Division'},{id:326, url:'/Regions/142/Tournaments/326/Mexico-Primera-A', name:'Primera A'},{id:572, url:'/Regions/142/Tournaments/572/Mexico-', name:''},{id:532, url:'/Regions/142/Tournaments/532/Mexico-', name:''},{id:588, url:'/Regions/142/Tournaments/588/Mexico-Mexico-3', name:'Mexico 3'}]},
{type:0, id:144, flg:'flg-md', name: 'Moldova', tournaments: [{id:178, url:'/Regions/144/Tournaments/178/Moldova-Divizia-Nationala', name:'Divizia Nationala'},{id:411, url:'/Regions/144/Tournaments/411/Moldova-2-Division', name:'2. Division'},{id:629, url:'/Regions/144/Tournaments/629/Moldova-Moldova-Cup-1', name:'Moldova Cup 1'}]},
{type:0, id:147, flg:'flg-me', name: 'Montenegro', tournaments: [{id:235, url:'/Regions/147/Tournaments/235/Montenegro-1-Division', name:'1. Division'},{id:412, url:'/Regions/147/Tournaments/412/Montenegro-2-Division', name:'2. Division'},{id:454, url:'/Regions/147/Tournaments/454/Montenegro-1-Division-Playoff', name:'1. Division Playoff'},{id:630, url:'/Regions/147/Tournaments/630/Montenegro-Montenegro-Cup-1', name:'Montenegro Cup 1'}]},
{type:0, id:149, flg:'flg-ma', name: 'Morocco', tournaments: [{id:291, url:'/Regions/149/Tournaments/291/Morocco-GNF-1', name:'GNF 1'},{id:523, url:'/Regions/149/Tournaments/523/Morocco-', name:''}]},
{type:0, id:150, flg:'flg-mz', name: 'Mozambique', tournaments: [{id:377, url:'/Regions/150/Tournaments/377/Mozambique-Mocambola', name:'Mocambola'}]},
{type:0, id:152, flg:'flg-na', name: 'Namibia', tournaments: [{id:364, url:'/Regions/152/Tournaments/364/Namibia-Premier-League', name:'Premier League'}]},
{type:0, id:155, flg:'flg-nl', name: 'Netherlands', tournaments: [{id:120, url:'/Regions/155/Tournaments/120/Netherlands-Dutch-Super-Cup', name:'Dutch Super Cup'},{id:47, url:'/Regions/155/Tournaments/47/Netherlands-KNVB-Cup', name:'KNVB Cup'},{id:13, url:'/Regions/155/Tournaments/13/Netherlands-Eredivisie', name:'Eredivisie'},{id:457, url:'/Regions/155/Tournaments/457/Netherlands-Derde-Division', name:'Derde Division'},{id:66, url:'/Regions/155/Tournaments/66/Netherlands-Jupiler-League', name:'Jupiler League'},{id:88, url:'/Regions/155/Tournaments/88/Netherlands-Playoff', name:'Playoff'}]},
{type:0, id:158, flg:'flg-nz', name: 'New Zealand', tournaments: [{id:303, url:'/Regions/158/Tournaments/303/New-Zealand-Premier-League', name:'Premier League'},{id:610, url:'/Regions/158/Tournaments/610/New-Zealand-New-Zealand-2', name:'New Zealand 2'}]},
{type:0, id:159, flg:'flg-ni', name: 'Nicaragua', tournaments: [{id:362, url:'/Regions/159/Tournaments/362/Nicaragua-Campeonato-Nacional', name:'Campeonato Nacional'}]},
{type:0, id:161, flg:'flg-ng', name: 'Nigeria', tournaments: [{id:294, url:'/Regions/161/Tournaments/294/Nigeria-1-Division', name:'1. Division'}]},
{type:1, id:264, flg:'flg-cna', name: 'North & Central America', tournaments: [{id:222, url:'/Regions/264/Tournaments/222/North-Central-America-CONCACAF-Champions-Cup', name:'CONCACAF Champions Cup'},{id:131, url:'/Regions/264/Tournaments/131/North-Central-America-CONCACAF-Gold-Cup', name:'CONCACAF Gold Cup'},{id:462, url:'/Regions/264/Tournaments/462/North-Central-America-', name:''},{id:543, url:'/Regions/264/Tournaments/543/North-Central-America-', name:''}]},
{type:0, id:258, flg:'flg-gb-nir', name: 'N. Ireland', tournaments: [{id:126, url:'/Regions/258/Tournaments/126/N-Ireland-Premiership', name:'Premiership'},{id:329, url:'/Regions/258/Tournaments/329/N-Ireland-Promotion-Relegation', name:'Promotion/Relegation'},{id:328, url:'/Regions/258/Tournaments/328/N-Ireland-Cup', name:'Cup'},{id:545, url:'/Regions/258/Tournaments/545/N-Ireland-', name:''},{id:446, url:'/Regions/258/Tournaments/446/N-Ireland-1-Division', name:'1. Division'}]},
{type:0, id:165, flg:'flg-no', name: 'Norway', tournaments: [{id:41, url:'/Regions/165/Tournaments/41/Norway-Eliteserien', name:'Eliteserien'},{id:50, url:'/Regions/165/Tournaments/50/Norway-1-Division', name:'1. Division'},{id:200, url:'/Regions/165/Tournaments/200/Norway-2-Division', name:'2. Division'},{id:99, url:'/Regions/165/Tournaments/99/Norway-Playoff', name:'Playoff'},{id:52, url:'/Regions/165/Tournaments/52/Norway-Cup', name:'Cup'},{id:386, url:'/Regions/165/Tournaments/386/Norway-Super-Cup', name:'Super Cup'},{id:603, url:'/Regions/165/Tournaments/603/Norway-Norway-Youth-1', name:'Norway Youth 1'}]},
{type:0, id:166, flg:'flg-om', name: 'Oman', tournaments: [{id:304, url:'/Regions/166/Tournaments/304/Oman-1-Division', name:'1. Division'}]},
{type:0, id:169, flg:'flg-ps', name: 'Palestine', tournaments: [{id:464, url:'/Regions/169/Tournaments/464/Palestine-Division-A', name:'Division A'}]},
{type:0, id:170, flg:'flg-pa', name: 'Panama', tournaments: [{id:368, url:'/Regions/170/Tournaments/368/Panama-ANAPROF', name:'ANAPROF'}]},
{type:0, id:172, flg:'flg-py', name: 'Paraguay', tournaments: [{id:246, url:'/Regions/172/Tournaments/246/Paraguay-Primera-Division', name:'Primera Division'},{id:422, url:'/Regions/172/Tournaments/422/Paraguay-Division-Intermedia', name:'Division Intermedia'}]},
{type:0, id:173, flg:'flg-pe', name: 'Peru', tournaments: [{id:195, url:'/Regions/173/Tournaments/195/Peru-Primera-Division', name:'Primera Division'}]},
{type:0, id:174, flg:'flg-ph', name: 'Philippines', tournaments: [{id:584, url:'/Regions/174/Tournaments/584/Philippines-Philippines-1', name:'Philippines 1'}]},
{type:0, id:176, flg:'flg-pl', name: 'Poland', tournaments: [{id:76, url:'/Regions/176/Tournaments/76/Poland-Ekstraklasa', name:'Ekstraklasa'},{id:232, url:'/Regions/176/Tournaments/232/Poland-1-Division', name:'1. Division'},{id:311, url:'/Regions/176/Tournaments/311/Poland-2-Division', name:'2. Division'},{id:204, url:'/Regions/176/Tournaments/204/Poland-Playoff', name:'Playoff'},{id:101, url:'/Regions/176/Tournaments/101/Poland-Cup', name:'Cup'},{id:110, url:'/Regions/176/Tournaments/110/Poland-League-Cup', name:'League Cup'},{id:231, url:'/Regions/176/Tournaments/231/Poland-Super-Cup', name:'Super Cup'}]},
{type:0, id:177, flg:'flg-pt', name: 'Portugal', tournaments: [{id:21, url:'/Regions/177/Tournaments/21/Portugal-Liga-NOS', name:'Liga NOS'},{id:11, url:'/Regions/177/Tournaments/11/Portugal-Taça-de-Portugal', name:'Taça de Portugal'},{id:122, url:'/Regions/177/Tournaments/122/Portugal-Super-Cup', name:'Super Cup'},{id:414, url:'/Regions/177/Tournaments/414/Portugal-2-Division', name:'2. Division'},{id:139, url:'/Regions/177/Tournaments/139/Portugal-Liga-Vitalis', name:'Liga Vitalis'},{id:275, url:'/Regions/177/Tournaments/275/Portugal-Carlsberg-Cup', name:'Carlsberg Cup'}]},
{type:0, id:178, flg:'flg-pr', name: 'Puerto Rico', tournaments: [{id:380, url:'/Regions/178/Tournaments/380/Puerto-Rico-Premier-League', name:'Premier League'}]},
{type:0, id:179, flg:'flg-qa', name: 'Qatar', tournaments: [{id:285, url:'/Regions/179/Tournaments/285/Qatar-1-Division', name:'1. Division'}]},
{type:0, id:181, flg:'flg-ro', name: 'Romania', tournaments: [{id:121, url:'/Regions/181/Tournaments/121/Romania-Liga-I', name:'Liga I'},{id:415, url:'/Regions/181/Tournaments/415/Romania-Liga-II', name:'Liga II'},{id:145, url:'/Regions/181/Tournaments/145/Romania-Cup', name:'Cup'},{id:213, url:'/Regions/181/Tournaments/213/Romania-Super-Cup', name:'Super Cup'},{id:571, url:'/Regions/181/Tournaments/571/Romania-', name:''}]},
{type:0, id:182, flg:'flg-ru', name: 'Russia', tournaments: [{id:77, url:'/Regions/182/Tournaments/77/Russia-Premier-League', name:'Premier League'},{id:111, url:'/Regions/182/Tournaments/111/Russia-Cup', name:'Cup'},{id:127, url:'/Regions/182/Tournaments/127/Russia-Super-Cup', name:'Super Cup'},{id:527, url:'/Regions/182/Tournaments/527/Russia-Premier-League-Qualification', name:'Premier League Qualification'},{id:544, url:'/Regions/182/Tournaments/544/Russia-U21-Premier-League', name:'U21 Premier League'},{id:257, url:'/Regions/182/Tournaments/257/Russia-Football-National-League', name:'Football National League'}]},
{type:0, id:183, flg:'flg-rw', name: 'Rwanda', tournaments: [{id:369, url:'/Regions/183/Tournaments/369/Rwanda-Championnat-National', name:'Championnat National'}]},
{type:0, id:186, flg:'flg-kn', name: 'St. Kitts and Nevis', tournaments: [{id:374, url:'/Regions/186/Tournaments/374/St-Kitts-and-Nevis-SKNFA-League', name:'SKNFA League'}]},
{type:0, id:190, flg:'flg-vc', name: 'Saint Vincent and The Grenadines', tournaments: [{id:493, url:'/Regions/190/Tournaments/493/Saint-Vincent-and-The-Grenadines-', name:''}]},
{type:0, id:192, flg:'flg-sm', name: 'San Marino', tournaments: [{id:331, url:'/Regions/192/Tournaments/331/San-Marino-Campionato', name:'Campionato'},{id:631, url:'/Regions/192/Tournaments/631/San-Marino-San-Marino-Cup-1', name:'San Marino Cup 1'}]},
{type:0, id:194, flg:'flg-sa', name: 'Saudi Arabia', tournaments: [{id:282, url:'/Regions/194/Tournaments/282/Saudi-Arabia-1-Division', name:'1. Division'}]},
{type:0, id:253, flg:'flg-gb-sct', name: 'Scotland', tournaments: [{id:20, url:'/Regions/253/Tournaments/20/Scotland-Premiership', name:'Premiership'},{id:10, url:'/Regions/253/Tournaments/10/Scotland-Scottish-Cup', name:'Scottish Cup'},{id:606, url:'/Regions/253/Tournaments/606/Scotland-SPFL-Development-League', name:'SPFL Development League'},{id:71, url:'/Regions/253/Tournaments/71/Scotland-Scottish-Championship', name:'Scottish Championship'},{id:72, url:'/Regions/253/Tournaments/72/Scotland-Scottish-League-One', name:'Scottish League One'},{id:73, url:'/Regions/253/Tournaments/73/Scotland-Scottish-League-2', name:'Scottish League 2'},{id:225, url:'/Regions/253/Tournaments/225/Scotland-Playoff', name:'Playoff'},{id:25, url:'/Regions/253/Tournaments/25/Scotland-Scottish-League-Cup', name:'Scottish League Cup'},{id:118, url:'/Regions/253/Tournaments/118/Scotland-Scottish-Challenge-Cup', name:'Scottish Challenge Cup'},{id:637, url:'/Regions/253/Tournaments/637/Scotland-Scotland-Highland-Lowland', name:'Scotland Highland/Lowland'}]},
{type:0, id:195, flg:'flg-sn', name: 'Senegal', tournaments: [{id:359, url:'/Regions/195/Tournaments/359/Senegal-Championnat-National', name:'Championnat National'}]},
{type:0, id:196, flg:'flg-rs', name: 'Serbia', tournaments: [{id:80, url:'/Regions/196/Tournaments/80/Serbia-Super-Liga', name:'Super Liga'},{id:416, url:'/Regions/196/Tournaments/416/Serbia-Prva-Liga', name:'Prva Liga'},{id:112, url:'/Regions/196/Tournaments/112/Serbia-Cup', name:'Cup'}]},
{type:0, id:198, flg:'flg-sl', name: 'Sierra Leone', tournaments: [{id:360, url:'/Regions/198/Tournaments/360/Sierra-Leone-Premier-League', name:'Premier League'}]},
{type:0, id:199, flg:'flg-sg', name: 'Singapore', tournaments: [{id:254, url:'/Regions/199/Tournaments/254/Singapore-S-League', name:'S.League'},{id:443, url:'/Regions/199/Tournaments/443/Singapore-Cup', name:'Cup'},{id:444, url:'/Regions/199/Tournaments/444/Singapore-League-Cup', name:'League Cup'}]},
{type:0, id:200, flg:'flg-sk', name: 'Slovakia', tournaments: [{id:74, url:'/Regions/200/Tournaments/74/Slovakia-Corgon-Liga', name:'Corgon Liga'},{id:323, url:'/Regions/200/Tournaments/323/Slovakia-1-Division', name:'1. Division'},{id:107, url:'/Regions/200/Tournaments/107/Slovakia-FA-Cup', name:'FA Cup'},{id:130, url:'/Regions/200/Tournaments/130/Slovakia-Super-Cup', name:'Super Cup'}]},
{type:0, id:201, flg:'flg-si', name: 'Slovenia', tournaments: [{id:79, url:'/Regions/201/Tournaments/79/Slovenia-PrvaLiga', name:'PrvaLiga'},{id:417, url:'/Regions/201/Tournaments/417/Slovenia-2-Division', name:'2. Division'},{id:272, url:'/Regions/201/Tournaments/272/Slovenia-Playoff', name:'Playoff'},{id:108, url:'/Regions/201/Tournaments/108/Slovenia-Cup', name:'Cup'},{id:273, url:'/Regions/201/Tournaments/273/Slovenia-Super-Cup', name:'Super Cup'}]},
{type:0, id:202, flg:'flg-sb', name: 'Solomon Islands', tournaments: [{id:375, url:'/Regions/202/Tournaments/375/Solomon-Islands-National-Club-Championship', name:'National Club Championship'}]},
{type:0, id:204, flg:'flg-za', name: 'South Africa', tournaments: [{id:278, url:'/Regions/204/Tournaments/278/South-Africa-Premier-Soccer-League', name:'Premier Soccer League'},{id:525, url:'/Regions/204/Tournaments/525/South-Africa-', name:''},{id:579, url:'/Regions/204/Tournaments/579/South-Africa-', name:''},{id:580, url:'/Regions/204/Tournaments/580/South-Africa-', name:''}]},
{type:1, id:265, flg:'flg-csa', name: 'South America', tournaments: [{id:105, url:'/Regions/265/Tournaments/105/South-America-Copa-Libertadores', name:'Copa Libertadores'},{id:146, url:'/Regions/265/Tournaments/146/South-America-Copa-Sudamericana', name:'Copa Sudamericana'},{id:271, url:'/Regions/265/Tournaments/271/South-America-Recopa-Sudamericana', name:'Recopa Sudamericana'}]},
{type:0, id:260, flg:'flg-kr', name: 'South Korea', tournaments: [{id:387, url:'/Regions/260/Tournaments/387/South-Korea-K-League', name:'K. League'},{id:418, url:'/Regions/260/Tournaments/418/South-Korea-K2-League', name:'K2 League'},{id:641, url:'/Regions/260/Tournaments/641/South-Korea-', name:''},{id:560, url:'/Regions/260/Tournaments/560/South-Korea-', name:''},{id:634, url:'/Regions/260/Tournaments/634/South-Korea-South-Korea-National-League', name:'South Korea National League'}]},
{type:0, id:206, flg:'flg-es', name: 'Spain', tournaments: [{id:4, url:'/Regions/206/Tournaments/4/Spain-La-Liga', name:'La Liga'},{id:14, url:'/Regions/206/Tournaments/14/Spain-Copa-del-Rey', name:'Copa del Rey'},{id:61, url:'/Regions/206/Tournaments/61/Spain-Supercopa-de-Espana', name:'Supercopa de Espana'},{id:318, url:'/Regions/206/Tournaments/318/Spain-Segunda-B', name:'Segunda B'},{id:438, url:'/Regions/206/Tournaments/438/Spain-Tercera-Division', name:'Tercera Division'},{id:63, url:'/Regions/206/Tournaments/63/Spain-Segunda-División', name:'Segunda División'}]},
{type:0, id:208, flg:'flg-sd', name: 'Sudan', tournaments: [{id:316, url:'/Regions/208/Tournaments/316/Sudan-Premier-League', name:'Premier League'}]},
{type:0, id:211, flg:'flg-sz', name: 'Swaziland', tournaments: [{id:297, url:'/Regions/211/Tournaments/297/Swaziland-1-Division', name:'1. Division'}]},
{type:0, id:212, flg:'flg-se', name: 'Sweden', tournaments: [{id:40, url:'/Regions/212/Tournaments/40/Sweden-Allsvenskan', name:'Allsvenskan'},{id:48, url:'/Regions/212/Tournaments/48/Sweden-Superettan', name:'Superettan'},{id:158, url:'/Regions/212/Tournaments/158/Sweden-2-Division', name:'2. Division'},{id:98, url:'/Regions/212/Tournaments/98/Sweden-Allsvenskan-qualification', name:'Allsvenskan qualification'},{id:310, url:'/Regions/212/Tournaments/310/Sweden-Promotion-Relegation-2', name:'Promotion/Relegation 2'},{id:42, url:'/Regions/212/Tournaments/42/Sweden-Cup', name:'Cup'},{id:258, url:'/Regions/212/Tournaments/258/Sweden-Super-Cup', name:'Super Cup'},{id:553, url:'/Regions/212/Tournaments/553/Sweden-', name:''},{id:639, url:'/Regions/212/Tournaments/639/Sweden-', name:''},{id:439, url:'/Regions/212/Tournaments/439/Sweden-1-Division', name:'1. Division'},{id:611, url:'/Regions/212/Tournaments/611/Sweden-Sweden-Reserve-2', name:'Sweden Reserve 2'}]},
{type:0, id:213, flg:'flg-ch', name: 'Switzerland', tournaments: [{id:33, url:'/Regions/213/Tournaments/33/Switzerland-Super-League', name:'Super League'},{id:55, url:'/Regions/213/Tournaments/55/Switzerland-Challenge-League', name:'Challenge League'},{id:163, url:'/Regions/213/Tournaments/163/Switzerland-Playoff', name:'Playoff'},{id:45, url:'/Regions/213/Tournaments/45/Switzerland-Switzerland-Cup', name:'Switzerland Cup'},{id:529, url:'/Regions/213/Tournaments/529/Switzerland-', name:''},{id:461, url:'/Regions/213/Tournaments/461/Switzerland-1-Liga', name:'1.Liga'}]},
{type:0, id:214, flg:'flg-sy', name: 'Syria', tournaments: [{id:296, url:'/Regions/214/Tournaments/296/Syria-1-Division', name:'1. Division'}]},
{type:0, id:215, flg:'flg-tw', name: 'Taiwan', tournaments: [{id:337, url:'/Regions/215/Tournaments/337/Taiwan-Division-A', name:'Division A'}]},
{type:0, id:217, flg:'flg-tz', name: 'Tanzania', tournaments: [{id:382, url:'/Regions/217/Tournaments/382/Tanzania-Premier-League', name:'Premier League'}]},
{type:0, id:218, flg:'flg-th', name: 'Thailand', tournaments: [{id:335, url:'/Regions/218/Tournaments/335/Thailand-Premier-League', name:'Premier League'},{id:598, url:'/Regions/218/Tournaments/598/Thailand-Thailand-2', name:'Thailand 2'}]},
{type:0, id:220, flg:'flg-tg', name: 'Togo', tournaments: [{id:365, url:'/Regions/220/Tournaments/365/Togo-Championnat-National', name:'Championnat National'}]},
{type:0, id:223, flg:'flg-tt', name: 'Trinidad and Tobago', tournaments: [{id:361, url:'/Regions/223/Tournaments/361/Trinidad-and-Tobago-Professional-League', name:'Professional League'}]},
{type:0, id:224, flg:'flg-tn', name: 'Tunisia', tournaments: [{id:276, url:'/Regions/224/Tournaments/276/Tunisia-Ligue-Professionnelle-1', name:'Ligue Professionnelle 1'},{id:524, url:'/Regions/224/Tournaments/524/Tunisia-', name:''}]},
{type:0, id:225, flg:'flg-tr', name: 'Turkey', tournaments: [{id:17, url:'/Regions/225/Tournaments/17/Turkey-Super-Lig', name:'Super Lig'},{id:44, url:'/Regions/225/Tournaments/44/Turkey-Cup', name:'Cup'},{id:233, url:'/Regions/225/Tournaments/233/Turkey-Super-Cup', name:'Super Cup'},{id:140, url:'/Regions/225/Tournaments/140/Turkey-TFF-1-Lig', name:'TFF 1. Lig'},{id:280, url:'/Regions/225/Tournaments/280/Turkey-TFF-2-Lig', name:'TFF 2. Lig'},{id:327, url:'/Regions/225/Tournaments/327/Turkey-TFF-3-Lig', name:'TFF 3. Lig'},{id:229, url:'/Regions/225/Tournaments/229/Turkey-Playoff', name:'Playoff'},{id:514, url:'/Regions/225/Tournaments/514/Turkey-Spor-Toto-Cup', name:'Spor Toto Cup'}]},
{type:0, id:231, flg:'flg-ae', name: 'U.A.E.', tournaments: [{id:295, url:'/Regions/231/Tournaments/295/U-A-E-1-Division', name:'1. Division'}]},
{type:0, id:229, flg:'flg-ug', name: 'Uganda', tournaments: [{id:371, url:'/Regions/229/Tournaments/371/Uganda-Super-League', name:'Super League'}]},
{type:0, id:230, flg:'flg-ua', name: 'Ukraine', tournaments: [{id:114, url:'/Regions/230/Tournaments/114/Ukraine-Premier-League', name:'Premier League'},{id:125, url:'/Regions/230/Tournaments/125/Ukraine-Cup', name:'Cup'},{id:164, url:'/Regions/230/Tournaments/164/Ukraine-Super-Cup', name:'Super Cup'},{id:408, url:'/Regions/230/Tournaments/408/Ukraine-1-Division', name:'1. Division'}]},
{type:0, id:235, flg:'flg-uy', name: 'Uruguay', tournaments: [{id:196, url:'/Regions/235/Tournaments/196/Uruguay-Primera-Division', name:'Primera Division'},{id:423, url:'/Regions/235/Tournaments/423/Uruguay-Segunda-Division', name:'Segunda Division'}]},
{type:0, id:233, flg:'flg-us', name: 'USA', tournaments: [{id:85, url:'/Regions/233/Tournaments/85/USA-Major-League-Soccer', name:'Major League Soccer'},{id:322, url:'/Regions/233/Tournaments/322/USA-USL-1', name:'USL 1'},{id:594, url:'/Regions/233/Tournaments/594/USA-', name:''},{id:568, url:'/Regions/233/Tournaments/568/USA-US-Open', name:'US Open'},{id:498, url:'/Regions/233/Tournaments/498/USA-USL-Pro-League', name:'USL Pro League'}]},
{type:0, id:236, flg:'flg-uz', name: 'Uzbekistan', tournaments: [{id:251, url:'/Regions/236/Tournaments/251/Uzbekistan-Oliy-League', name:'Oliy League'},{id:521, url:'/Regions/236/Tournaments/521/Uzbekistan-', name:''},{id:643, url:'/Regions/236/Tournaments/643/Uzbekistan-', name:''}]},
{type:0, id:238, flg:'flg-ve', name: 'Venezuela', tournaments: [{id:237, url:'/Regions/238/Tournaments/237/Venezuela-Primera-Division', name:'Primera Division'},{id:420, url:'/Regions/238/Tournaments/420/Venezuela-Segunda-Division-Apertura', name:'Segunda Division - Apertura'},{id:642, url:'/Regions/238/Tournaments/642/Venezuela-', name:''}]},
{type:0, id:239, flg:'flg-vn', name: 'Vietnam', tournaments: [{id:602, url:'/Regions/239/Tournaments/602/Vietnam-Viet-nam-2', name:'Viet nam 2'},{id:392, url:'/Regions/239/Tournaments/392/Vietnam-V-league', name:'V-league'}]},
{type:0, id:254, flg:'flg-gb-wls', name: 'Wales', tournaments: [{id:138, url:'/Regions/254/Tournaments/138/Wales-Premier-Division', name:'Premier Division'},{id:151, url:'/Regions/254/Tournaments/151/Wales-Cup', name:'Cup'},{id:520, url:'/Regions/254/Tournaments/520/Wales-', name:''},{id:448, url:'/Regions/254/Tournaments/448/Wales-Welsh-Cup', name:'Welsh Cup'}]},
{type:0, id:244, flg:'flg-ye', name: 'Yemen', tournaments: [{id:306, url:'/Regions/244/Tournaments/306/Yemen-1-Division', name:'1. Division'}]},
{type:0, id:245, flg:'flg-zm', name: 'Zambia', tournaments: [{id:252, url:'/Regions/245/Tournaments/252/Zambia-1-Division', name:'1. Division'}]},
{type:0, id:246, flg:'flg-zw', name: 'Zimbabwe', tournaments: [{id:253, url:'/Regions/246/Tournaments/253/Zimbabwe-1-Division', name:'1. Division'}]}];

var favoriteTournaments = new WS.FavoriteTournaments();

$(function () {
    var tournamentCollapsedIcon = 'ui-icon-triangle-1-s',
        tournamentExpandedIcon = 'ui-icon-triangle-1-n';

    //Expandable/Collapsable
    $('#tournament-groups').bind('activation-finished', function(e, selected){
        //Clear other tab icons
        $('#tournament-groups .ui-icon.' + tournamentExpandedIcon).each(function(){
            if(!$(this).parent('a').hasClass('selected')){
                $(this).removeClass(tournamentExpandedIcon)
                       .addClass(tournamentCollapsedIcon);
            }
        });

        var $tournamentGroup = $(selected);
        var $groupPanel = $($tournamentGroup.attr('href'));
        var $icon = $('.ui-icon', $tournamentGroup);

        //using :visible doesn't work consistently
        if($groupPanel.isVisible()){
            //Opened by tabs plugin first time. Just change the icon.
            if($icon.hasClass(tournamentCollapsedIcon)){
                $icon.removeClass(tournamentCollapsedIcon)
                        .addClass(tournamentExpandedIcon);

            } else {
                //Collapse
                $icon.removeClass(tournamentExpandedIcon)
                        .addClass(tournamentCollapsedIcon);

                $groupPanel.hide();
            }
        } else {
            //Expand
            $icon.removeClass(tournamentCollapsedIcon)
                    .addClass(tournamentExpandedIcon);

            $groupPanel.show();
        }
    });

    favoriteTournaments.init();
});
</script>

    <div id="layout-content-wrapper">
        
    


    <div id="matchslider-container"></div>
    <script type="text/javascript">
        
        var topMatches = [{"regionId":247,"regionCode":"cint","regionName":"International","tournamentId":27,"tournamentName":"Int. Friendly","tournamentShortName":"IF","seasonId":6536,"seasonName":"2017","stageId":14227,"stageName":"Friendlies","id":1144588,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":6,"displayName":"Finished"},"startTimeUtc":"2017-06-13T19:00:00Z","homeTeamId":341,"homeTeamName":"France","homeTeamCode":"Fra","homeTeamCountryId":74,"homeTeamCountryName":"France","homeRunningScore":3,"awayTeamId":345,"awayTeamName":"England","awayTeamCode":"Eng","awayTeamCountryId":252,"awayTeamCountryName":"England","awayRunningScore":2,"hasPreview":true},{"regionId":31,"regionCode":"br","regionName":"Brazil","tournamentId":95,"tournamentName":"Brasileirão","tournamentShortName":"BSA","seasonId":6700,"seasonName":"2017","stageId":14746,"stageName":"Serie A","id":1175317,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":6,"displayName":"Finished"},"startTimeUtc":"2017-06-15T00:45:00Z","homeTeamId":1237,"homeTeamName":"Corinthians","homeTeamCode":"Cor","homeTeamCountryId":31,"homeTeamCountryName":"Brazil","homeRunningScore":1,"awayTeamId":1230,"awayTeamName":"Cruzeiro","awayTeamCode":"Cru","awayTeamCountryId":31,"awayTeamCountryName":"Brazil","awayRunningScore":0,"hasPreview":true},{"regionId":31,"regionCode":"br","regionName":"Brazil","tournamentId":95,"tournamentName":"Brasileirão","tournamentShortName":"BSA","seasonId":6700,"seasonName":"2017","stageId":14746,"stageName":"Serie A","id":1175314,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":6,"displayName":"Finished"},"startTimeUtc":"2017-06-15T00:45:00Z","homeTeamId":1241,"homeTeamName":"Santos FC","homeTeamCode":"San","homeTeamCountryId":31,"homeTeamCountryName":"Brazil","homeRunningScore":1,"awayTeamId":1234,"awayTeamName":"Palmeiras","awayTeamCode":"Pal","awayTeamCountryId":31,"awayTeamCountryName":"Brazil","awayRunningScore":0,"hasPreview":true},{"regionId":31,"regionCode":"br","regionName":"Brazil","tournamentId":95,"tournamentName":"Brasileirão","tournamentShortName":"BSA","seasonId":6700,"seasonName":"2017","stageId":14746,"stageName":"Serie A","id":1175308,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":6,"displayName":"Finished"},"startTimeUtc":"2017-06-16T00:00:00Z","homeTeamId":1232,"homeTeamName":"Fluminense","homeTeamCode":"Flu","homeTeamCountryId":31,"homeTeamCountryName":"Brazil","homeRunningScore":0,"awayTeamId":1244,"awayTeamName":"Gremio","awayTeamCode":"Gre","awayTeamCountryId":31,"awayTeamCountryName":"Brazil","awayRunningScore":2,"hasPreview":true},{"regionId":11,"regionCode":"ar","regionName":"Argentina","tournamentId":68,"tournamentName":"Primera División","tournamentShortName":"APD","seasonId":6484,"seasonName":"2016/2017","stageId":14066,"stageName":"Primera Division","id":1122297,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":6,"displayName":"Finished"},"startTimeUtc":"2017-06-16T00:30:00Z","homeTeamId":891,"homeTeamName":"Colon","homeTeamCode":"Col","homeTeamCountryId":11,"homeTeamCountryName":"Argentina","homeRunningScore":2,"awayTeamId":906,"awayTeamName":"San Lorenzo","awayTeamCode":"SAL","awayTeamCountryId":11,"awayTeamCountryName":"Argentina","awayRunningScore":1,"hasPreview":true},{"regionId":247,"regionCode":"cint","regionName":"International","tournamentId":123,"tournamentName":"EURO U-21","tournamentShortName":"IEU","seasonId":6589,"seasonName":"2017","stageId":14378,"stageName":"EURO U21 Grp. A","id":1150694,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":6,"displayName":"Finished"},"startTimeUtc":"2017-06-16T16:00:00Z","homeTeamId":1820,"homeTeamName":"Sweden U21","homeTeamCode":"Swe","homeTeamCountryId":212,"homeTeamCountryName":"Sweden","homeRunningScore":0,"awayTeamId":1913,"awayTeamName":"England U21","awayTeamCode":"Eng","awayTeamCountryId":252,"awayTeamCountryName":"England","awayRunningScore":0,"hasPreview":true},{"regionId":247,"regionCode":"cint","regionName":"International","tournamentId":123,"tournamentName":"EURO U-21","tournamentShortName":"IEU","seasonId":6589,"seasonName":"2017","stageId":14378,"stageName":"EURO U21 Grp. A","id":1150695,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":6,"displayName":"Finished"},"startTimeUtc":"2017-06-16T18:45:00Z","homeTeamId":1830,"homeTeamName":"Poland U21","homeTeamCode":"Pol","homeTeamCountryId":176,"homeTeamCountryName":"Poland","homeRunningScore":1,"awayTeamId":1822,"awayTeamName":"Slovakia U21","awayTeamCode":"Slo","awayTeamCountryId":200,"awayTeamCountryName":"Slovakia","awayRunningScore":2,"hasPreview":true},{"regionId":11,"regionCode":"ar","regionName":"Argentina","tournamentId":68,"tournamentName":"Primera División","tournamentShortName":"APD","seasonId":6484,"seasonName":"2016/2017","stageId":14066,"stageName":"Primera Division","id":1122296,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":6,"displayName":"Finished"},"startTimeUtc":"2017-06-17T00:15:00Z","homeTeamId":1303,"homeTeamName":"Banfield","homeTeamCode":"Ban","homeTeamCountryId":11,"homeTeamCountryName":"Argentina","homeRunningScore":3,"awayTeamId":903,"awayTeamName":"Rosario Central","awayTeamCode":"Ros","awayTeamCountryId":11,"awayTeamCountryName":"Argentina","awayRunningScore":1,"hasPreview":true},{"regionId":247,"regionCode":"cint","regionName":"International","tournamentId":89,"tournamentName":"Confederations Cup","tournamentShortName":"ICC","seasonId":5968,"seasonName":"2017","stageId":12764,"stageName":"Confederations Cup Grp. A","id":1150206,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-17T15:00:00Z","homeTeamId":326,"homeTeamName":"Russia","homeTeamCode":"Rus","homeTeamCountryId":182,"homeTeamCountryName":"Russia","awayTeamId":1918,"awayTeamName":"New Zealand","awayTeamCode":"New","awayTeamCountryId":158,"awayTeamCountryName":"New Zealand","hasPreview":true},{"regionId":247,"regionCode":"cint","regionName":"International","tournamentId":123,"tournamentName":"EURO U-21","tournamentShortName":"IEU","seasonId":6589,"seasonName":"2017","stageId":14379,"stageName":"EURO U21 Grp. B","id":1150700,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-17T16:00:00Z","homeTeamId":1835,"homeTeamName":"Portugal U21","homeTeamCode":"Por","homeTeamCountryId":177,"homeTeamCountryName":"Portugal","awayTeamId":1916,"awayTeamName":"Serbia U21","awayTeamCode":"Ser","awayTeamCountryId":196,"awayTeamCountryName":"Serbia","hasPreview":true},{"regionId":233,"regionCode":"us","regionName":"USA","tournamentId":85,"tournamentName":"Major League Soccer","tournamentShortName":"UMLS","seasonId":6620,"seasonName":"2017","stageId":14550,"stageName":"Major League Soccer","id":1163822,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-17T17:00:00Z","homeTeamId":19584,"homeTeamName":"New York City FC","homeTeamCode":"NYC","homeTeamCountryId":233,"homeTeamCountryName":"USA","awayTeamId":5973,"awayTeamName":"Seattle Sounders FC","awayTeamCode":"Sea","awayTeamCountryId":233,"awayTeamCountryName":"USA","hasPreview":true},{"regionId":247,"regionCode":"cint","regionName":"International","tournamentId":123,"tournamentName":"EURO U-21","tournamentShortName":"IEU","seasonId":6589,"seasonName":"2017","stageId":14379,"stageName":"EURO U21 Grp. B","id":1150701,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-17T18:45:00Z","homeTeamId":1832,"homeTeamName":"Spain U21","homeTeamCode":"Spa","homeTeamCountryId":206,"homeTeamCountryName":"Spain","awayTeamId":1836,"awayTeamName":"Macedonia U21","awayTeamCode":"Mac","awayTeamCountryId":130,"awayTeamCountryName":"Macedonia","hasPreview":true},{"regionId":11,"regionCode":"ar","regionName":"Argentina","tournamentId":68,"tournamentName":"Primera División","tournamentShortName":"APD","seasonId":6484,"seasonName":"2016/2017","stageId":14066,"stageName":"Primera Division","id":1122284,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-17T20:45:00Z","homeTeamId":6145,"homeTeamName":"Aldosivi","homeTeamCode":"Ald","homeTeamCountryId":11,"homeTeamCountryName":"Argentina","awayTeamId":889,"awayTeamName":"Boca Juniors","awayTeamCode":"Boc","awayTeamCountryId":11,"awayTeamCountryName":"Argentina","hasPreview":true},{"regionId":233,"regionCode":"us","regionName":"USA","tournamentId":85,"tournamentName":"Major League Soccer","tournamentShortName":"UMLS","seasonId":6620,"seasonName":"2017","stageId":14550,"stageName":"Major League Soccer","id":1163742,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-18T03:00:00Z","homeTeamId":1117,"homeTeamName":"LA Galaxy","homeTeamCode":"GAL","homeTeamCountryId":233,"homeTeamCountryName":"USA","awayTeamId":3624,"awayTeamName":"Houston Dynamo","awayTeamCode":"Hou","awayTeamCountryId":233,"awayTeamCountryName":"USA","hasPreview":true},{"regionId":247,"regionCode":"cint","regionName":"International","tournamentId":89,"tournamentName":"Confederations Cup","tournamentShortName":"ICC","seasonId":5968,"seasonName":"2017","stageId":12764,"stageName":"Confederations Cup Grp. A","id":1150207,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-18T15:00:00Z","homeTeamId":340,"homeTeamName":"Portugal","homeTeamCode":"Por","homeTeamCountryId":177,"homeTeamCountryName":"Portugal","awayTeamId":972,"awayTeamName":"Mexico","awayTeamCode":"Mex","awayTeamCountryId":142,"awayTeamCountryName":"Mexico","hasPreview":true},{"regionId":165,"regionCode":"no","regionName":"Norway","tournamentId":41,"tournamentName":"Eliteserien","tournamentShortName":"NE","seasonId":6609,"seasonName":"2017","stageId":14501,"stageName":"Eliteserien","id":1154367,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-18T16:00:00Z","homeTeamId":438,"homeTeamName":"FK Haugesund","homeTeamCode":"HAU","homeTeamCountryId":165,"homeTeamCountryName":"Norway","awayTeamId":351,"awayTeamName":"Rosenborg","awayTeamCode":"Ros","awayTeamCountryId":165,"awayTeamCountryName":"Norway","hasPreview":true},{"regionId":247,"regionCode":"cint","regionName":"International","tournamentId":123,"tournamentName":"EURO U-21","tournamentShortName":"IEU","seasonId":6589,"seasonName":"2017","stageId":14380,"stageName":"EURO U21 Grp. C","id":1150706,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-18T16:00:00Z","homeTeamId":1816,"homeTeamName":"Germany U21","homeTeamCode":"Ger","homeTeamCountryId":81,"homeTeamCountryName":"Germany","awayTeamId":1919,"awayTeamName":"Czech Republic U21","awayTeamCode":"Cze","awayTeamCountryId":58,"awayTeamCountryName":"Czech Republic","hasPreview":true},{"regionId":247,"regionCode":"cint","regionName":"International","tournamentId":89,"tournamentName":"Confederations Cup","tournamentShortName":"ICC","seasonId":5968,"seasonName":"2017","stageId":12765,"stageName":"Confederations Cup Grp. B","id":1170431,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-18T18:00:00Z","homeTeamId":863,"homeTeamName":"Cameroon","homeTeamCode":"Cam","homeTeamCountryId":38,"homeTeamCountryName":"Cameroon","awayTeamId":418,"awayTeamName":"Chile","awayTeamCode":"Chi","awayTeamCountryId":44,"awayTeamCountryName":"Chile","hasPreview":true},{"regionId":247,"regionCode":"cint","regionName":"International","tournamentId":123,"tournamentName":"EURO U-21","tournamentShortName":"IEU","seasonId":6589,"seasonName":"2017","stageId":14380,"stageName":"EURO U21 Grp. C","id":1150707,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-18T18:45:00Z","homeTeamId":1818,"homeTeamName":"Denmark U21","homeTeamCode":"Den","homeTeamCountryId":59,"homeTeamCountryName":"Denmark","awayTeamId":1814,"awayTeamName":"Italy U21","awayTeamCode":"Ita","awayTeamCountryId":108,"awayTeamCountryName":"Italy","hasPreview":true},{"regionId":31,"regionCode":"br","regionName":"Brazil","tournamentId":95,"tournamentName":"Brasileirão","tournamentShortName":"BSA","seasonId":6700,"seasonName":"2017","stageId":14746,"stageName":"Serie A","id":1175347,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-18T19:00:00Z","homeTeamId":1224,"homeTeamName":"Sao Paulo","homeTeamCode":"Sao","homeTeamCountryId":31,"homeTeamCountryName":"Brazil","awayTeamId":1235,"awayTeamName":"Atletico MG","awayTeamCode":"Atl","awayTeamCountryId":31,"awayTeamCountryName":"Brazil","hasPreview":true},{"regionId":31,"regionCode":"br","regionName":"Brazil","tournamentId":95,"tournamentName":"Brasileirão","tournamentShortName":"BSA","seasonId":6700,"seasonName":"2017","stageId":14746,"stageName":"Serie A","id":1175338,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-18T19:00:00Z","homeTeamId":1232,"homeTeamName":"Fluminense","homeTeamCode":"Flu","homeTeamCountryId":31,"homeTeamCountryName":"Brazil","awayTeamId":1239,"awayTeamName":"Flamengo","awayTeamCode":"Fla","awayTeamCountryId":31,"awayTeamCountryName":"Brazil","hasPreview":true},{"regionId":11,"regionCode":"ar","regionName":"Argentina","tournamentId":68,"tournamentName":"Primera División","tournamentShortName":"APD","seasonId":6484,"seasonName":"2016/2017","stageId":14066,"stageName":"Primera Division","id":1122298,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-18T20:15:00Z","homeTeamId":905,"homeTeamName":"River Plate","homeTeamCode":"Riv","homeTeamCountryId":11,"homeTeamCountryName":"Argentina","awayTeamId":890,"awayTeamName":"Racing Club","awayTeamCode":"Rac","awayTeamCountryId":11,"awayTeamCountryName":"Argentina","hasPreview":true},{"regionId":247,"regionCode":"cint","regionName":"International","tournamentId":89,"tournamentName":"Confederations Cup","tournamentShortName":"ICC","seasonId":5968,"seasonName":"2017","stageId":12765,"stageName":"Confederations Cup Grp. B","id":1150212,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-19T15:00:00Z","homeTeamId":328,"homeTeamName":"Australia","homeTeamCode":"Aus","homeTeamCountryId":14,"homeTeamCountryName":"Australia","awayTeamId":336,"awayTeamName":"Germany","awayTeamCode":"Ger","awayTeamCountryId":81,"awayTeamCountryName":"Germany","hasPreview":true},{"regionId":165,"regionCode":"no","regionName":"Norway","tournamentId":41,"tournamentName":"Eliteserien","tournamentShortName":"NE","seasonId":6609,"seasonName":"2017","stageId":14501,"stageName":"Eliteserien","id":1154373,"isTopMatch":true,"previewStatus":{"value":0,"displayName":"None"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-19T17:00:00Z","homeTeamId":446,"homeTeamName":"Brann","homeTeamCode":"Bra","homeTeamCountryId":165,"homeTeamCountryName":"Norway","awayTeamId":429,"awayTeamName":"Stabaek","awayTeamCode":"Sta","awayTeamCountryId":165,"awayTeamCountryName":"Norway","hasPreview":false},{"regionId":31,"regionCode":"br","regionName":"Brazil","tournamentId":95,"tournamentName":"Brasileirão","tournamentShortName":"BSA","seasonId":6700,"seasonName":"2017","stageId":14746,"stageName":"Serie A","id":1175350,"isTopMatch":true,"previewStatus":{"value":2,"displayName":"Published"},"status":{"value":1,"displayName":"NotStarted"},"startTimeUtc":"2017-06-19T23:00:00Z","homeTeamId":1230,"homeTeamName":"Cruzeiro","homeTeamCode":"Cru","homeTeamCountryId":31,"homeTeamCountryName":"Brazil","awayTeamId":1244,"awayTeamName":"Gremio","awayTeamCode":"Gre","awayTeamCountryId":31,"awayTeamCountryName":"Brazil","hasPreview":true}];
        
        window.currentView = 'homepage';

    </script>
    <script type="text/javascript">
                if (!window.currentViews) {
                    window.currentViews = {};
                }
                
                window.currentViews['homepage'] = true;
            </script>
<script type="text/javascript" data-main="https://d2zywfiolv4f83.cloudfront.net/js/ws.new.min.js?v=1494339304" src="https://d2zywfiolv4f83.cloudfront.net/js/vendor/require.2.1.9.min.js?v=1494339304"></script>

    
    <div class="layout-content-2col-left">

        
        <h2 style="padding-top: 0">
            <a title="See all livescores" href="/Matches" class="iconize iconize-icon-right ui-state-transparent-default disabled">
                Live Scores Summary
                <span class="ui-icon ui-icon-circle-arrow-e"></span>
            </a>
        </h2>
        <div id="home-matches-toolbar">
            <dl class="listbox">
                <dt>View:</dt>
                <dd>
                    <div id="home-matches-view-options">
                        <a class="yesterday option rc" href="#yesterday">Yesterday (47)</a>
                        <a class="today selected option rc" href="#today">Today (132)</a>
                        <a class="tomorrow option rc" href="#tomorrow">Tomorrow (107)</a>
                    </div>
                </dd>
            </dl>
        </div>
        <div id="home-livescore-summary">
            <div class="livescore-map-container" style="display:none;" title="Go to Livescores">
                <div id="home-livescore-map" class="livescore-map"></div>
                <a id="home-livescore-counter" href="/LiveScores">
                    <span id="calendar-pages-header">Today's Games</span>
                    <span id="calendar-pages">
                        <div id="calendar-pages-container">
                            <div id="calendar-page-upcoming" class="calendar-page">
                                <div class="match-count">124</div>
                            </div>
                            <div id="calendar-page-live" class="calendar-page">
                                <div class="match-count live">1</div>
                            </div>
                            <div id="calendar-page-finished" class="calendar-page">
                                <div class="match-count">7</div>
                            </div>
                        </div>
                    </span>
                    <span id="livescores-link">
                        <span class="iconize iconize-icon-right ui-state-transparent-default disabled">
                            Follow All Matches<span class="ui-icon ui-icon-circle-arrow-e"></span>
                        </span>
                    </span>
                </a>
                <ul class="legends">
                    <li>
                        <span class="box" style="background-color: #F9B820;">&nbsp;</span>Upcoming
                    </li>
                    <li>
                        <span id="live-legend" class="box" style="background-color: #8DC63F;">&nbsp;</span>Live
                    </li>
                    <li>
                        <span class="box" style="background-color: #666;">&nbsp;</span>Finished
                    </li>
                </ul>
            </div>
            
  <!-- /79450181/WS_668x70 -->
  <div id='WS_668x70' style="text-align: center;">
    <script type='text/javascript'>
      googletag.cmd.push(function() { googletag.display('WS_668x70'); });
    </script>
  </div>

            <div id="yesterday" class="home-matches-container" style="display: none;">
            </div>
            <div id="today" class="home-matches-container" data-loaded="true">
                
        <div class="livescores-summary">
            
                <table class="detailed-tournaments grid">
                    <tbody>
                    
                            <tr class="tournament">
                                    <td colspan="99"><div class="tournament-name-container"><a title='Go to tournament page' href='/Regions/31/Tournaments/95/Seasons/6700/Stages/14746/Show/Brazil-Brasileirão' class='tournament-link'><span class="group-name iconize iconize-icon-left"><span class="ui-icon country flg-br"></span>Brazil - Serie A </span></a><span class="detcover rc">Detailed coverage</span><span class="tournament-favourite-status" data-tournament-id="95"></span><span class="livescore-map-matches-info"></span></div><a class='show-matches button-small ui-state-transparent-default rc' data-id="14746" title=livescores_toggle_tournament_detail><span class='ui-icon ui-icon-triangle-1-s'></span></div></td>  
                            </tr>
                            
                                <tr class="match" data-id="1175362"  data-group-id="14746">
                                    <td class="toolbar left"></td><td class="time">20:00</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/6368/Show/Brazil-Atletico-GO" class="team-link ">Atletico GO</a></td><td class="result"><a class="result-4 rc" href="/Matches/1175362/Show/Brazil-Brasileirão-2017-Atletico-GO-Atletico-PR" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/1243/Show/Brazil-Atletico-PR" class="team-link ">Atletico PR</a></td><td class="toolbar right"><a href="/Matches/1175362/Preview/Brazil-Brasileirão-2017-Atletico-GO-Atletico-PR" class="match-link rc preview" title="Check Preview!">Preview</a><a href="/Matches/1175362/LiveStream/Brazil-Brasileirão-2017-Atletico-GO-Atletico-PR" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1175341"  data-group-id="14746">
                                    <td class="toolbar left"></td><td class="time">23:00</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/1226/Show/Brazil-Vasco-da-Gama" class="team-link ">Vasco da Gama</a></td><td class="result"><a class="result-4 rc" href="/Matches/1175341/Show/Brazil-Brasileirão-2017-Vasco-da-Gama-Avai-FC" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/4619/Show/Brazil-Avai-FC" class="team-link ">Avai FC</a></td><td class="toolbar right"><a href="/Matches/1175341/Preview/Brazil-Brasileirão-2017-Vasco-da-Gama-Avai-FC" class="match-link rc preview" title="Check Preview!">Preview</a><a href="/Matches/1175341/LiveStream/Brazil-Brasileirão-2017-Vasco-da-Gama-Avai-FC" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                            <tr class="tournament">
                                    <td colspan="99"><div class="tournament-name-container"><a title='Go to tournament page' href='/Regions/233/Tournaments/85/Seasons/6620/Stages/14550/Show/USA-Major-League-Soccer' class='tournament-link'><span class="group-name iconize iconize-icon-left"><span class="ui-icon country flg-us"></span>USA - Major League Soccer </span></a><span class="detcover rc">Detailed coverage</span><span class="tournament-favourite-status" data-tournament-id="85"></span><span class="livescore-map-matches-info"></span></div><a class='show-matches button-small ui-state-transparent-default rc' data-id="14550" title=livescores_toggle_tournament_detail><span class='ui-icon ui-icon-triangle-1-s'></span></div></td>  
                            </tr>
                            
                                <tr class="match" data-id="1163822"  data-group-id="14550">
                                    <td class="toolbar left"></td><td class="time">18:00</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"><span title="Top match" class='incidents-icon ui-icon topmatch'></span></td><td class="team home"><a href="/Teams/19584/Show/USA-New-York-City-FC" class="team-link ">New York City FC</a></td><td class="result"><a class="result-4 rc" href="/Matches/1163822/Show/USA-Major-League-Soccer-2017-New-York-City-FC-Seattle-Sounders-FC" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/5973/Show/USA-Seattle-Sounders-FC" class="team-link ">Seattle Sounders FC</a></td><td class="toolbar right"><a href="/Matches/1163822/Preview/USA-Major-League-Soccer-2017-New-York-City-FC-Seattle-Sounders-FC" class="match-link rc preview" title="Check Preview!">Preview</a><a href="/Matches/1163822/LiveStream/USA-Major-League-Soccer-2017-New-York-City-FC-Seattle-Sounders-FC" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1163823"  data-group-id="14550">
                                    <td class="toolbar left"></td><td class="time">00:00</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/26666/Show/USA-Atlanta-United" class="team-link ">Atlanta United</a></td><td class="result"><a class="result-4 rc" href="/Matches/1163823/Show/USA-Major-League-Soccer-2017-Atlanta-United-Columbus-Crew" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/1113/Show/USA-Columbus-Crew" class="team-link ">Columbus Crew</a></td><td class="toolbar right"><a href="/Matches/1163823/Preview/USA-Major-League-Soccer-2017-Atlanta-United-Columbus-Crew" class="match-link rc preview" title="Check Preview!">Preview</a><a href="/Matches/1163823/LiveStream/USA-Major-League-Soccer-2017-Atlanta-United-Columbus-Crew" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1163825"  data-group-id="14550">
                                    <td class="toolbar left"></td><td class="time">00:30</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/1114/Show/USA-New-England-Rev-" class="team-link ">New England Rev.</a></td><td class="result"><a class="result-4 rc" href="/Matches/1163825/Show/USA-Major-League-Soccer-2017-New-England-Rev-Chicago-Fire" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/1118/Show/USA-Chicago-Fire" class="team-link ">Chicago Fire</a></td><td class="toolbar right"><a href="/Matches/1163825/Preview/USA-Major-League-Soccer-2017-New-England-Rev-Chicago-Fire" class="match-link rc preview" title="Check Preview!">Preview</a><a href="/Matches/1163825/LiveStream/USA-Major-League-Soccer-2017-New-England-Rev-Chicago-Fire" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1163826"  data-group-id="14550">
                                    <td class="toolbar left"></td><td class="time">00:30</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/10221/Show/USA-Orlando-City" class="team-link ">Orlando City</a></td><td class="result"><a class="result-4 rc" href="/Matches/1163826/Show/USA-Major-League-Soccer-2017-Orlando-City-Montreal-Impact" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/11135/Show/Canada-Montreal-Impact" class="team-link ">Montreal Impact</a></td><td class="toolbar right"><a href="/Matches/1163826/Preview/USA-Major-League-Soccer-2017-Orlando-City-Montreal-Impact" class="match-link rc preview" title="Check Preview!">Preview</a><a href="/Matches/1163826/LiveStream/USA-Major-League-Soccer-2017-Orlando-City-Montreal-Impact" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                            <tr class="tournament">
                                    <td colspan="99"><div class="tournament-name-container"><a title='Go to tournament page' href='/Regions/11/Tournaments/68/Seasons/6484/Stages/14066/Show/Argentina-Primera-División' class='tournament-link'><span class="group-name iconize iconize-icon-left"><span class="ui-icon country flg-ar"></span>Argentina - Primera Division </span></a><span class="detcover rc">Detailed coverage</span><span class="tournament-favourite-status" data-tournament-id="68"></span><span class="livescore-map-matches-info"></span></div><a class='show-matches button-small ui-state-transparent-default rc' data-id="14066" title=livescores_toggle_tournament_detail><span class='ui-icon ui-icon-triangle-1-s'></span></div></td>  
                            </tr>
                            
                                <tr class="match" data-id="1122296"  data-group-id="14066">
                                    <td class="toolbar left"><a title="Expand details" class='show-incidents button-small ui-state-transparent-default rc' href='#'><span class='ui-icon ui-icon-triangle-1-e'></span></a></td><td class="time">01:15</td><td class="status"><span class="status-1 rc">FT</span></td><td class="topmatch-column"><span title="Top match" class='incidents-icon ui-icon topmatch'></span></td><td class="team home"><a href="/Teams/1303/Show/Argentina-Banfield" class="team-link ">Banfield</a></td><td class="result"><a class="result-1 rc" href="/Matches/1122296/Live/Argentina-Primera-División-2016-2017-Banfield-Rosario-Central">3 : 1</a></td><td class="team away"><a href="/Teams/903/Show/Argentina-Rosario-Central" class="team-link ">Rosario Central</a></td><td class="toolbar right"><a href="/Matches/1122296/MatchReport/Argentina-Primera-División-2016-2017-Banfield-Rosario-Central" class="match-link rc match-report" title="Check Match Report!">Match Report</a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1122289"  data-group-id="14066">
                                    <td class="toolbar left"></td><td class="time">18:00</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/1746/Show/Argentina-Arsenal-Sarandi" class="team-link ">Arsenal Sarandi</a></td><td class="result"><a class="result-4 rc" href="/Matches/1122289/Show/Argentina-Primera-División-2016-2017-Arsenal-Sarandi-Godoy-Cruz" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/3802/Show/Argentina-Godoy-Cruz" class="team-link ">Godoy Cruz</a></td><td class="toolbar right"><a href="/Matches/1122289/Preview/Argentina-Primera-División-2016-2017-Arsenal-Sarandi-Godoy-Cruz" class="match-link rc preview" title="Check Preview!">Preview</a><a href="/Matches/1122289/LiveStream/Argentina-Primera-División-2016-2017-Arsenal-Sarandi-Godoy-Cruz" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1122288"  data-group-id="14066">
                                    <td class="toolbar left"></td><td class="time">20:15</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/901/Show/Argentina-Estudiantes" class="team-link ">Estudiantes</a></td><td class="result"><a class="result-4 rc" href="/Matches/1122288/Show/Argentina-Primera-División-2016-2017-Estudiantes-Belgrano" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/894/Show/Argentina-Belgrano" class="team-link ">Belgrano</a></td><td class="toolbar right"><a href="/Matches/1122288/Preview/Argentina-Primera-División-2016-2017-Estudiantes-Belgrano" class="match-link rc preview" title="Check Preview!">Preview</a><a href="/Matches/1122288/LiveStream/Argentina-Primera-División-2016-2017-Estudiantes-Belgrano" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1122290"  data-group-id="14066">
                                    <td class="toolbar left"></td><td class="time">21:15</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/2134/Show/Argentina-Atletico-Rafaela" class="team-link ">Atletico Rafaela</a></td><td class="result"><a class="result-4 rc" href="/Matches/1122290/Show/Argentina-Primera-División-2016-2017-Atletico-Rafaela-Quilmes" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/2133/Show/Argentina-Quilmes" class="team-link ">Quilmes</a></td><td class="toolbar right"><a href="/Matches/1122290/Preview/Argentina-Primera-División-2016-2017-Atletico-Rafaela-Quilmes" class="match-link rc preview" title="Check Preview!">Preview</a><a href="/Matches/1122290/LiveStream/Argentina-Primera-División-2016-2017-Atletico-Rafaela-Quilmes" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1122284"  data-group-id="14066">
                                    <td class="toolbar left"></td><td class="time">21:45</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"><span title="Top match" class='incidents-icon ui-icon topmatch'></span></td><td class="team home"><a href="/Teams/6145/Show/Argentina-Aldosivi" class="team-link ">Aldosivi</a></td><td class="result"><a class="result-4 rc" href="/Matches/1122284/Show/Argentina-Primera-División-2016-2017-Aldosivi-Boca-Juniors" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/889/Show/Argentina-Boca-Juniors" class="team-link ">Boca Juniors</a></td><td class="toolbar right"><a href="/Matches/1122284/Preview/Argentina-Primera-División-2016-2017-Aldosivi-Boca-Juniors" class="match-link rc preview" title="Check Preview!">Preview</a><a href="/Matches/1122284/LiveStream/Argentina-Primera-División-2016-2017-Aldosivi-Boca-Juniors" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1122292"  data-group-id="14066">
                                    <td class="toolbar left"></td><td class="time">23:30</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/895/Show/Argentina-Velez-Sarsfield" class="team-link ">Velez Sarsfield</a></td><td class="result"><a class="result-4 rc" href="/Matches/1122292/Show/Argentina-Primera-División-2016-2017-Velez-Sarsfield-Sarmiento" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/9151/Show/Argentina-Sarmiento" class="team-link ">Sarmiento</a></td><td class="toolbar right"><a href="/Matches/1122292/Preview/Argentina-Primera-División-2016-2017-Velez-Sarsfield-Sarmiento" class="match-link rc preview" title="Check Preview!">Preview</a><a href="/Matches/1122292/LiveStream/Argentina-Primera-División-2016-2017-Velez-Sarsfield-Sarmiento" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                            <tr class="tournament">
                                    <td colspan="99"><div class="tournament-name-container"><a title='Go to tournament page' href='/Regions/165/Tournaments/41/Seasons/6609/Stages/14501/Show/Norway-Eliteserien' class='tournament-link'><span class="group-name iconize iconize-icon-left"><span class="ui-icon country flg-no"></span>Norway - Eliteserien </span></a><span class="detcover rc">Detailed coverage</span><span class="tournament-favourite-status" data-tournament-id="41"></span><span class="livescore-map-matches-info"></span></div><a class='show-matches button-small ui-state-transparent-default rc' data-id="14501" title=livescores_toggle_tournament_detail><span class='ui-icon ui-icon-triangle-1-s'></span></div></td>  
                            </tr>
                            
                                <tr class="match" data-id="1154366"  data-group-id="14501">
                                    <td class="toolbar left"></td><td class="time">17:00</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/3076/Show/Norway-Kristiansund-BK" class="team-link ">Kristiansund BK</a></td><td class="result"><a class="result-4 rc" href="/Matches/1154366/Show/Norway-Eliteserien-2017-Kristiansund-BK-Aalesund" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/1131/Show/Norway-Aalesund" class="team-link ">Aalesund</a></td><td class="toolbar right"><a href="/Matches/1154366/Preview/Norway-Eliteserien-2017-Kristiansund-BK-Aalesund" class="match-link rc preview" title="Check Preview!">Preview</a></td>  
                                </tr> 
                            
                            <tr class="tournament">
                                    <td colspan="99"><div class="tournament-name-container"><a title='Go to tournament page' href='/Regions/45/Tournaments/162/Seasons/6685/Stages/14726/Show/China-Super-league' class='tournament-link'><span class="group-name iconize iconize-icon-left"><span class="ui-icon country flg-cn"></span>China - Super League </span></a><span class="detcover rc">Detailed coverage</span><span class="tournament-favourite-status" data-tournament-id="162"></span><span class="livescore-map-matches-info"></span></div><a class='show-matches button-small ui-state-transparent-default rc' data-id="14726" title=livescores_toggle_tournament_detail><span class='ui-icon ui-icon-triangle-1-s'></span></div></td>  
                            </tr>
                            
                                <tr class="match" data-id="1173342"  data-group-id="14726">
                                    <td class="toolbar left"></td><td class="time">08:30</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/10109/Show/China-Guizhou-Hengfeng-Zhicheng" class="team-link ">Guizhou Hengfeng Zhicheng</a></td><td class="result"><a class="result-4 rc" href="/Matches/1173342/Show/China-Super-league-2017-Guizhou-Hengfeng-Zhicheng-Guangzhou-Evergrande" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/4673/Show/China-Guangzhou-Evergrande" class="team-link ">Guangzhou Evergrande</a></td><td class="toolbar right"><a href="/Matches/1173342/LiveStream/China-Super-league-2017-Guizhou-Hengfeng-Zhicheng-Guangzhou-Evergrande" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1173343"  data-group-id="14726">
                                    <td class="toolbar left"></td><td class="time">12:35</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/15181/Show/China-Hebei-CFFC" class="team-link ">Hebei CFFC</a></td><td class="result"><a class="result-4 rc" href="/Matches/1173343/Show/China-Super-league-2017-Hebei-CFFC-Tianjin-Quanjian" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/10108/Show/China-Tianjin-Quanjian" class="team-link ">Tianjin Quanjian</a></td><td class="toolbar right"><a href="/Matches/1173343/LiveStream/China-Super-league-2017-Hebei-CFFC-Tianjin-Quanjian" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1173344"  data-group-id="14726">
                                    <td class="toolbar left"></td><td class="time">12:35</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/4152/Show/China-Henan-Jianye" class="team-link ">Henan Jianye</a></td><td class="result"><a class="result-4 rc" href="/Matches/1173344/Show/China-Super-league-2017-Henan-Jianye-Yanbian" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/9084/Show/China-Yanbian" class="team-link ">Yanbian</a></td><td class="toolbar right"><a href="/Matches/1173344/LiveStream/China-Super-league-2017-Henan-Jianye-Yanbian" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1173345"  data-group-id="14726">
                                    <td class="toolbar left"></td><td class="time">12:35</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"></td><td class="team home"><a href="/Teams/2530/Show/China-Shanghai-Shenhua" class="team-link ">Shanghai Shenhua</a></td><td class="result"><a class="result-4 rc" href="/Matches/1173345/Show/China-Super-league-2017-Shanghai-Shenhua-Chongqing-Lifan" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/2533/Show/China-Chongqing-Lifan" class="team-link ">Chongqing Lifan</a></td><td class="toolbar right"><a href="/Matches/1173345/LiveStream/China-Super-league-2017-Shanghai-Shenhua-Chongqing-Lifan" class="iconize" title="Stream"><span class='incidents-icon ui-icon stream'></span></a></td>  
                                </tr> 
                            
                            <tr class="tournament">
                                    <td colspan="99"><div class="tournament-name-container"><a title='Go to tournament page' href='/Regions/247/Tournaments/89/Seasons/5968/Stages/12764/Show/International-Confederations-Cup' class='tournament-link'><span class="group-name iconize iconize-icon-left"><span class="ui-icon country flg-cint"></span>International - Confederations Cup Grp. A </span></a><span class="tournament-favourite-status" data-tournament-id="89"></span><span class="livescore-map-matches-info"></span></div><a class='show-matches button-small ui-state-transparent-default rc' data-id="12764" title=livescores_toggle_tournament_detail><span class='ui-icon ui-icon-triangle-1-s'></span></div></td>  
                            </tr>
                            
                                <tr class="match" data-id="1150206"  data-group-id="12764">
                                    <td class="toolbar left"></td><td class="time">16:00</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"><span title="Top match" class='incidents-icon ui-icon topmatch'></span></td><td class="team home"><a href="/Teams/326/Show/Russia-Russia" class="team-link iconize iconize-icon-right"><span class="ui-icon country flg-ru"></span>Russia</a></td><td class="result"><a class="result-4 rc" href="/Matches/1150206/Show/International-Confederations-Cup-2017-Russia-New-Zealand" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/1918/Show/New-Zealand-New-Zealand" class="team-link iconize iconize-icon-left"><span class="ui-icon country flg-nz"></span>New Zealand</a></td><td class="toolbar right"><a href="/Matches/1150206/Preview/International-Confederations-Cup-2017-Russia-New-Zealand" class="match-link rc preview" title="Check Preview!">Preview</a><a title="Comments" class="iconize iconize-icon-right fixture-comments" href="/Matches/1150206/Show/International-Confederations-Cup-2017-Russia-New-Zealand"><span class="incidents-icon ui-icon comments"></span>3</a></td>  
                                </tr> 
                            
                            <tr class="tournament">
                                    <td colspan="99"><div class="tournament-name-container"><a title='Go to tournament page' href='/Regions/247/Tournaments/123/Seasons/6589/Stages/14379/Show/International-EURO-U-21' class='tournament-link'><span class="group-name iconize iconize-icon-left"><span class="ui-icon country flg-cint"></span>International - EURO U21 Grp. B </span></a><span class="tournament-favourite-status" data-tournament-id="123"></span><span class="livescore-map-matches-info"></span></div><a class='show-matches button-small ui-state-transparent-default rc' data-id="14379" title=livescores_toggle_tournament_detail><span class='ui-icon ui-icon-triangle-1-s'></span></div></td>  
                            </tr>
                            
                                <tr class="match" data-id="1150700"  data-group-id="14379">
                                    <td class="toolbar left"></td><td class="time">17:00</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"><span title="Top match" class='incidents-icon ui-icon topmatch'></span></td><td class="team home"><a href="/Teams/1835/Show/Portugal-Portugal-U21" class="team-link iconize iconize-icon-right"><span class="ui-icon country flg-pt"></span>Portugal U21</a></td><td class="result"><a class="result-4 rc" href="/Matches/1150700/Show/International-EURO-U-21-2017-Portugal-U21-Serbia-U21" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/1916/Show/Serbia-Serbia-U21" class="team-link iconize iconize-icon-left"><span class="ui-icon country flg-rs"></span>Serbia U21</a></td><td class="toolbar right"><a href="/Matches/1150700/Preview/International-EURO-U-21-2017-Portugal-U21-Serbia-U21" class="match-link rc preview" title="Check Preview!">Preview</a></td>  
                                </tr> 
                            
                                <tr class="match" data-id="1150701"  data-group-id="14379">
                                    <td class="toolbar left"></td><td class="time">19:45</td><td class="status"><span class="status-4 rc"></span></td><td class="topmatch-column"><span title="Top match" class='incidents-icon ui-icon topmatch'></span></td><td class="team home"><a href="/Teams/1832/Show/Spain-Spain-U21" class="team-link iconize iconize-icon-right"><span class="ui-icon country flg-es"></span>Spain U21</a></td><td class="result"><a class="result-4 rc" href="/Matches/1150701/Show/International-EURO-U-21-2017-Spain-U21-Macedonia-U21" title="Head to Head">vs</a></td><td class="team away"><a href="/Teams/1836/Show/Macedonia-Macedonia-U21" class="team-link iconize iconize-icon-left"><span class="ui-icon country flg-mk"></span>Macedonia U21</a></td><td class="toolbar right"><a href="/Matches/1150701/Preview/International-EURO-U-21-2017-Spain-U21-Macedonia-U21" class="match-link rc preview" title="Check Preview!">Preview</a></td>  
                                </tr> 
                            
                    </tbody>
                </table>
            
            
       
            <div class="clear"></div>
        </div>

        <script type="text/javascript">
            $(function () {
                var containerSelector = '#today';

                $(containerSelector + ' .livescores-summary .show-matches').bind('click', function () {
                    var $this = $(this);
                    var stageId = $this.attr('data-id');
                    $(containerSelector + ' .livescores-summary .match[data-group-id="{0}"]'.format(stageId)).each(function () {
                        var $match = $(this);
                        var matchId = $match.attr('data-id');
                        $match.toggle();
                        $(containerSelector + ' .livescores-summary .incident[data-match-id="m{0}"]'.format(matchId)).toggle();
                    });
                    toggleMatchesDisplayIcon(this.childNodes);
                });
            });


            function toggleMatchesDisplayIcon(elementList) {
                for (var i = 0; i < elementList.length; i++) {
                    var iconSelector = $(elementList[i]);
                    if (iconSelector.hasClass('ui-icon-triangle-1-s')) {
                        iconSelector.removeClass('ui-icon-triangle-1-s');
                        iconSelector.addClass('ui-icon-triangle-1-w');
                        break;
                    }
                    else if (iconSelector.hasClass('ui-icon-triangle-1-w')) {
                        iconSelector.removeClass('ui-icon-triangle-1-w');
                        iconSelector.addClass('ui-icon-triangle-1-s');
                    }
                }
            }
        </script>


            </div>
            <div id="tomorrow" class="home-matches-container" style="display: none;">
            </div>
        </div>
        <script type="text/javascript">

            var $homeLivescoreSummary = $('#home-livescore-summary');

            $('#home-matches-view-options .option').click(function () {

                var view = $(this).attr('href');
                $('#home-matches-view-options .option').removeClass('selected');
                $(this).addClass('selected');

                $('.home-matches-container').hide();

                var $view = $(view);
                $view.show();

                if ($view.attr('data-loaded')) {
                    return false;
                }

                var actionUrl = '/LiveScoresSummary?day={0}'.format($view.attr('id'));

                $.ajax({
                    url: actionUrl,
                    cache: true,
                    dataType: 'html',
                    success: function (data) {
                        $view.html(data).attr('data-loaded', true);
                    }
                });

                setTimeout(function () {

                    var viewHeight = $view.outerHeight(true);
                    $homeLivescoreSummary.css('min-height', viewHeight);
                });

                return false;
            });

            // $('#home-matches-view-options .option[href="#oday"]').click();
        </script>
        
        <script type="text/javascript">
            $(function () {
                var mapId = '#home-livescore-map';
                var map = null;

                /*
                 * For a good pulsing effect, which is fast and doesn't lock the browser
                 * keep track of ids of pulsing effects
                 * and clear them when map is redrawn
                 */
                var mapIntervalIds = [];

                function clearMap() {
                    //Todo: write map.clear() to encapsulate this
                    $('.jvectormap-label').remove();
                    map = null;
                    $(mapId).html('');

                    for (var j = 0; j < mapIntervalIds.length; j++) {
                        clearInterval(mapIntervalIds[j]);
                    }

                    mapIntervalIds = [];
                };

                function drawMap(data) {
                    //Clear Map first
                    clearMap();

                    //Create Map again
                    //Reloading doesn't perform good
                    map = new WS.LS.Map();
                    map.init({
                        view: {
                            renderTo: mapId
                        }
                    });

                    //Load Map data
                    map.load(data);

                    //Clear pulses
                    //Add pulsing effect to live matches
                    $('path[fill="#8DC63F"]', $(mapId)).each(function () {
                        var $this = $(this);
                        var intervalId = setInterval(function () { $this.pulse({ opacity: '0.5' }, 1000, 1, 200); }, 1000);
                        mapIntervalIds.push(intervalId);
                    });
                };

                //Pulse follow live matches text
                $('#livescore-map-see-all').pulse({ color: '#8DC63F' }, 1000, 1000, 200);

                //Inital map is rendered with todays data
                
                

                //Re-Draw map when date option is changed
                $("#home-matches-view-options .today").bind('click', function () {
                    
                        $(".livescore-map-container").hide();
                    
                }); 

                $("#home-matches-view-options .yesterday").bind('click', function () {
                    
                        $(".livescore-map-container").hide();
                    
                });

                $("#home-matches-view-options .tomorrow").bind('click', function () {
                    
                        $(".livescore-map-container").hide();
                    
                });

                $('#live-legend').pulse({ opacity: '0.5' }, 1000, 1000, 200);

                //Intialize IncidentManagers
                var i = new IncidentManager({
                    rootElement: "#home-livescore-summary",
                    view: HomeIncidentsView
                });

                //Select Home in Main Navigation
                $('#home-menuitem').addClass('selected');

                //Go to Livescores when map is clicked
                $('.livescore-map-container svg').click(function () {
                    window.location = '/Matches'; 
                });
            });
        </script>

        
<h2>
    <a title="See all News and Articles" href="/Editorial" class="iconize iconize-icon-right ui-state-transparent-default disabled">News
        <span class="ui-icon ui-icon-circle-arrow-e"></span>
    </a>
</h2>

    <div id="home-editorial">
        
                <div id="content-image">
                    <a id="post-content-url" href="/News/4howVHOobkyFKIrOX0Yomg/Show/Chelsea-€20m-away-in-valuation-for-Monaco-midfielder">
                        <h2 id="content-title">Chelsea €20m away in valuation for Monaco midfielder</h2>
                        <img src="https://d2zywfiolv4f83.cloudfront.net/img/blog/2017%2f6%2fyoko16.jpg" alt="Chelsea €20m away in valuation for Monaco midfielder" style="width: 100%;">
                    </a>
                </div>
                <ul class="post-list">
                    
                            <li id="post-content-1" class="post-content-number selected" data-number=1 >
                                <span class="post-text" data-tit
Download .txt
gitextract_b7gw_h1l/

├── .gitignore
├── LICENSE.txt
├── README.md
├── circle.yml
├── docs/
│   ├── Makefile
│   ├── conf.py
│   ├── index.rst
│   ├── make.bat
│   └── source/
│       ├── incapsula.rst
│       └── modules.rst
├── incapsula/
│   ├── __init__.py
│   ├── errors.py
│   ├── parsers.py
│   └── session.py
├── requirements.txt
├── setup.cfg
├── setup.py
├── tests/
│   ├── __init__.py
│   ├── helpers.py
│   ├── test_IframeResourceParser.py
│   └── whoscored/
│       ├── __init__.py
│       ├── index.html
│       ├── jsTest.html
│       ├── test_whoscored.py
│       └── whoscored-index_unblocked.html
└── tools.py
Download .txt
SYMBOL INDEX (51 symbols across 7 files)

FILE: incapsula/errors.py
  class IncapBlocked (line 1) | class IncapBlocked(ValueError):
    method __init__ (line 9) | def __init__(self, response, *args):
  class MaxRetriesExceeded (line 14) | class MaxRetriesExceeded(IncapBlocked):
  class RecaptchaBlocked (line 25) | class RecaptchaBlocked(IncapBlocked):

FILE: incapsula/parsers.py
  class ResourceParser (line 7) | class ResourceParser(object):
    method __init__ (line 15) | def __init__(self, response):
    method is_blocked (line 26) | def is_blocked(self):
  class IframeResourceParser (line 43) | class IframeResourceParser(ResourceParser):
    method __init__ (line 62) | def __init__(self, response):
    method recaptcha_element (line 71) | def recaptcha_element(self):
    method is_blocked (line 88) | def is_blocked(self):
  class WebsiteResourceParser (line 101) | class WebsiteResourceParser(ResourceParser):
    method __init__ (line 120) | def __init__(self, response):
    method incapsula_script_url (line 129) | def incapsula_script_url(self):
    method robots_meta (line 142) | def robots_meta(self):
    method incapsula_iframe (line 151) | def incapsula_iframe(self):
    method incapsula_iframe_url (line 169) | def incapsula_iframe_url(self):
    method is_blocked (line 182) | def is_blocked(self):

FILE: incapsula/session.py
  function test (line 57) | def test():
  function simple_digest (line 74) | def simple_digest(s):
  class IncapSession (line 97) | class IncapSession(Session):
    method __init__ (line 113) | def __init__(self, max_retries=3, user_agent=None, cookie_domain='', r...
    method _get_session_cookies (line 127) | def _get_session_cookies(self):
    method _create_cookie (line 150) | def _create_cookie(self, name, value, seconds, domain=''):
    method _set_incap_cookie (line 167) | def _set_incap_cookie(self, v_array, domain='', sl=None):
    method _raise_for_recaptcha (line 211) | def _raise_for_recaptcha(self, resource):
    method _get_incapsula_b (line 227) | def _get_incapsula_b(self, incapsula_script_url):
    method _get_incapsula_sl (line 243) | def _get_incapsula_sl(self, b):
    method _get_incapsula_asl (line 272) | def _get_incapsula_asl(self, dd, sl):
    method _apply_cookies (line 289) | def _apply_cookies(self, original_url, incapsula_script_url):
    method get_incapsula_resource_url (line 315) | def get_incapsula_resource_url(self, scheme, host):
    method crack (line 329) | def crack(self, resp, org=None, tries=0):
    method get (line 362) | def get(self, url, bypass_crack=False, **kwargs):

FILE: tests/helpers.py
  function make_response (line 4) | def make_response(url, content, status_code=200):

FILE: tests/test_IframeResourceParser.py
  class TestIframeResourceParserReCaptcha (line 9) | class TestIframeResourceParserReCaptcha(unittest.TestCase):
    method setUp (line 48) | def setUp(self):
    method test_is_blocked (line 51) | def test_is_blocked(self):

FILE: tests/whoscored/test_whoscored.py
  class TestWhoScoredIndexBlocked (line 18) | class TestWhoScoredIndexBlocked(unittest.TestCase):
    method setUp (line 20) | def setUp(self):
    method test_robots_meta (line 25) | def test_robots_meta(self):
    method test_incapsula_iframe (line 29) | def test_incapsula_iframe(self):
    method test_incapsula_iframe_url (line 33) | def test_incapsula_iframe_url(self):
    method test_is_blocked (line 37) | def test_is_blocked(self):
  class TestWhoScoredIndexUnblocked (line 41) | class TestWhoScoredIndexUnblocked(unittest.TestCase):
    method setUp (line 43) | def setUp(self):
    method test_is_blocked (line 50) | def test_is_blocked(self):
  class TestWhoScoredIframeContentsNoRecaptcha (line 54) | class TestWhoScoredIframeContentsNoRecaptcha(unittest.TestCase):
    method setUp (line 56) | def setUp(self):
    method test_is_blocked (line 61) | def test_is_blocked(self):

FILE: tools.py
  function chunks (line 1) | def chunks(l, n):
  function decrypt_obfuscated_js (line 7) | def decrypt_obfuscated_js(obfuscated_javascript):
Condensed preview — 26 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (370K chars).
[
  {
    "path": ".gitignore",
    "chars": 2105,
    "preview": "# Created by .ignore support plugin (hsz.mobi)\n### Python template\n# Byte-compiled / optimized / DLL files\n__pycache__/\n"
  },
  {
    "path": "LICENSE.txt",
    "chars": 1210,
    "preview": "This is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, c"
  },
  {
    "path": "README.md",
    "chars": 6742,
    "preview": "[![CircleCI](https://circleci.com/gh/ziplokk1/incapsula-cracker-py3.svg?style=shield)](https://circleci.com/gh/ziplokk1/"
  },
  {
    "path": "circle.yml",
    "chars": 1361,
    "preview": "defaults: &defaults\n  working_directory: ~/incapsula-cracker-py3\n  docker:\n    - image: ubuntu:14.04\n  steps:\n    - run:"
  },
  {
    "path": "docs/Makefile",
    "chars": 642,
    "preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS    =\nSPHI"
  },
  {
    "path": "docs/conf.py",
    "chars": 4876,
    "preview": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Incapsula Cracker documentation build configuration file, created by\n"
  },
  {
    "path": "docs/index.rst",
    "chars": 467,
    "preview": ".. Incapsula Cracker documentation master file, created by\n   sphinx-quickstart on Sat Jun 17 21:53:21 2017.\n   You can "
  },
  {
    "path": "docs/make.bat",
    "chars": 814,
    "preview": "@ECHO OFF\r\n\r\npushd %~dp0\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=py"
  },
  {
    "path": "docs/source/incapsula.rst",
    "chars": 609,
    "preview": "incapsula package\n=================\n\nSubmodules\n----------\n\nincapsula\\.errors module\n------------------------\n\n.. automo"
  },
  {
    "path": "docs/source/modules.rst",
    "chars": 64,
    "preview": "incapsula\n=========\n\n.. toctree::\n   :maxdepth: 4\n\n   incapsula\n"
  },
  {
    "path": "incapsula/__init__.py",
    "chars": 186,
    "preview": "from .errors import IncapBlocked, MaxRetriesExceeded, RecaptchaBlocked\nfrom .parsers import ResourceParser, WebsiteResou"
  },
  {
    "path": "incapsula/errors.py",
    "chars": 1059,
    "preview": "class IncapBlocked(ValueError):\n    \"\"\"\n    Base exception for exceptions in this module.\n\n    :param response: The resp"
  },
  {
    "path": "incapsula/parsers.py",
    "chars": 6508,
    "preview": "import re\nfrom six.moves.urllib.parse import urlsplit\n\nfrom bs4 import BeautifulSoup\n\n\nclass ResourceParser(object):\n   "
  },
  {
    "path": "incapsula/session.py",
    "chars": 14705,
    "preview": "from __future__ import absolute_import\n\nimport re\nimport time\nimport logging\nimport datetime\nimport random\nfrom six.move"
  },
  {
    "path": "requirements.txt",
    "chars": 51,
    "preview": "beautifulsoup4==4.6.0\nrequests==2.14.2\nsix==1.10.0\n"
  },
  {
    "path": "setup.cfg",
    "chars": 40,
    "preview": "[metadata]\ndescription-file = README.md\n"
  },
  {
    "path": "setup.py",
    "chars": 553,
    "preview": "from __future__ import unicode_literals\n\nfrom setuptools import setup\n\nversion = '0.1.8.1'\n\nREQUIREMENTS = [\n    'reques"
  },
  {
    "path": "tests/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "tests/helpers.py",
    "chars": 222,
    "preview": "from requests import Response\n\n\ndef make_response(url, content, status_code=200):\n    response = Response()\n    response"
  },
  {
    "path": "tests/test_IframeResourceParser.py",
    "chars": 2385,
    "preview": "from __future__ import absolute_import\n\nimport unittest\n\nfrom tests.helpers import make_response\nfrom incapsula import I"
  },
  {
    "path": "tests/whoscored/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "tests/whoscored/index.html",
    "chars": 11093,
    "preview": "<!-- Index from whoscored.com which is blocked by an older version of incapsula. -->\r\n<html>\r\n<head>\r\n    <META NAME=\"ro"
  },
  {
    "path": "tests/whoscored/jsTest.html",
    "chars": 656,
    "preview": "<html>\r\n\t<head>\r\n\t\t<script type=\"text/javascript\">\r\n\r\n\t\t  var _gaq = _gaq || [];\r\n\t\t  _gaq.push(['_setAccount', 'UA-3110"
  },
  {
    "path": "tests/whoscored/test_whoscored.py",
    "chars": 2232,
    "preview": "from __future__ import absolute_import\n\nimport os\nimport unittest\n\nfrom bs4 import BeautifulSoup\n\nfrom incapsula import "
  },
  {
    "path": "tests/whoscored/whoscored-index_unblocked.html",
    "chars": 289211,
    "preview": "\r\n\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\r\n\r\n<html lang=\"en\">\r\n<hea"
  },
  {
    "path": "tools.py",
    "chars": 2867,
    "preview": "def chunks(l, n):\n    \"\"\"Yield successive n-sized chunks from l.\"\"\"\n    for i in range(0, len(l), n):\n        yield l[i:"
  }
]

About this extraction

This page contains the full source code of the ziplokk1/incapsula-cracker-py3 GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 26 files (342.4 KB), approximately 102.5k tokens, and a symbol index with 51 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!