This commit is contained in:
louiscklaw
2025-01-31 20:05:06 +08:00
parent 2a6f19a43f
commit cd995ed8bd
115 changed files with 7626 additions and 0 deletions

194
ych1990101/task1/src/.gitignore vendored Normal file
View File

@@ -0,0 +1,194 @@
**/__pycache__/
**/notebook/jsons/*.json
**/notebook/bet_hkjc_com/**/*.json
**/notebook/*.json
_images
**/_output/*.xlsx
# Created by https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks
# Edit at https://www.toptal.com/developers/gitignore?templates=python,jupyternotebooks
### JupyterNotebooks ###
# gitignore template for Jupyter Notebooks
# website: http://jupyter.org/
.ipynb_checkpoints
*/.ipynb_checkpoints/*
# IPython
profile_default/
ipython_config.py
# Remove previous ipynb_checkpoints
# git rm -r .ipynb_checkpoints/
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# 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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
# IPython
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml
# ruff
.ruff_cache/
# LSP config files
pyrightconfig.json
# End of https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks

View File

@@ -0,0 +1,34 @@
FROM python:latest
RUN apt update && \
apt install -y git && \
useradd -m docker_user && \
chown -R docker_user: /home/docker_user
RUN mkdir -p /home/docker_user/.local
RUN mkdir -p /home/docker_user/.local/bin
RUN mkdir -p /home/docker_user/.local/lib
RUN mkdir -p /home/docker_user/.cache
ENV PATH="/home/docker_user/.local/bin:${PATH}"
RUN chown 1000:1000 -R /home/docker_user
RUN apt-get update && apt-get install -qqy libnss3\
libnspr4\
libdbus-1-3\
libatk1.0-0\
libatk-bridge2.0-0\
libcups2\
libdrm2\
libxkbcommon0\
libatspi2.0-0\
libxcomposite1\
libxdamage1\
libxfixes3\
libxrandr2\
libgbm1\
libasound2
USER docker_user
WORKDIR /app

View File

@@ -0,0 +1,34 @@
# README
```bash
$ ./start_docker.bat
# inside container
$ ./run.sh
```
阿根廷甲組聯賽
西班牙甲組聯賽
西班牙乙組聯賽
蘇格蘭超級聯賽
葡萄牙超級聯賽
荷蘭甲組聯賽
荷蘭乙組聯賽
英格蘭超級聯賽
英格蘭冠軍聯賽
美國職業聯賽
瑞典超級聯賽
澳洲職業聯賽
法國甲組聯賽
法國乙組聯賽
智利甲組聯賽
日本職業聯賽
日本乙組聯賽
挪威超級聯賽
意大利甲組聯賽
德國甲組聯賽
德國乙組聯賽
南韓職業聯賽

Binary file not shown.

View File

@@ -0,0 +1 @@
docker build . -t logickee/ych1990101_jupyter:latest

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -x
docker build . -t logickee/ych1990101_jupyter:latest

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -x
# # pip install jupyter
# # pip install ipywidgets
# # pip install playwright
# # pip install nest_asyncio
pip install -r requirements.txt
playwright install
# playwright install-deps
jupyter notebook \
--allow-root \
--ip=0.0.0.0 \
--NotebookApp.token='' \
--NotebookApp.password='' \
--notebook-dir=notebook

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env python3
import os,sys
def helloworld():
print("helloworld")

View File

@@ -0,0 +1,69 @@
#!/usr/bin/env python
import os
import sys
import requests
import json
# https://api.footylogic.com/match/h2h/recentform-information
# ?languageId=19
# &channelId=1
# &homeTeamId=50003297
# &awayTeamId=50000948
# &marketGroupId=1
# &optionIdH=1
# &optionIdA=1
# &mode=1
def getBannerJson(eventId):
# https://api.footylogic.com/match/h2h/recentform-information?languageId=19&channelId=1&homeTeamId=50000180&awayTeamId=50000599&marketGroupId=1&optionIdH=1&optionIdA=1&mode=1
url = 'https://api.footylogic.com/match/h2h/banner'
params = {
'languageId': '19',
'channelId': '1',
'eventId': eventId,
}
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://footylogic.com/',
'Origin': 'https://footylogic.com',
'Connection': 'keep-alive',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache'
}
response = requests.get(url, params=params, headers=headers)
response_json = json.loads(response.text)
# https://footylogic.com/en/tournament/league/{competitionId}/standings
os_cwd = os.getcwd()
json_store_path = os_cwd+'/jsons'
with open(json_store_path+"/banner.json", 'w+') as f_out_json:
json.dump(response_json['data'], f_out_json)
print('Banner.py: get banner json done')
return response_json['data']
def getTeams(json_in):
homeTeamId = json_in['homeTeamId']
awayTeamId = json_in['awayTeamId']
return [homeTeamId, awayTeamId]
def getCompetitionName(json_in):
competitionName = json_in['competitionName']
return competitionName

View File

@@ -0,0 +1,60 @@
#!/usr/bin/env python
import os
import sys
import requests
import json
# https://api.footylogic.com/match/h2h/recentform-information
# ?languageId=19
# &channelId=1
# &homeTeamId=50003297
# &awayTeamId=50000948
# &marketGroupId=1
# &optionIdH=1
# &optionIdA=1
# &mode=1
def getRecentformInformationJson(homeTeamId, awayTeamId):
# https://api.footylogic.com/match/h2h/recentform-information?languageId=19&channelId=1&homeTeamId=50000180&awayTeamId=50000599&marketGroupId=1&optionIdH=1&optionIdA=1&mode=1
url = 'https://api.footylogic.com/match/h2h/recentform-information'
params = {
'languageId': '19',
'channelId': '1',
'homeTeamId': homeTeamId,
'awayTeamId': awayTeamId,
'marketGroupId': '1',
'optionIdH': '1',
'optionIdA': '1',
'mode': '1'
}
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://footylogic.com/',
'Origin': 'https://footylogic.com',
'Connection': 'keep-alive',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache'
}
response = requests.get(url, params=params, headers=headers)
response_json = json.loads(response.text)
# https://footylogic.com/en/tournament/league/{competitionId}/standings
os_cwd = os.getcwd()
json_store_path = os_cwd+'/jsons'
with open(json_store_path+"/recentfrom-information.json", 'w+') as f_out_json:
json.dump(response_json['data'], f_out_json)
return response_json['data']

View File

@@ -0,0 +1,60 @@
#!/usr/bin/env python
import os
import sys
import requests
import json
# https://api.footylogic.com/match/h2h/recentform-information
# ?languageId=19
# &channelId=1
# &homeTeamId=50003297
# &awayTeamId=50000948
# &marketGroupId=1
# &optionIdH=1
# &optionIdA=1
# &mode=1
def getRecentformInformationAwayTeamJson(homeTeamId, awayTeamId):
# https://api.footylogic.com/match/h2h/recentform-information?languageId=19&channelId=1&homeTeamId=50000180&awayTeamId=50000599&marketGroupId=1&optionIdH=1&optionIdA=1&mode=1
url = 'https://api.footylogic.com/match/h2h/recentform-information'
params = {
'languageId': '19',
'channelId': '1',
'homeTeamId': homeTeamId,
'awayTeamId': awayTeamId,
'marketGroupId': '1',
'optionIdH': '2',
'optionIdA': '3',
'mode': '1'
}
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://footylogic.com/',
'Origin': 'https://footylogic.com',
'Connection': 'keep-alive',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache'
}
response = requests.get(url, params=params, headers=headers)
response_json = json.loads(response.text)
# https://footylogic.com/en/tournament/league/{competitionId}/standings
os_cwd = os.getcwd()
json_store_path = os_cwd+'/jsons'
with open(json_store_path+"/recentfrom-information-away-team.json", 'w+') as f_out_json:
json.dump(response_json['data'], f_out_json)
return response_json['data']

View File

@@ -0,0 +1,60 @@
#!/usr/bin/env python
import os
import sys
import requests
import json
# https://api.footylogic.com/match/h2h/recentform-information
# ?languageId=19
# &channelId=1
# &homeTeamId=50003297
# &awayTeamId=50000948
# &marketGroupId=1
# &optionIdH=1
# &optionIdA=1
# &mode=1
def getRecentformInformationHomeTeamJson(homeTeamId, awayTeamId):
# https://api.footylogic.com/match/h2h/recentform-information?languageId=19&channelId=1&homeTeamId=50000180&awayTeamId=50000599&marketGroupId=1&optionIdH=1&optionIdA=1&mode=1
url = 'https://api.footylogic.com/match/h2h/recentform-information'
params = {
'languageId': '19',
'channelId': '1',
'homeTeamId': homeTeamId,
'awayTeamId': awayTeamId,
'marketGroupId': '1',
'optionIdH': '2',
'optionIdA': '1',
'mode': '1'
}
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://footylogic.com/',
'Origin': 'https://footylogic.com',
'Connection': 'keep-alive',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache'
}
response = requests.get(url, params=params, headers=headers)
response_json = json.loads(response.text)
# https://footylogic.com/en/tournament/league/{competitionId}/standings
os_cwd = os.getcwd()
json_store_path = os_cwd+'/jsons'
with open(json_store_path+"/recentfrom-information-home-team.json", 'w+') as f_out_json:
json.dump(response_json['data'], f_out_json)
return response_json['data']

View File

@@ -0,0 +1,54 @@
#!/usr/bin/env python3
import os
import sys
import requests
import json
from pprint import pprint
# https://api.footylogic.com/match/seasonalstats/dropdown-filters
# ?languageId=19
# &channelId=1
# &tableId=1
# &competitionId=50016467
# &tabId=1
def getDropdownFilters(competitionId="competitionId"):
url = 'https://api.footylogic.com/match/seasonalstats/dropdown-filters'
params = {
'languageId': '19',
'channelId': '1',
'tableId': '1',
'competitionId': competitionId,
'tabId': '1',
}
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://footylogic.com/',
'Origin': 'https://footylogic.com',
'Connection': 'keep-alive',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache'
}
response = requests.get(url, params=params, headers=headers)
response_json = json.loads(response.text)
response_json_data = response_json['data']
# https://footylogic.com/en/tournament/league/{competitionId}/standings
with open("./dropdown-filters.json", 'w+') as f_out_json:
json.dump(response_json_data, f_out_json)
print('DropdownFilters.py: get getDropdownFilters json done')
return response_json_data

View File

@@ -0,0 +1,52 @@
#!/usr/bin/env python
import os
import sys
import requests
import json
def getMarketsInfoJson(eventId, homeTeamId, awayTeamId, competitionId):
# https://api.footylogic.com/match/statistics/markets-info?channelId=1&languageId=1&eventId=50024534&seasonId=1&homeTeamId=50000180&awayTeamId=50000599&competitionId=50024169
url = 'https://api.footylogic.com/match/statistics/markets-info'
params = {
'languageId': '19',
'channelId': '1',
'eventId': eventId,
'seasonId': '1',
'homeTeamId': homeTeamId,
'awayTeamId': awayTeamId,
'competitionId': competitionId,
}
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://footylogic.com/',
'Origin': 'https://footylogic.com',
'Connection': 'keep-alive',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache'
}
response = requests.get(url, params=params, headers=headers)
response_json = json.loads(response.text)
response_json_data = response_json['data']
os_cwd = os.getcwd()
json_store_path = os_cwd+'/jsons'
with open(json_store_path+"/markets-info.json", 'w+') as f_out_json:
f_out_json.truncate(0)
json.dump(response_json_data, f_out_json)
# https://footylogic.com/en/tournament/league/{competitionId}/standings
print('MarketsInfo.py: getMarketsInfoJson done')
return response_json_data

View File

@@ -0,0 +1,57 @@
#!/usr/bin/env python
import os
import sys
import requests
import json
def getCompetitionsJson():
url = 'https://api.footylogic.com/tournament/competitions'
params = {
'languageId': '19',
'channelId': '1',
'categoryId': '1'
}
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://footylogic.com/',
'Origin': 'https://footylogic.com',
'Connection': 'keep-alive',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache'
}
response = requests.get(url, params=params, headers=headers)
response_json = json.loads(response.text)
# from pprint import pprint
# https://footylogic.com/en/tournament/league/{competitionId}/standings
expanded_json = response_json
for data in expanded_json['data']:
for competition in data['competitions']:
competitionId = str(competition['competitionId'])
competition['standing_table_link'] = 'https://footylogic.com/en/tournament/league/' + \
competitionId+'/standings'
with open("./competitions.json", 'w+') as f_out_json:
f_out_json.truncate(0)
json.dump(expanded_json['data'], f_out_json)
return expanded_json['data']
def lookupCompetitionId(competitions_json, competitionName):
for category in competitions_json:
for competition in category['competitions']:
if competition['competitionName'] == competitionName:
return competition['competitionId']
return 'not found'

View File

@@ -0,0 +1,57 @@
#!/usr/bin/env python
import os
import sys
import requests
import json
from pprint import pprint
USE_TEST_URL = int(os.getenv('USE_TEST_URL', False))
# https://api.footylogic.com/tournament/options?
# languageId=19
# &channelId=1
# &competitionId=50019599
# &seasonId=4456
def getOptionsJson(competition_id, season_id):
url = 'https://api.footylogic.com/tournament/options'
test_url = 'http://localhost:8081/tournament/options/options.json'
url = [url, test_url][USE_TEST_URL]
params = {
'languageId': '19',
'channelId': '1',
'competitionId': str(competition_id),
'optionId': '1',
'seasonId': str(season_id),
}
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://footylogic.com/',
'Origin': 'https://footylogic.com',
'Connection': 'keep-alive',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache'
}
response = requests.get(url, params=params, headers=headers)
response_json = json.loads(response.text)
response_json_data = response_json['data']
os_cwd = os.getcwd()
json_store_path = os_cwd+'/jsons'
with open(json_store_path+"/options.json", 'w+') as f_out_json:
f_out_json.truncate(0)
json.dump(response_json_data, f_out_json)
print('Options.py: get options done')
return response_json_data

View File

@@ -0,0 +1,69 @@
#!/usr/bin/env python
import os
import sys
import requests
import json
from pprint import pprint
USE_TEST_URL = int(os.getenv('USE_TEST_URL', False))
# https://api.footylogic.com/tournament/standings?
# languageId=19
# &channelId=1
# &competitionId=50016467
# &optionId=1
# &seasonId=4418
# &layoutId=1
# &roundId=13410
# &tabId=1
# &group=all
def getStandingsJson(competition_id, season_id, round_id):
url = 'https://api.footylogic.com/tournament/standings'
test_url = 'http://localhost:8081/tournament/standings/standings.json'
url = [url, test_url][USE_TEST_URL]
params = {
'languageId': '19',
'channelId': '1',
'competitionId': str(competition_id),
'optionId': '1',
'seasonId': str(season_id),
'layoutId': '1',
'roundId': str(round_id),
'tabId': '1',
'group': 'all',
}
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://footylogic.com/',
'Origin': 'https://footylogic.com',
'Connection': 'keep-alive',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache'
}
response = requests.get(url, params=params, headers=headers)
response_json = json.loads(response.text)
response_json_data = response_json['data']
os_cwd = os.getcwd()
json_store_path = os_cwd+'/jsons'
with open(json_store_path+"/standings.json", 'w+') as f_out_json:
f_out_json.truncate(0)
json.dump(response_json_data, f_out_json)
print('Standings.py: get standings done')
return response_json_data

View File

@@ -0,0 +1,75 @@
#!/usr/bin/env python3
import os
import sys
import re
import json
import requests
from pprint import pprint
def getMatchesJson():
url = 'https://bet.hkjc.com/football/getJSON.aspx?jsontype=odds_hil.aspx'
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://footylogic.com/',
'Origin': 'https://footylogic.com',
'Connection': 'keep-alive',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache'
}
response = requests.get(url, headers=headers)
response_json = json.loads(response.text)
# response_json_tournaments = response_json['tournaments']
response_json_matches = response_json['matches']
os_cwd = os.getcwd()
# json_store_path = os_cwd+'/jsons'
with open("./matches_list.json", 'w+') as f_out_json:
f_out_json.truncate(0)
json.dump(response_json_matches, f_out_json)
# print('get odds_hil done')
return response_json_matches
def getMatchesList(matches_json):
output = {}
for match in matches_json:
matchDay = match['matchDay']
matchID = match['matchID']
matchDate = match['matchDate']
matchYYYYMMDD = matchDate.split('T')[0]
tournamentID = match['tournament']['tournamentID']
tournamentNameEN = match['tournament']['tournamentNameEN']
tournamentNameCH = match['tournament']['tournamentNameCH']
homeTeam_teamNameEN = match['homeTeam']['teamNameEN']
awayTeam_teamNameEN = match['awayTeam']['teamNameEN']
homeTeam_teamNameCH = match['homeTeam']['teamNameCH']
awayTeam_teamNameCH = match['awayTeam']['teamNameCH']
tournament_string = "tournamentNameEN(tournamentNameCH)"
tournament_string = tournament_string.replace(
"tournamentNameEN", tournamentNameEN)
tournament_string = tournament_string.replace(
"tournamentNameCH", tournamentNameCH)
vs_string = 'home_en(home_ch) vs away_en(away_ch)'
vs_string = vs_string.replace('home_en', homeTeam_teamNameEN)
vs_string = vs_string.replace('away_en', awayTeam_teamNameEN)
vs_string = vs_string.replace('home_ch', homeTeam_teamNameCH)
vs_string = vs_string.replace('away_ch', awayTeam_teamNameCH)
temp = ','.join([matchYYYYMMDD, tournament_string, vs_string])
output[temp] = [tournamentID, matchID]
return output

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -ex
export PYTHONDONTWRITEBYTECODE=1
python3 getJSON.py

View File

@@ -0,0 +1,485 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "6405f0ad-a363-4d36-a808-6f778c7b8c65",
"metadata": {},
"source": [
"## 1. start here, run this cell"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "1a332d6f",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ebee0d2271684c0d834cf17cc912376c",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Dropdown(description='Select an option:', options=('2024-03-24,Japanese Division 2(日本乙組聯賽),V-Varen Nagasaki(長崎…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import os,sys,json\n",
"from pprint import pprint\n",
"import nest_asyncio\n",
"import asyncio\n",
"import ipywidgets as widgets\n",
"\n",
"from api_footylogic_com.match.statistics.MarketsInfo import getMarketsInfoJson\n",
"from api_footylogic_com.match.h2h.RecentformInformation import getRecentformInformationJson\n",
"from api_footylogic_com.tournament.Standings import getStandingsJson\n",
"from api_footylogic_com.tournament.Competitions import getCompetitionsJson, lookupCompetitionId\n",
"from api_footylogic_com.match.h2h.Banner import getBannerJson, getTeams, getCompetitionName\n",
"from api_footylogic_com.match.seasonalstats.DropdownFilters import getDropdownFilters\n",
"from bet_hkjc_com.football.getJSON import getMatchesJson, getMatchesList\n",
"\n",
"from utils.Statistics import getTopBottomWinningAndLoseing\n",
"from utils.WriteExcel import writeExcel\n",
"from utils.GetScreenshot import getScreenshot\n",
"from utils.reports import genExcelReport\n",
"from utils.getDropdownMenu import genMatchList\n",
"\n",
"[options, matches_list] = genMatchList()\n",
"dropdown = widgets.Dropdown(options=options, description='Select an option:')\n",
"display(dropdown)"
]
},
{
"cell_type": "markdown",
"id": "b8309647-791d-4d6b-bb01-4c417c46b13c",
"metadata": {},
"source": [
"## 2. select matches and run below cell"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "98987f47-b2af-4932-9f8d-f0a47dca1c10",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['50019599', '50026115']\n",
"generate report for 2024-03-23,Spanish Division 2(西班牙乙組聯賽),Alcorcon(艾高干) vs Oviedo(奧維多)\n"
]
}
],
"source": [
"# generate_report_key = dropdown.value\n",
"generate_report_key = '2024-03-23,Spanish Division 2(西班牙乙組聯賽),Alcorcon(艾高干) vs Oviedo(奧維多)'\n",
"\n",
"report_filename= generate_report_key.replace(',','_').replace(' ','_') +'.xlsx'\n",
"[tournamentID,matchID] = matches_list[generate_report_key]\n",
"pprint([tournamentID,matchID])\n",
"\n",
"# print('generate report for '+ generate_report_key)\n",
"print('generate report for '+ generate_report_key)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "6a31f956-0ff4-4341-8549-8421da70ab04",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026115/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026115/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50019599/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n"
]
}
],
"source": [
"genExcelReport(tournamentID, matchID, report_filename)"
]
},
{
"cell_type": "markdown",
"id": "772987b4-0d77-4ed0-a396-b0b685608930",
"metadata": {},
"source": [
"## 3. grab the report in _output directory"
]
},
{
"cell_type": "markdown",
"id": "3c46d722-0715-4aaf-8b4f-d4163ad88742",
"metadata": {},
"source": [
"### end for phase one"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "4545183e-5e9d-4663-b0a3-08348d56a845",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"05:17:02.595649\n",
"2024-03-24,Japanese Division 2(日本乙組聯賽),V-Varen Nagasaki(長崎成功丸) vs Ventforet Kofu(甲府風林)\n",
"working on 0/26 , 2024-03-24,Japanese Division 2(日本乙組聯賽),V-Varen Nagasaki(長崎成功丸) vs Ventforet Kofu(甲府風林)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"2024-03-24,Japanese Division 2(日本乙組聯賽),Vegalta Sendai(仙台維加泰) vs Tokushima Vortis(德島漩渦)\n",
"working on 1/26 , 2024-03-24,Japanese Division 2(日本乙組聯賽),Vegalta Sendai(仙台維加泰) vs Tokushima Vortis(德島漩渦)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"2024-03-24,Korean FA Cup(南韓足總盃),Jeonnam Dragons(全南天龍) vs Gangneung Citizen(江陵市民)\n",
"working on 2/26 , 2024-03-24,Korean FA Cup(南韓足總盃),Jeonnam Dragons(全南天龍) vs Gangneung Citizen(江陵市民)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"2024-03-24,Japanese Division 2(日本乙組聯賽),Thespakusatsu Gunma(群馬草津溫泉) vs Fagiano Okayama(岡山綠雉)\n",
"working on 3/26 , 2024-03-24,Japanese Division 2(日本乙組聯賽),Thespakusatsu Gunma(群馬草津溫泉) vs Fagiano Okayama(岡山綠雉)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"2024-03-24,Spanish Division 2(西班牙乙組聯賽),Amorebieta(阿莫列比達) vs Gijon(希杭)\n",
"working on 4/26 , 2024-03-24,Spanish Division 2(西班牙乙組聯賽),Amorebieta(阿莫列比達) vs Gijon(希杭)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026117/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026117/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50019599/standings\n",
"2024-03-24,Spanish Division 2(西班牙乙組聯賽),Huesca(侯爾斯卡) vs Burgos(貝高斯)\n",
"working on 5/26 , 2024-03-24,Spanish Division 2(西班牙乙組聯賽),Huesca(侯爾斯卡) vs Burgos(貝高斯)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026111/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026111/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50019599/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"2024-03-24,Spanish Division 2(西班牙乙組聯賽),Valladolid(華拉度列) vs Eibar(伊巴)\n",
"working on 6/26 , 2024-03-24,Spanish Division 2(西班牙乙組聯賽),Valladolid(華拉度列) vs Eibar(伊巴)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026110/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026110/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50019599/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"2024-03-25,Spanish Division 2(西班牙乙組聯賽),Levante(利雲特) vs CF Elche(艾爾切)\n",
"working on 7/26 , 2024-03-25,Spanish Division 2(西班牙乙組聯賽),Levante(利雲特) vs CF Elche(艾爾切)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026116/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026116/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50019599/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"2024-03-25,Spanish Division 2(西班牙乙組聯賽),Mirandes(米蘭迪斯) vs Zaragoza(薩拉戈薩)\n",
"working on 8/26 , 2024-03-25,Spanish Division 2(西班牙乙組聯賽),Mirandes(米蘭迪斯) vs Zaragoza(薩拉戈薩)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026119/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026119/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50019599/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"2024-03-25,International Matches(國際賽),Italy(意大利) vs Ecuador(厄瓜多爾)\n",
"working on 9/26 , 2024-03-25,International Matches(國際賽),Italy(意大利) vs Ecuador(厄瓜多爾)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"2024-03-25,Spanish Division 2(西班牙乙組聯賽),Santander(桑坦德) vs CD Eldense(CD艾丹斯)\n",
"working on 10/26 , 2024-03-25,Spanish Division 2(西班牙乙組聯賽),Santander(桑坦德) vs CD Eldense(CD艾丹斯)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026112/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026112/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50019599/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"2024-03-25,International Matches(國際賽),Jamaica(牙買加) vs Panama(巴拿馬)\n",
"working on 11/26 , 2024-03-25,International Matches(國際賽),Jamaica(牙買加) vs Panama(巴拿馬)\n",
"Banner.py: get banner json done\n",
"2024-03-25,International Matches(國際賽),Guatemala(危地馬拉) vs Venezuela(委內瑞拉)\n",
"working on 12/26 , 2024-03-25,International Matches(國際賽),Guatemala(危地馬拉) vs Venezuela(委內瑞拉)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"2024-03-25,International Matches(國際賽),USA(美國) vs Mexico(墨西哥)\n",
"working on 13/26 , 2024-03-25,International Matches(國際賽),USA(美國) vs Mexico(墨西哥)\n",
"Banner.py: get banner json done\n",
"2024-03-26,Spanish Division 2(西班牙乙組聯賽),Albacete(阿爾巴塞特) vs Racing de Ferrol(費路爾競賽)\n",
"working on 14/26 , 2024-03-26,Spanish Division 2(西班牙乙組聯賽),Albacete(阿爾巴塞特) vs Racing de Ferrol(費路爾競賽)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026118/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50019599/50026118/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50019599/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"2024-03-26,Chilean Division 1(智利甲組聯賽),Universidad Chile(智利大學) vs Cobresal(科布雷素)\n",
"working on 15/26 , 2024-03-26,Chilean Division 1(智利甲組聯賽),Universidad Chile(智利大學) vs Cobresal(科布雷素)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"2024-03-30,Eng Premier(英格蘭超級聯賽),Newcastle(紐卡素) vs West Ham(韋斯咸)\n",
"working on 16/26 , 2024-03-30,Eng Premier(英格蘭超級聯賽),Newcastle(紐卡素) vs West Ham(韋斯咸)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50015668/50025367/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50015668/50025367/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50015668/standings\n",
"2024-03-30,Eng Premier(英格蘭超級聯賽),Chelsea(車路士) vs Burnley(般尼)\n",
"working on 17/26 , 2024-03-30,Eng Premier(英格蘭超級聯賽),Chelsea(車路士) vs Burnley(般尼)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50015668/50026779/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50015668/50026779/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50015668/standings\n",
"2024-03-30,Eng Premier(英格蘭超級聯賽),Tottenham(熱刺) vs Luton(盧頓)\n",
"working on 18/26 , 2024-03-30,Eng Premier(英格蘭超級聯賽),Tottenham(熱刺) vs Luton(盧頓)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50015668/50026607/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50015668/50026607/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50015668/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"2024-03-30,Eng Premier(英格蘭超級聯賽),Bournemouth(般尼茅夫) vs Everton(愛華頓)\n",
"working on 19/26 , 2024-03-30,Eng Premier(英格蘭超級聯賽),Bournemouth(般尼茅夫) vs Everton(愛華頓)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50015668/50026614/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50015668/50026614/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50015668/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"2024-03-30,Eng Premier(英格蘭超級聯賽),Nottingham Forest(諾定咸森林) vs Crystal Palace(水晶宮)\n",
"working on 20/26 , 2024-03-30,Eng Premier(英格蘭超級聯賽),Nottingham Forest(諾定咸森林) vs Crystal Palace(水晶宮)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50015668/50026778/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50015668/50026778/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50015668/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"2024-03-30,Eng Premier(英格蘭超級聯賽),Sheff Utd(錫菲聯) vs Fulham(富咸)\n",
"working on 21/26 , 2024-03-30,Eng Premier(英格蘭超級聯賽),Sheff Utd(錫菲聯) vs Fulham(富咸)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50015668/50026613/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50015668/50026613/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50015668/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"2024-03-31,Eng Premier(英格蘭超級聯賽),Aston Villa(阿士東維拉) vs Wolves(狼隊)\n",
"working on 22/26 , 2024-03-31,Eng Premier(英格蘭超級聯賽),Aston Villa(阿士東維拉) vs Wolves(狼隊)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50015668/50025366/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50015668/50025366/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50015668/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"2024-03-31,Eng Premier(英格蘭超級聯賽),Brentford(賓福特) vs Manchester Utd(曼聯)\n",
"working on 23/26 , 2024-03-31,Eng Premier(英格蘭超級聯賽),Brentford(賓福特) vs Manchester Utd(曼聯)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50015668/50025368/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50015668/50025368/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50015668/standings\n",
"2024-03-31,Eng Premier(英格蘭超級聯賽),Liverpool(利物浦) vs Brighton(白禮頓)\n",
"working on 24/26 , 2024-03-31,Eng Premier(英格蘭超級聯賽),Liverpool(利物浦) vs Brighton(白禮頓)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50015668/50025370/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50015668/50025370/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50015668/standings\n",
"IndexError('list index out of range')\n",
"'error:{jp:statistics.distilledRecent8Results.homeTeam[4].pos}'\n",
"IndexError('list index out of range')\n",
"'error:{jp:statistics.distilledRecent8Results.homeTeam[4].fullTimeScore}'\n",
"IndexError('list index out of range')\n",
"'error:{jp:statistics.distilledRecent8Results.awayTeam[4].pos}'\n",
"IndexError('list index out of range')\n",
"'error:{jp:statistics.distilledRecent8Results.awayTeam[4].fullTimeScore}'\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"2024-03-31,Eng Premier(英格蘭超級聯賽),Manchester City(曼城) vs Arsenal(阿仙奴)\n",
"working on 25/26 , 2024-03-31,Eng Premier(英格蘭超級聯賽),Manchester City(曼城) vs Arsenal(阿仙奴)\n",
"Banner.py: get banner json done\n",
"MarketsInfo.py: getMarketsInfoJson done\n",
"DropdownFilters.py: get getDropdownFilters json done\n",
"Options.py: get options done\n",
"Standings.py: get standings done\n",
"https://footylogic.com/en/matchcenter/0/50015668/50025369/bmstatistics\n",
"https://footylogic.com/en/matchcenter/0/50015668/50025369/bmrecentforms\n",
"https://footylogic.com/en/tournament/league/50015668/standings\n",
"/app/notebook/_images/bmstatistics.png\n",
"/app/notebook/_images/bmrecentforms.png\n",
"/app/notebook/_images/standings.png\n",
"reports.py: done...\n",
"05:19:52.123568\n"
]
}
],
"source": [
"from datetime import datetime\n",
"print(datetime.now().time())\n",
"\n",
"target_date = '2024-03'\n",
"\n",
"for i in range(0, len(options)):\n",
" try:\n",
" option = options[i]\n",
" print(option)\n",
" if (option.index(target_date) > -1):\n",
" print('working on '+str(i)+'/'+str(len(options))+' , '+option)\n",
" [tournamentID,matchID] = matches_list[option]\n",
" report_filename= option.replace(',','_').replace(' ','_') +'.xlsx'\n",
" genExcelReport(tournamentID, matchID, report_filename)\n",
" except Exception as e:\n",
" pass\n",
"\n",
"print(datetime.now().time())"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8e1bb1c6-6b4b-4c4b-ad93-5192fdd7faf0",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@@ -0,0 +1 @@
2

View File

@@ -0,0 +1,64 @@
#!/usr/bin/env python
from playwright.async_api import async_playwright
def helloworld():
print("helloworld")
async def getScreenshot_bmstatistics(url, file_path, timeout_s):
async with async_playwright() as pw:
browser = await pw.chromium.launch(headless=True)
page = await browser.new_page()
await page.goto(url)
await page.wait_for_timeout(timeout_s * 1000)
# await page.waitForSelector('xpath=//*[contains(text(), "Total Goals")]');
await page.get_by_text("Total Goals").click()
await page.screenshot(path=file_path, full_page=True)
await browser.close()
async def getScreenshot_bmrecentforms(url, file_path, timeout_s):
async with async_playwright() as pw:
browser = await pw.chromium.launch(headless=True)
page = await browser.new_page()
await page.goto(url)
elements = await page.locator('select.select-margin').all()
with open('./result.txt','w') as fo:
fo.write(str(len(elements)))
await elements[0].select_option(label="Home Matches")
await elements[1].select_option(label="Away Matches")
await page.screenshot(path=file_path, full_page=True)
await browser.close()
async def getScreenshot_standings(url, file_path, timeout_s):
async with async_playwright() as pw:
browser = await pw.chromium.launch(headless=True)
page = await browser.new_page()
await page.goto(url)
await page.wait_for_timeout(timeout_s * 1000)
await page.screenshot(path=file_path, full_page=True)
await browser.close()
async def getScreenshot(url, file_path, timeout_s):
async with async_playwright() as pw:
browser = await pw.chromium.launch(headless=True)
page = await browser.new_page()
await page.goto(url)
await page.wait_for_timeout(timeout_s * 1000)
await page.screenshot(path=file_path, full_page=True)
await browser.close()

View File

@@ -0,0 +1,132 @@
#!/usr/bin/env python3
import os,sys,json
from pprint import pprint
def distillRecent8Results(json_manifest, competitionName="Belgian Division 1"):
# distill results
json_manifest['statistics']['distilledRecent8Results'] = {}
json_manifest_distilled = json_manifest['statistics']['distilledRecent8Results']
json_manifest_distilled['homeTeam'] = []
distilled_homeTeam = json_manifest_distilled['homeTeam']
json_manifest_distilled['awayTeam'] = []
distilled_awayTeam = json_manifest_distilled['awayTeam']
recent8Results = json_manifest['recentfrom-information.json']['recent8Results']
recent8ResultsHomeTeam = json_manifest['recentfrom-information-home-team.json']['recent8Results']
recent8ResultsAwayTeam = json_manifest['recentfrom-information-away-team.json']['recent8Results']
homeTeam = recent8ResultsHomeTeam['homeTeam']
for result in homeTeam:
if result['competitionName'] == competitionName and result['homeOrAway'] == "H":
if (len(distilled_homeTeam)) < 5:
distilled_homeTeam.append(result)
awayTeam = recent8ResultsAwayTeam['awayTeam']
for result in awayTeam:
if result['competitionName'] == competitionName and result['homeOrAway'] == "A":
if (len(distilled_awayTeam)) < 5:
distilled_awayTeam.append(result)
def lookupPositionByTeamName(json_manifest, teamNameToCheck):
standings_info = json_manifest['tournament/standings.json']['info']
for standing in standings_info:
if standing['teamName'] == teamNameToCheck:
return standing['teamRank']
raise Exception(teamNameToCheck)
return -99
def countTotalStandingTeam(json_manifest):
standings_info = json_manifest['tournament/standings.json']['info']
return len(standings_info)
def getTopBottomWinningAndLoseing(json_manifest, competitionName):
json_manifest['statistics'] = {}
json_manifest['statistics']['top_bottom_winning_losing'] = {}
result = json_manifest['statistics']['top_bottom_winning_losing']
# get statistics
result['home_top_win_count'] = 0
result['home_top_draw_count'] = 0
result['home_top_loss_count'] = 0
result['home_bottom_win_count'] = 0
result['home_bottom_draw_count'] = 0
result['home_bottom_loss_count'] = 0
result['away_top_win_count'] = 0
result['away_top_draw_count'] = 0
result['away_top_loss_count'] = 0
result['away_bottom_win_count'] = 0
result['away_bottom_draw_count'] = 0
result['away_bottom_loss_count'] = 0
# filter all non same tournament
distillRecent8Results(json_manifest, competitionName)
json_manifest_distilled = json_manifest['statistics']['distilledRecent8Results']
json_manifest_distilled_homeTeam = json_manifest_distilled['homeTeam']
json_manifest_distilled_awayTeam = json_manifest_distilled['awayTeam']
all_team_count = countTotalStandingTeam(json_manifest)
json_manifest_distilled['allTeamCount'] = all_team_count
for entry in json_manifest_distilled_homeTeam:
oppTeamName = entry['oppTeamName']
pos = lookupPositionByTeamName(json_manifest, oppTeamName)
pos = int(pos)
entry['pos'] = pos
if (pos <= (all_team_count / 2)):
# count home top winning
if entry['fullTimeResult'] == 'W':
result['home_top_win_count'] += 1
# count home top draw
if entry['fullTimeResult'] == 'D':
result['home_top_draw_count'] += 1
# count home top losing
if entry['fullTimeResult'] == 'L':
result['home_top_loss_count'] += 1
else:
# count home bottom winning
if entry['fullTimeResult'] == 'W':
result['home_bottom_win_count'] += 1
# count home bottom draw
if entry['fullTimeResult'] == 'D':
result['home_bottom_draw_count'] += 1
# count home bottom losing
if entry['fullTimeResult'] == 'L':
result['home_bottom_loss_count'] += 1
for entry in json_manifest_distilled_awayTeam:
oppTeamName = entry['oppTeamName']
pos = lookupPositionByTeamName(json_manifest, oppTeamName)
pos = int(pos)
entry['pos'] = pos
if (pos <= (all_team_count / 2)):
# count away top winning
if entry['fullTimeResult'] == 'W':
result['away_top_win_count'] += 1
# count away top draw
if entry['fullTimeResult'] == 'D':
result['away_top_draw_count'] += 1
# count away top losing
if entry['fullTimeResult'] == 'L':
result['away_top_loss_count'] += 1
else:
# count away bottom winning
if entry['fullTimeResult'] == 'W':
result['away_bottom_win_count'] += 1
# count away bottom draw
if entry['fullTimeResult'] == 'D':
result['away_bottom_draw_count'] += 1
# count away bottom losing
if entry['fullTimeResult'] == 'L':
result['away_bottom_loss_count'] += 1
def helloworld():
print("helloworld")

View File

@@ -0,0 +1,90 @@
#!/usr/bin/env python
import os
import sys
import re
from pprint import pprint
import json
from jsonpath_ng import jsonpath, parse
from openpyxl import Workbook, load_workbook
from openpyxl.utils import get_column_letter
from openpyxl.styles import Alignment
from openpyxl.drawing.image import Image
import re
def LookupTeamPosition(team_to_lookup, manifest_json):
team_rank = -99
num_of_team = -99
standings = manifest_json['tournament/standings.json']['info']
num_of_team = len(standings)
for standing in standings:
if standing['teamName'] == team_to_lookup:
team_rank = int(standing['teamRank'])
return [team_rank, num_of_team]
def writeExcel(json_manifest, image_paths, report_filename):
pattern = r"(?<={jp:)(.*)(?=})"
excel_template_path = '/report_template.xlsx'
os_cwd = os.getcwd()
utils_path = os_cwd+'/utils'
output_path = os_cwd + "/_output"
images_path = os_cwd + "/_images"
# Find and replace values
find_value = 'Mainz'
replace_value = '11111111'
# Create a new workbook
workbook = load_workbook(utils_path+excel_template_path)
# Select the active sheet (first sheet by default)
sheet = workbook.active
for row in sheet.iter_rows():
for cell in row:
# print(cell.coordinate)
if type(cell.value) == type('string'):
result = re.search(pattern, cell.value)
if result:
try:
jsonpath_expression = parse(result.group(0))
alignment = Alignment(
horizontal='center', vertical='center')
cell.alignment = alignment
cell.value = jsonpath_expression.find(json_manifest)[
0].value
except Exception as e:
pprint(e)
pprint("error:" + cell.value)
alignment = Alignment(
horizontal='center', vertical='center')
cell.alignment = alignment
cell.value = '---'
# image_path = images_path+"/helloworld.jpg"
current_cell = sheet.cell(row=1, column=9)
for image_path in image_paths:
print(image_path)
image = Image(image_path)
sheet.add_image(image, current_cell.coordinate)
current_cell = current_cell.offset(row=0, column=17)
workbook.save(output_path+'/'+report_filename)
def helloworld():
print(os.getcwd())
print("helloworld")

View File

@@ -0,0 +1,27 @@
#!
import os,sys
from api_footylogic_com.match.statistics.MarketsInfo import getMarketsInfoJson
from api_footylogic_com.match.h2h.RecentformInformation import getRecentformInformationJson
from api_footylogic_com.tournament.Standings import getStandingsJson
from api_footylogic_com.tournament.Competitions import getCompetitionsJson, lookupCompetitionId
from api_footylogic_com.match.h2h.Banner import getBannerJson, getTeams, getCompetitionName
from api_footylogic_com.match.seasonalstats.DropdownFilters import getDropdownFilters
from utils.Statistics import getTopBottomWinningAndLoseing
from utils.WriteExcel import writeExcel
from utils.GetScreenshot import getScreenshot
import nest_asyncio
import asyncio
import ipywidgets as widgets
from bet_hkjc_com.football.getJSON import getMatchesJson, getMatchesList
def genMatchList():
matches_json = getMatchesJson()
matches_list = getMatchesList(matches_json)
labels = []
for match_label in matches_list.keys():
labels.append(match_label)
return [labels, matches_list]

View File

@@ -0,0 +1,153 @@
#!/usr/bin/env python3
import os
import sys
import json
from pprint import pprint
from api_footylogic_com.match.statistics.MarketsInfo import getMarketsInfoJson
from api_footylogic_com.match.h2h.RecentformInformation import getRecentformInformationJson
from api_footylogic_com.match.h2h.RecentformInformationHomeTeam import getRecentformInformationHomeTeamJson
from api_footylogic_com.match.h2h.RecentformInformationAwayTeam import getRecentformInformationAwayTeamJson
from api_footylogic_com.tournament.Standings import getStandingsJson
from api_footylogic_com.tournament.Competitions import getCompetitionsJson, lookupCompetitionId
from api_footylogic_com.tournament.Options import getOptionsJson
from api_footylogic_com.match.h2h.Banner import getBannerJson, getTeams, getCompetitionName
from api_footylogic_com.match.seasonalstats.DropdownFilters import getDropdownFilters
from utils.Statistics import getTopBottomWinningAndLoseing
from utils.WriteExcel import writeExcel
from utils.GetScreenshot import getScreenshot, getScreenshot_bmstatistics, getScreenshot_bmrecentforms, getScreenshot_standings
import nest_asyncio
import asyncio
def genExcelReport(tournamentID='50022259', matchID='50024766', report_filename="report.xlsx"):
competitionId = tournamentID
eventId = matchID
# # extract
# # # banner.py
banner_json = getBannerJson(eventId)
[homeTeamId, awayTeamId] = getTeams(banner_json)
competitionName = getCompetitionName(banner_json)
# # # # 'https://footylogic.com/en/matchcenter/0/'+tournamentID+'/'+matchID+'/bmrecentforms'
# # match/h2h/RecentformInformation.py
getRecentformInformationJson(homeTeamId, awayTeamId)
getRecentformInformationHomeTeamJson(homeTeamId, awayTeamId)
getRecentformInformationAwayTeamJson(homeTeamId, awayTeamId)
# # MarketsInfo.py
getMarketsInfoJson(eventId, homeTeamId, awayTeamId, competitionId)
competitions_json = getCompetitionsJson()
# competitionId = lookupCompetitionId(competitions_json, competitionName)
lookupCompetitionId(competitions_json, competitionName)
dropdown_filters_json = getDropdownFilters(competitionId)
seasonId = dropdown_filters_json['Season'][0]['id']
options_json = getOptionsJson(competitionId, seasonId)
roundId = options_json[0]['id']
# https://api.footylogic.com/tournament/options?languageId=19&channelId=1&competitionId=50019599&seasonId=4456
standings_json = getStandingsJson(competitionId, seasonId, roundId)
# translate
json_manifest = {}
pattern = r"(?<={jp:)(.*)(?=})"
os_cwd = os.getcwd()
utils_path = os_cwd+'/utils'
excel_template_path = '/report_template.xlsx'
json_store_path = os_cwd+'/jsons'
output_path = os_cwd + "/_output"
images_path = os_cwd + "/_images"
markets_info_json_path = json_store_path+'/markets-info.json'
recentform_information_json_path = json_store_path+'/recentfrom-information.json'
recentform_information_home_team_json_path = json_store_path+'/recentfrom-information-home-team.json'
recentform_information_away_team_json_path = json_store_path+'/recentfrom-information-away-team.json'
recentform_information_json_path = json_store_path+'/recentfrom-information.json'
standings_json_path = json_store_path+'/standings.json'
banner_json_path = json_store_path+'/banner.json'
json_manifest_json_path = json_store_path+'/json_manifest.json'
with open(banner_json_path, 'r') as json_file:
banner_json = json.load(json_file)
json_manifest = {**json_manifest, 'banner_json': banner_json}
with open(markets_info_json_path, 'r') as json_file:
markets_info_json = json.load(json_file)
json_manifest = {**json_manifest,
'markets-info.json': markets_info_json}
# to be obsoleted
json_manifest = {**json_manifest, **markets_info_json}
with open(recentform_information_json_path, 'r') as json_file:
recentfrom_information_json = json.load(json_file)
json_manifest = {
**json_manifest, 'recentfrom-information.json': recentfrom_information_json}
# to be obsoleted
json_manifest = {**json_manifest, **recentfrom_information_json}
with open(recentform_information_home_team_json_path, 'r') as json_file:
recentfrom_information_json = json.load(json_file)
json_manifest = {
**json_manifest, 'recentfrom-information-home-team.json': recentfrom_information_json}
# to be obsoleted
json_manifest = {**json_manifest, **recentfrom_information_json}
with open(recentform_information_away_team_json_path, 'r') as json_file:
recentfrom_information_json = json.load(json_file)
json_manifest = {
**json_manifest, 'recentfrom-information-away-team.json': recentfrom_information_json}
# to be obsoleted
json_manifest = {**json_manifest, **recentfrom_information_json}
with open(standings_json_path, 'r') as json_file:
standings_json = json.load(json_file)
json_manifest = {**json_manifest,
'tournament/standings.json': standings_json}
with open(json_manifest_json_path, 'w+') as f_out:
f_out.truncate(0)
json.dump(json_manifest, f_out)
# get top/bottom winning and loseingreport_filename
getTopBottomWinningAndLoseing(json_manifest, competitionName)
# get screenshot
nest_asyncio.apply()
bms_url = 'https://footylogic.com/en/matchcenter/0/' + tournamentID+'/'+ matchID +'/bmstatistics'
bm_recent = 'https://footylogic.com/en/matchcenter/0/' + tournamentID+'/'+ matchID +'/bmrecentforms'
standings_url = 'https://footylogic.com/en/tournament/league/' + tournamentID +'/standings'
print(bms_url)
print(bm_recent)
print(standings_url)
asyncio.run(getScreenshot_bmstatistics(bms_url, images_path+'/bmstatistics.png', 1))
asyncio.run(getScreenshot_bmrecentforms(bm_recent, images_path+'/bmrecentforms.png', 1))
asyncio.run(getScreenshot_standings(standings_url, images_path+'/standings.png', 1))
# load
writeExcel(json_manifest, [
images_path+'/bmstatistics.png',
images_path+'/bmrecentforms.png',
images_path+'/standings.png',
], report_filename)
print('reports.py: done...')
def helloworld():
print("helloworld")

Binary file not shown.

View File

@@ -0,0 +1,7 @@
jsonpath_ng==1.6.1
openpyxl==3.1.2
pillow==10.2.0
jupyter==1.0.0
playwright==1.41.0
ipywidgets==8.1.1
nest_asyncio==1.6.0

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -x
pip install playwright
pip install -r requirements.txt &
playwright install &
wait
jupyter notebook \
--allow-root \
--ip=0.0.0.0 \
--notebook-dir=notebook

View File

@@ -0,0 +1 @@
docker run -it -v .:/app -w /app -p 3000:3000 -p 8888:8888 -u 1000:1000 --rm logickee/ych1990101_jupyter:latest bash

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -ex
docker run -it \
-v $PWD:/app \
-w /app \
-p 3000:3000 \
-p 8888:8888 \
-u 1000:1000 \
--rm \
logickee/ych1990101_jupyter:latest \
bash

View File

@@ -0,0 +1 @@
{"eventId": "50024766", "homeTeamLogo": 13307, "awayTeamLogo": 10939, "homeTeamName": "Union Saint Gilloise", "awayTeamName": "Anderlecht", "competitionName": "Belgian Cup", "kickOffTime": "2024-01-25 19:30:00", "homeOdds": 1.68, "awayOdds": 3.95, "drawOdds": 3.5, "homeTeamId": 50003201, "homeTeamIdNav": 50003201, "awayTeamId": 50000175, "awayTeamIdNav": 50000175, "matchNumber": null, "homeTeamPos": "1", "awayTeamPos": "2", "matchDayCode": "FB0744", "competitionId": 50022259, "tournamentType": "League", "homePlayerAnalysis": 2, "awayPlayerAnalysis": 2, "homeLeagueShortName": "BEL L1", "awayLeagueShortName": "BEL L1", "competitionIdNav": 50022259}

View File

@@ -0,0 +1,497 @@
[
{
"categoryId": 10227,
"categoryName": "England",
"categoryImg": "england",
"competitions": [
{
"competitionId": 50015668,
"competitionName": "Eng Premier",
"standing_table_link": "https://footylogic.com/en/tournament/league/50015668/standings"
},
{
"competitionId": 50016923,
"competitionName": "Eng Championship",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016923/standings"
},
{
"competitionId": 50016924,
"competitionName": "Eng League 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016924/standings"
},
{
"competitionId": 50016925,
"competitionName": "Eng League 2",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016925/standings"
},
{
"competitionId": 50022578,
"competitionName": "FA Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50022578/standings"
},
{
"competitionId": 50018849,
"competitionName": "Eng League Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50018849/standings"
},
{
"competitionId": 50020336,
"competitionName": "Eng League Trophy",
"standing_table_link": "https://footylogic.com/en/tournament/league/50020336/standings"
},
{
"competitionId": 50015602,
"competitionName": "Eng Shield",
"standing_table_link": "https://footylogic.com/en/tournament/league/50015602/standings"
}
]
},
{
"categoryId": 10013,
"categoryName": "Australia",
"categoryImg": "australia",
"competitions": [
{
"competitionId": 50022033,
"competitionName": "Australian Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50022033/standings"
},
{
"competitionId": 50015616,
"competitionName": "Australian FA Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50015616/standings"
}
]
},
{
"categoryId": 10200,
"categoryName": "Spain",
"categoryImg": "spain",
"competitions": [
{
"competitionId": 50016200,
"competitionName": "Spanish Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016200/standings"
},
{
"competitionId": 50019599,
"competitionName": "Spanish Division 2",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019599/standings"
},
{
"competitionId": 50022469,
"competitionName": "Spanish Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50022469/standings"
},
{
"competitionId": 50024282,
"competitionName": "Spanish Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50024282/standings"
}
]
},
{
"categoryId": 10082,
"categoryName": "Germany",
"categoryImg": "germany",
"competitions": [
{
"competitionId": 50016467,
"competitionName": "German Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016467/standings"
},
{
"competitionId": 50016660,
"competitionName": "German Division 2",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016660/standings"
},
{
"competitionId": 50019550,
"competitionName": "German Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019550/standings"
},
{
"competitionId": 50019595,
"competitionName": "German Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019595/standings"
}
]
},
{
"categoryId": 10107,
"categoryName": "Italy",
"categoryImg": "italy",
"competitions": [
{
"competitionId": 50016549,
"competitionName": "Italian Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016549/standings"
},
{
"competitionId": 50019580,
"competitionName": "Italian Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019580/standings"
},
{
"competitionId": 50024543,
"competitionName": "Italian Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50024543/standings"
}
]
},
{
"categoryId": 10228,
"categoryName": "USA",
"categoryImg": "united-states-of-america",
"competitions": [
{
"competitionId": 50011183,
"competitionName": "US Football League",
"standing_table_link": "https://footylogic.com/en/tournament/league/50011183/standings"
},
{
"competitionId": 50013586,
"competitionName": "US League Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50013586/standings"
}
]
},
{
"categoryId": 10115,
"categoryName": "Korea Republic",
"categoryImg": "south-korea",
"competitions": [
{
"competitionId": 50011096,
"competitionName": "Korean Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50011096/standings"
},
{
"competitionId": 50012908,
"competitionName": "Korean FA Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50012908/standings"
}
]
},
{
"categoryId": 10109,
"categoryName": "Japan",
"categoryImg": "japan",
"competitions": [
{
"competitionId": 50010052,
"competitionName": "Japanese Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50010052/standings"
},
{
"competitionId": 50010155,
"competitionName": "Japanese Division 2",
"standing_table_link": "https://footylogic.com/en/tournament/league/50010155/standings"
},
{
"competitionId": 50011744,
"competitionName": "Japanese League Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50011744/standings"
},
{
"competitionId": 50014594,
"competitionName": "Emperor's Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50014594/standings"
},
{
"competitionId": 50010020,
"competitionName": "Japanese Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50010020/standings"
}
]
},
{
"categoryId": 10140,
"categoryName": "Mexico",
"categoryImg": "mexico",
"competitions": [
{
"competitionId": 50024375,
"competitionName": "Mexican Premier",
"standing_table_link": "https://footylogic.com/en/tournament/league/50024375/standings"
},
{
"competitionId": 127,
"competitionName": "Mexican Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/127/standings"
},
{
"competitionId": 141,
"competitionName": "Mexican Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/141/standings"
},
{
"competitionId": 50015005,
"competitionName": "Mexican Champion Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50015005/standings"
}
]
},
{
"categoryId": 10010,
"categoryName": "Argentina",
"categoryImg": "argentina",
"competitions": [
{
"competitionId": 50024762,
"competitionName": "Argentine Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50024762/standings"
},
{
"competitionId": 50023611,
"competitionName": "Argentine Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50023611/standings"
},
{
"competitionId": 50010688,
"competitionName": "Argentine Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50010688/standings"
},
{
"competitionId": 910,
"competitionName": "APL Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/910/standings"
}
]
},
{
"categoryId": 10074,
"categoryName": "France",
"categoryImg": "france",
"competitions": [
{
"competitionId": 50016199,
"competitionName": "French Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016199/standings"
},
{
"competitionId": 50018675,
"competitionName": "French Division 2",
"standing_table_link": "https://footylogic.com/en/tournament/league/50018675/standings"
},
{
"competitionId": 50023043,
"competitionName": "French FA Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50023043/standings"
},
{
"competitionId": 28,
"competitionName": "French League Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/28/standings"
},
{
"competitionId": 50023652,
"competitionName": "French Champion Trophy",
"standing_table_link": "https://footylogic.com/en/tournament/league/50023652/standings"
}
]
},
{
"categoryId": 10179,
"categoryName": "Russia",
"categoryImg": "russia",
"competitions": [
{
"competitionId": 50016142,
"competitionName": "Russian Premier",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016142/standings"
},
{
"competitionId": 50016363,
"competitionName": "Russian Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016363/standings"
},
{
"competitionId": 50015520,
"competitionName": "Russian Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50015520/standings"
}
]
},
{
"categoryId": 10208,
"categoryName": "Sweden",
"categoryImg": "sweden",
"competitions": [
{
"competitionId": 50023185,
"competitionName": "Swedish Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50023185/standings"
},
{
"competitionId": 50019777,
"competitionName": "Swedish Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019777/standings"
}
]
},
{
"categoryId": 10174,
"categoryName": "Portugal",
"categoryImg": "portugal",
"competitions": [
{
"competitionId": 50019002,
"competitionName": "Portuguese Premier",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019002/standings"
},
{
"competitionId": 50022009,
"competitionName": "Portuguese Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50022009/standings"
},
{
"competitionId": 50016144,
"competitionName": "Portuguese League Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016144/standings"
},
{
"competitionId": 50018847,
"competitionName": "Portuguese Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50018847/standings"
}
]
},
{
"categoryId": 10163,
"categoryName": "Norway",
"categoryImg": "norway",
"competitions": [
{
"competitionId": 50012569,
"competitionName": "Norwegian Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50012569/standings"
},
{
"competitionId": 50014272,
"competitionName": "Norwegian Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50014272/standings"
},
{
"competitionId": 151,
"competitionName": "Norwegian Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/151/standings"
}
]
},
{
"categoryId": 10153,
"categoryName": "Netherlands",
"categoryImg": "netherlands",
"competitions": [
{
"competitionId": 50019000,
"competitionName": "Dutch Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019000/standings"
},
{
"competitionId": 50019001,
"competitionName": "Dutch Division 2",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019001/standings"
},
{
"competitionId": 50022411,
"competitionName": "Dutch Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50022411/standings"
},
{
"competitionId": 50018763,
"competitionName": "Dutch Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50018763/standings"
}
]
},
{
"categoryId": 10030,
"categoryName": "Brazil",
"categoryImg": "brazil",
"competitions": [
{
"competitionId": 50013324,
"competitionName": "Brazilian Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50013324/standings"
},
{
"competitionId": 50024101,
"competitionName": "Brazilian Paulista League",
"standing_table_link": "https://footylogic.com/en/tournament/league/50024101/standings"
},
{
"competitionId": 50012097,
"competitionName": "Brazilian Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50012097/standings"
}
]
},
{
"categoryId": 10043,
"categoryName": "Chile",
"categoryImg": "chile",
"competitions": [
{
"competitionId": 50009057,
"competitionName": "Chilean Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50009057/standings"
},
{
"competitionId": 50014689,
"competitionName": "Chilean Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50014689/standings"
},
{
"competitionId": 50009056,
"competitionName": "Chilean Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50009056/standings"
}
]
},
{
"categoryId": 10021,
"categoryName": "Belgium",
"categoryImg": "belgium",
"competitions": [
{
"competitionId": 50016588,
"competitionName": "Belgian Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016588/standings"
},
{
"competitionId": 50022259,
"competitionName": "Belgian Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50022259/standings"
},
{
"competitionId": 50016140,
"competitionName": "Belgian Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016140/standings"
}
]
},
{
"categoryId": 10246,
"categoryName": "Scotland",
"categoryImg": "scotland",
"competitions": [
{
"competitionId": 50018485,
"competitionName": "Scottish Premier",
"standing_table_link": "https://footylogic.com/en/tournament/league/50018485/standings"
},
{
"competitionId": 50024631,
"competitionName": "Scottish FA Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50024631/standings"
},
{
"competitionId": 50015522,
"competitionName": "Scottish League Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50015522/standings"
}
]
}
]

View File

@@ -0,0 +1,78 @@
{
"Season": [
{
"id": 4446,
"name": "2023/24 ",
"competitionId": 50016588
},
{
"id": 4219,
"name": "2022/23 ",
"competitionId": 50016588
},
{
"id": 3979,
"name": "2021/22 ",
"competitionId": 50016588
},
{
"id": 3647,
"name": "2020/21 ",
"competitionId": 50016588
},
{
"id": 3221,
"name": "2019/20 ",
"competitionId": 50016588
},
{
"id": 3025,
"name": "2018/19 ",
"competitionId": 50016588
},
{
"id": 2697,
"name": "2017/18 ",
"competitionId": 50016588
},
{
"id": 2006,
"name": "2016/17 ",
"competitionId": 50016588
},
{
"id": 1781,
"name": "2015/16 ",
"competitionId": 50016588
}
],
"Options": [
{
"id": 1,
"name": "All",
"competitionId": 50016588
},
{
"id": 2,
"name": "Home",
"competitionId": 50016588
},
{
"id": 3,
"name": "Away",
"competitionId": 50016588
}
],
"betType": [
{
"id": 1,
"name": "HalfTime",
"competitionId": 50016588
},
{
"id": 2,
"name": "FullTime",
"competitionId": 50016588
}
]
}

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
hello json server
</body>
</html>

View File

@@ -0,0 +1,29 @@
{
"data": {
"eventId": "50024766",
"homeTeamLogo": 13307,
"awayTeamLogo": 10939,
"homeTeamName": "Union Saint Gilloise",
"awayTeamName": "Anderlecht",
"competitionName": "Belgian Cup",
"kickOffTime": "2024-01-25 19:30:00",
"homeOdds": 1.68,
"awayOdds": 3.95,
"drawOdds": 3.5,
"homeTeamId": 50003201,
"homeTeamIdNav": 50003201,
"awayTeamId": 50000175,
"awayTeamIdNav": 50000175,
"matchNumber": null,
"homeTeamPos": "1",
"awayTeamPos": "2",
"matchDayCode": "FB0744",
"competitionId": 50022259,
"tournamentType": "League",
"homePlayerAnalysis": 2,
"awayPlayerAnalysis": 2,
"homeLeagueShortName": "BEL L1",
"awayLeagueShortName": "BEL L1",
"competitionIdNav": 50022259
}
}

View File

@@ -0,0 +1,188 @@
{
"statusCode": 200,
"data": {
"recent8Results": {
"homeTeam": [
{
"competitionName": "Belgian Division 1",
"kickOff": "2024-01-21 15:00:00",
"homeOrAway": "H",
"oppTeamName": "Sint Truiden",
"teamPos": 8,
"fullTimeScore": "2:1",
"halfTimeScore": "1:1",
"fullTimeResult": "W",
"firstHalfHad": "D"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-26 19:45:00",
"homeOrAway": "A",
"oppTeamName": "Bruges",
"teamPos": 4,
"fullTimeScore": "1:1",
"halfTimeScore": "1:0",
"fullTimeResult": "D",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-23 15:00:00",
"homeOrAway": "A",
"oppTeamName": "Eupen",
"teamPos": 14,
"fullTimeScore": "2:1",
"halfTimeScore": "2:0",
"fullTimeResult": "W",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-17 15:00:00",
"homeOrAway": "H",
"oppTeamName": "KV Mechelen",
"teamPos": 11,
"fullTimeScore": "1:0",
"halfTimeScore": "0:0",
"fullTimeResult": "W",
"firstHalfHad": "D"
},
{
"competitionName": "UE Cup",
"kickOff": "2023-12-14 17:45:00",
"homeOrAway": "H",
"oppTeamName": "Liverpool",
"teamPos": 1,
"fullTimeScore": "2:1",
"halfTimeScore": "2:1",
"fullTimeResult": "W",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-10 18:15:00",
"homeOrAway": "A",
"oppTeamName": "Charleroi",
"teamPos": 12,
"fullTimeScore": "3:1",
"halfTimeScore": "1:0",
"fullTimeResult": "W",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Cup",
"kickOff": "2023-12-07 19:00:00",
"homeOrAway": "A",
"oppTeamName": "Waasland Beveren",
"teamPos": null,
"fullTimeScore": "2:0",
"halfTimeScore": "0:0",
"fullTimeResult": "W",
"firstHalfHad": "D"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-03 18:15:00",
"homeOrAway": "H",
"oppTeamName": "Cercle Bruges",
"teamPos": 5,
"fullTimeScore": "2:1",
"halfTimeScore": "2:1",
"fullTimeResult": "W",
"firstHalfHad": "W"
}
],
"awayTeam": [
{
"competitionName": "Belgian Division 1",
"kickOff": "2024-01-21 17:30:00",
"homeOrAway": "A",
"oppTeamName": "OH Leuven",
"teamPos": 14,
"fullTimeScore": "1:1",
"halfTimeScore": "0:1",
"fullTimeResult": "D",
"firstHalfHad": "L"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-27 19:45:00",
"homeOrAway": "H",
"oppTeamName": "Cercle Bruges",
"teamPos": 7,
"fullTimeScore": "2:0",
"halfTimeScore": "1:0",
"fullTimeResult": "W",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-23 19:45:00",
"homeOrAway": "H",
"oppTeamName": "Genk",
"teamPos": 7,
"fullTimeScore": "2:1",
"halfTimeScore": "0:0",
"fullTimeResult": "W",
"firstHalfHad": "D"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-17 17:30:00",
"homeOrAway": "A",
"oppTeamName": "Antwerp",
"teamPos": 4,
"fullTimeScore": "1:1",
"halfTimeScore": "1:0",
"fullTimeResult": "D",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-10 17:30:00",
"homeOrAway": "H",
"oppTeamName": "Standard",
"teamPos": 9,
"fullTimeScore": "2:2",
"halfTimeScore": "1:1",
"fullTimeResult": "D",
"firstHalfHad": "D"
},
{
"competitionName": "Belgian Cup",
"kickOff": "2023-12-07 19:30:00",
"homeOrAway": "H",
"oppTeamName": "Standard",
"teamPos": null,
"fullTimeScore": "2:0",
"halfTimeScore": "1:0",
"fullTimeResult": "W",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-01 19:45:00",
"homeOrAway": "A",
"oppTeamName": "Westerlo",
"teamPos": 15,
"fullTimeScore": "3:1",
"halfTimeScore": "1:0",
"fullTimeResult": "W",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-11-26 17:30:00",
"homeOrAway": "H",
"oppTeamName": "RWD Molenbeek",
"teamPos": 10,
"fullTimeScore": "2:1",
"halfTimeScore": "0:1",
"fullTimeResult": "W",
"firstHalfHad": "L"
}
]
}
},
"message": "success"
}

View File

@@ -0,0 +1,186 @@
{
"data": {
"recent8Results": {
"homeTeam": [
{
"competitionName": "Belgian Division 1",
"kickOff": "2024-01-21 15:00:00",
"homeOrAway": "H",
"oppTeamName": "Sint Truiden",
"teamPos": 8,
"fullTimeScore": "2:1",
"halfTimeScore": "1:1",
"fullTimeResult": "W",
"firstHalfHad": "D"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-26 19:45:00",
"homeOrAway": "A",
"oppTeamName": "Bruges",
"teamPos": 4,
"fullTimeScore": "1:1",
"halfTimeScore": "1:0",
"fullTimeResult": "D",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-23 15:00:00",
"homeOrAway": "A",
"oppTeamName": "Eupen",
"teamPos": 14,
"fullTimeScore": "2:1",
"halfTimeScore": "2:0",
"fullTimeResult": "W",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-17 15:00:00",
"homeOrAway": "H",
"oppTeamName": "KV Mechelen",
"teamPos": 11,
"fullTimeScore": "1:0",
"halfTimeScore": "0:0",
"fullTimeResult": "W",
"firstHalfHad": "D"
},
{
"competitionName": "UE Cup",
"kickOff": "2023-12-14 17:45:00",
"homeOrAway": "H",
"oppTeamName": "Liverpool",
"teamPos": 1,
"fullTimeScore": "2:1",
"halfTimeScore": "2:1",
"fullTimeResult": "W",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-10 18:15:00",
"homeOrAway": "A",
"oppTeamName": "Charleroi",
"teamPos": 12,
"fullTimeScore": "3:1",
"halfTimeScore": "1:0",
"fullTimeResult": "W",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Cup",
"kickOff": "2023-12-07 19:00:00",
"homeOrAway": "A",
"oppTeamName": "Waasland Beveren",
"teamPos": null,
"fullTimeScore": "2:0",
"halfTimeScore": "0:0",
"fullTimeResult": "W",
"firstHalfHad": "D"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-03 18:15:00",
"homeOrAway": "H",
"oppTeamName": "Cercle Bruges",
"teamPos": 5,
"fullTimeScore": "2:1",
"halfTimeScore": "2:1",
"fullTimeResult": "W",
"firstHalfHad": "W"
}
],
"awayTeam": [
{
"competitionName": "Belgian Division 1",
"kickOff": "2024-01-21 17:30:00",
"homeOrAway": "A",
"oppTeamName": "OH Leuven",
"teamPos": 14,
"fullTimeScore": "1:1",
"halfTimeScore": "0:1",
"fullTimeResult": "D",
"firstHalfHad": "L"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-27 19:45:00",
"homeOrAway": "H",
"oppTeamName": "Cercle Bruges",
"teamPos": 7,
"fullTimeScore": "2:0",
"halfTimeScore": "1:0",
"fullTimeResult": "W",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-23 19:45:00",
"homeOrAway": "H",
"oppTeamName": "Genk",
"teamPos": 7,
"fullTimeScore": "2:1",
"halfTimeScore": "0:0",
"fullTimeResult": "W",
"firstHalfHad": "D"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-17 17:30:00",
"homeOrAway": "A",
"oppTeamName": "Antwerp",
"teamPos": 4,
"fullTimeScore": "1:1",
"halfTimeScore": "1:0",
"fullTimeResult": "D",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-10 17:30:00",
"homeOrAway": "H",
"oppTeamName": "Standard",
"teamPos": 9,
"fullTimeScore": "2:2",
"halfTimeScore": "1:1",
"fullTimeResult": "D",
"firstHalfHad": "D"
},
{
"competitionName": "Belgian Cup",
"kickOff": "2023-12-07 19:30:00",
"homeOrAway": "H",
"oppTeamName": "Standard",
"teamPos": null,
"fullTimeScore": "2:0",
"halfTimeScore": "1:0",
"fullTimeResult": "W",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-01 19:45:00",
"homeOrAway": "A",
"oppTeamName": "Westerlo",
"teamPos": 15,
"fullTimeScore": "3:1",
"halfTimeScore": "1:0",
"fullTimeResult": "W",
"firstHalfHad": "W"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-11-26 17:30:00",
"homeOrAway": "H",
"oppTeamName": "RWD Molenbeek",
"teamPos": 10,
"fullTimeScore": "2:1",
"halfTimeScore": "0:1",
"fullTimeResult": "W",
"firstHalfHad": "L"
}
]
}
}
}

View File

@@ -0,0 +1,43 @@
{
"data": {
"recent8Results": {
"homeTeam": [
{
"competitionName": "Belgian Division 1",
"kickOff": "2024-01-21 15:00:00",
"homeOrAway": "H",
"oppTeamName": "Sint Truiden",
"teamPos": 8,
"fullTimeScore": "2:1",
"halfTimeScore": "1:1",
"fullTimeResult": "W",
"firstHalfHad": "D"
},
{
"competitionName": "Belgian Division 1",
"kickOff": "2023-12-26 19:45:00",
"homeOrAway": "A",
"oppTeamName": "Bruges",
"teamPos": 4,
"fullTimeScore": "1:1",
"halfTimeScore": "1:0",
"fullTimeResult": "D",
"firstHalfHad": "W"
}
],
"awayTeam": [
{
"competitionName": "Belgian Division 1",
"kickOff": "2024-01-21 17:30:00",
"homeOrAway": "A",
"oppTeamName": "OH Leuven",
"teamPos": 14,
"fullTimeScore": "1:1",
"halfTimeScore": "0:1",
"fullTimeResult": "D",
"firstHalfHad": "L"
}
]
}
}
}

View File

@@ -0,0 +1,82 @@
{
"statusCode": 200,
"data": {
"Season": [
{
"id": 4446,
"name": "2023/24 ",
"competitionId": 50016588
},
{
"id": 4219,
"name": "2022/23 ",
"competitionId": 50016588
},
{
"id": 3979,
"name": "2021/22 ",
"competitionId": 50016588
},
{
"id": 3647,
"name": "2020/21 ",
"competitionId": 50016588
},
{
"id": 3221,
"name": "2019/20 ",
"competitionId": 50016588
},
{
"id": 3025,
"name": "2018/19 ",
"competitionId": 50016588
},
{
"id": 2697,
"name": "2017/18 ",
"competitionId": 50016588
},
{
"id": 2006,
"name": "2016/17 ",
"competitionId": 50016588
},
{
"id": 1781,
"name": "2015/16 ",
"competitionId": 50016588
}
],
"Options": [
{
"id": 1,
"name": "All",
"competitionId": 50016588
},
{
"id": 2,
"name": "Home",
"competitionId": 50016588
},
{
"id": 3,
"name": "Away",
"competitionId": 50016588
}
],
"betType": [
{
"id": 1,
"name": "HalfTime",
"competitionId": 50016588
},
{
"id": 2,
"name": "FullTime",
"competitionId": 50016588
}
]
},
"message": "success"
}

View File

@@ -0,0 +1,730 @@
{
"leagueTable": {
"homeTeam": {
"all": {
"teamPlayed": "31",
"teamWin": "7",
"teamDraw": "9",
"teamLoss": "15",
"teamGF": "23",
"teamGA": "43",
"points": "30",
"winpercentage": 23
},
"home": {
"teamPlayed": "15",
"teamWin": "3",
"teamDraw": "7",
"teamLoss": "5",
"teamGF": "10",
"teamGA": "15",
"points": "16",
"winpercentage": 20
},
"away": {
"teamPlayed": "16",
"teamWin": "4",
"teamDraw": "2",
"teamLoss": "10",
"teamGF": "13",
"teamGA": "28",
"points": "14",
"winpercentage": 25
}
},
"awayTeam": {
"all": {
"teamPlayed": "31",
"teamWin": "12",
"teamDraw": "12",
"teamLoss": "7",
"teamGF": "40",
"teamGA": "27",
"points": "48",
"winpercentage": 39
},
"home": {
"teamPlayed": "16",
"teamWin": "9",
"teamDraw": "6",
"teamLoss": "1",
"teamGF": "27",
"teamGA": "11",
"points": "33",
"winpercentage": 56
},
"away": {
"teamPlayed": "15",
"teamWin": "3",
"teamDraw": "6",
"teamLoss": "6",
"teamGF": "13",
"teamGA": "16",
"points": "15",
"winpercentage": 20
}
}
},
"handicapTable": {
"homeTeam": {
"all": {
"teamWin": "4",
"teamHalfWin": "4",
"teamDraw": "2",
"teamHalfLoss": "1",
"teamLoss": "8",
"winPct": 21,
"halfWinPct": 21,
"drawPct": 11,
"halfLossPct": 5.263157894736842,
"lossPct": 42
},
"home": {
"teamWin": "2",
"teamHalfWin": "3",
"teamDraw": "2",
"teamHalfLoss": "0",
"teamLoss": "3",
"winPct": 20,
"halfWinPct": 30,
"drawPct": 20,
"halfLossPct": 0,
"lossPct": 30
},
"away": {
"teamWin": "2",
"teamHalfWin": "1",
"teamDraw": "0",
"teamHalfLoss": "1",
"teamLoss": "5",
"winPct": 22,
"halfWinPct": 11,
"drawPct": 0,
"halfLossPct": 11.11111111111111,
"lossPct": 56
}
},
"awayTeam": {
"all": {
"teamWin": "6",
"teamHalfWin": "2",
"teamDraw": "1",
"teamHalfLoss": "1",
"teamLoss": "8",
"winPct": 33,
"halfWinPct": 11,
"drawPct": 6,
"halfLossPct": 5.555555555555555,
"lossPct": 44
},
"home": {
"teamWin": "4",
"teamHalfWin": "0",
"teamDraw": "0",
"teamHalfLoss": "1",
"teamLoss": "4",
"winPct": 44,
"halfWinPct": 0,
"drawPct": 0,
"halfLossPct": 11.11111111111111,
"lossPct": 44
},
"away": {
"teamWin": "2",
"teamHalfWin": "2",
"teamDraw": "1",
"teamHalfLoss": "0",
"teamLoss": "4",
"winPct": 22,
"halfWinPct": 22,
"drawPct": 11,
"halfLossPct": 0,
"lossPct": 44
}
}
},
"handicapHadTable": {
"homeTeam": {
"all": {
"teamWin": "12",
"teamDraw": "4",
"teamLoss": "13",
"winPct": 41,
"drawPct": 14,
"lossPct": 45
},
"home": {
"teamWin": "7",
"teamDraw": "1",
"teamLoss": "6",
"winPct": 50,
"drawPct": 7,
"lossPct": 43
},
"away": {
"teamWin": "5",
"teamDraw": "3",
"teamLoss": "7",
"winPct": 33,
"drawPct": 20,
"lossPct": 47
}
},
"awayTeam": {
"all": {
"teamWin": "11",
"teamDraw": "8",
"teamLoss": "10",
"winPct": 38,
"drawPct": 28,
"lossPct": 34
},
"home": {
"teamWin": "4",
"teamDraw": "5",
"teamLoss": "6",
"winPct": 27,
"drawPct": 33,
"lossPct": 40
},
"away": {
"teamWin": "7",
"teamDraw": "3",
"teamLoss": "4",
"winPct": 50,
"drawPct": 21,
"lossPct": 29
}
}
},
"oddEvenTable": {
"homeTeam": {
"all": { "teamOdd": "10", "teamEven": "21", "oddPct": 32, "evenPct": 68 },
"home": { "teamOdd": "3", "teamEven": "12", "oddPct": 20, "evenPct": 80 },
"away": { "teamOdd": "7", "teamEven": "9", "oddPct": 44, "evenPct": 56 }
},
"awayTeam": {
"all": { "teamOdd": "15", "teamEven": "16", "oddPct": 48, "evenPct": 52 },
"home": { "teamOdd": "8", "teamEven": "8", "oddPct": 50, "evenPct": 50 },
"away": { "teamOdd": "7", "teamEven": "8", "oddPct": 47, "evenPct": 53 }
}
},
"goalsTable": {
"homeTeam": {
"all": {
"goalsZero": "3",
"goalsOne": "6",
"goalsTwo": "13",
"goalsThree": "4",
"goalsFour": "4",
"goalsFive": "0",
"goalsSix": "1",
"goalsSevenplus": "0",
"average": "2.1"
},
"home": {
"goalsZero": "3",
"goalsOne": "2",
"goalsTwo": "8",
"goalsThree": "1",
"goalsFour": "1",
"goalsFive": "0",
"goalsSix": "0",
"goalsSevenplus": "0",
"average": "1.7"
},
"away": {
"goalsZero": "0",
"goalsOne": "4",
"goalsTwo": "5",
"goalsThree": "3",
"goalsFour": "3",
"goalsFive": "0",
"goalsSix": "1",
"goalsSevenplus": "0",
"average": "2.6"
}
},
"awayTeam": {
"all": {
"goalsZero": "4",
"goalsOne": "7",
"goalsTwo": "9",
"goalsThree": "5",
"goalsFour": "3",
"goalsFive": "3",
"goalsSix": "0",
"goalsSevenplus": "0",
"average": "2.2"
},
"home": {
"goalsZero": "1",
"goalsOne": "3",
"goalsTwo": "7",
"goalsThree": "2",
"goalsFour": "0",
"goalsFive": "3",
"goalsSix": "0",
"goalsSevenplus": "0",
"average": "2.4"
},
"away": {
"goalsZero": "3",
"goalsOne": "4",
"goalsTwo": "2",
"goalsThree": "3",
"goalsFour": "3",
"goalsFive": "0",
"goalsSix": "0",
"goalsSevenplus": "0",
"average": "1.9"
}
}
},
"correctScoreTable": {
"homeTeam": {
"all": {
"score1_0": "3",
"score2_0": "2",
"score2_1": "1",
"score0_0": "3",
"score1_1": "4",
"score2_2": "2",
"score0_1": "3",
"score0_2": "7",
"score1_2": "1"
},
"home": {
"score1_0": "2",
"score2_0": "0",
"score2_1": "0",
"score0_0": "3",
"score1_1": "4",
"score2_2": "0",
"score0_1": "0",
"score0_2": "4",
"score1_2": "1"
},
"away": {
"score1_0": "1",
"score2_0": "2",
"score2_1": "1",
"score0_0": "0",
"score1_1": "0",
"score2_2": "2",
"score0_1": "3",
"score0_2": "3",
"score1_2": "0"
}
},
"awayTeam": {
"all": {
"score1_0": "2",
"score2_0": "2",
"score2_1": "2",
"score0_0": "4",
"score1_1": "7",
"score2_2": "1",
"score0_1": "5",
"score0_2": "0",
"score1_2": "1"
},
"home": {
"score1_0": "2",
"score2_0": "2",
"score2_1": "1",
"score0_0": "1",
"score1_1": "5",
"score2_2": "0",
"score0_1": "1",
"score0_2": "0",
"score1_2": "0"
},
"away": {
"score1_0": "0",
"score2_0": "0",
"score2_1": "1",
"score0_0": "3",
"score1_1": "2",
"score2_2": "1",
"score0_1": "4",
"score0_2": "0",
"score1_2": "1"
}
}
},
"firstHalfCorrectScoreTable": {
"homeTeam": {
"all": {
"score1_0": "6",
"score2_0": "1",
"score2_1": "1",
"score0_0": "13",
"score1_1": "1",
"score2_2": "0",
"score0_1": "6",
"score0_2": "2",
"score1_2": "0"
},
"home": {
"score1_0": "4",
"score2_0": "0",
"score2_1": "0",
"score0_0": "8",
"score1_1": "0",
"score2_2": "0",
"score0_1": "2",
"score0_2": "1",
"score1_2": "0"
},
"away": {
"score1_0": "2",
"score2_0": "1",
"score2_1": "1",
"score0_0": "5",
"score1_1": "1",
"score2_2": "0",
"score0_1": "4",
"score0_2": "1",
"score1_2": "0"
}
},
"awayTeam": {
"all": {
"score1_0": "2",
"score2_0": "0",
"score2_1": "1",
"score0_0": "12",
"score1_1": "1",
"score2_2": "0",
"score0_1": "12",
"score0_2": "0",
"score1_2": "1"
},
"home": {
"score1_0": "2",
"score2_0": "0",
"score2_1": "0",
"score0_0": "5",
"score1_1": "1",
"score2_2": "0",
"score0_1": "6",
"score0_2": "0",
"score1_2": "1"
},
"away": {
"score1_0": "0",
"score2_0": "0",
"score2_1": "1",
"score0_0": "7",
"score1_1": "0",
"score2_2": "0",
"score0_1": "6",
"score0_2": "0",
"score1_2": "0"
}
}
},
"htFtTable": {
"homeTeam": {
"all": {
"teamWinWin": "5",
"teamDrawWin": "2",
"teamLossWin": "0",
"teamWinDraw": "2",
"teamDrawDraw": "7",
"teamLossDraw": "0",
"teamWinLoss": "1",
"teamDrawLoss": "5",
"teamLossLoss": "9"
},
"home": {
"teamWinWin": "3",
"teamDrawWin": "0",
"teamLossWin": "0",
"teamWinDraw": "1",
"teamDrawDraw": "6",
"teamLossDraw": "0",
"teamWinLoss": "0",
"teamDrawLoss": "2",
"teamLossLoss": "3"
},
"away": {
"teamWinWin": "2",
"teamDrawWin": "2",
"teamLossWin": "0",
"teamWinDraw": "1",
"teamDrawDraw": "1",
"teamLossDraw": "0",
"teamWinLoss": "1",
"teamDrawLoss": "3",
"teamLossLoss": "6"
}
},
"awayTeam": {
"all": {
"teamWinWin": "4",
"teamDrawWin": "5",
"teamLossWin": "3",
"teamWinDraw": "1",
"teamDrawDraw": "6",
"teamLossDraw": "5",
"teamWinLoss": "0",
"teamDrawLoss": "2",
"teamLossLoss": "5"
},
"home": {
"teamWinWin": "3",
"teamDrawWin": "3",
"teamLossWin": "3",
"teamWinDraw": "0",
"teamDrawDraw": "2",
"teamLossDraw": "4",
"teamWinLoss": "0",
"teamDrawLoss": "1",
"teamLossLoss": "0"
},
"away": {
"teamWinWin": "1",
"teamDrawWin": "2",
"teamLossWin": "0",
"teamWinDraw": "1",
"teamDrawDraw": "4",
"teamLossDraw": "1",
"teamWinLoss": "0",
"teamDrawLoss": "1",
"teamLossLoss": "5"
}
}
},
"cornerHiLoTable": {
"homeTeam": {
"all": [
{ "line": 8.5, "high": 7, "low": 11, "highPct": 39, "lowPct": 61 },
{ "line": 9.5, "high": 5, "low": 13, "highPct": 28, "lowPct": 72 },
{ "line": 10.5, "high": 2, "low": 16, "highPct": 11, "lowPct": 89 },
{ "line": 11.5, "high": 2, "low": 16, "highPct": 11, "lowPct": 89 },
{ "line": 12.5, "high": 1, "low": 17, "highPct": 6, "lowPct": 94 }
],
"home": [
{ "line": 8.5, "high": 5, "low": 4, "highPct": 56, "lowPct": 44 },
{ "line": 9.5, "high": 4, "low": 5, "highPct": 44, "lowPct": 56 },
{ "line": 10.5, "high": 2, "low": 7, "highPct": 22, "lowPct": 78 },
{ "line": 11.5, "high": 2, "low": 7, "highPct": 22, "lowPct": 78 },
{ "line": 12.5, "high": 1, "low": 8, "highPct": 11, "lowPct": 89 }
],
"away": [
{ "line": 8.5, "high": 2, "low": 7, "highPct": 22, "lowPct": 78 },
{ "line": 9.5, "high": 1, "low": 8, "highPct": 11, "lowPct": 89 },
{ "line": 10.5, "high": 0, "low": 9, "highPct": 0, "lowPct": 100 },
{ "line": 11.5, "high": 0, "low": 9, "highPct": 0, "lowPct": 100 },
{ "line": 12.5, "high": 0, "low": 9, "highPct": 0, "lowPct": 100 }
]
},
"awayTeam": {
"all": [
{ "line": 8.5, "high": 10, "low": 8, "highPct": 56, "lowPct": 44 },
{ "line": 9.5, "high": 9, "low": 9, "highPct": 50, "lowPct": 50 },
{ "line": 10.5, "high": 9, "low": 9, "highPct": 50, "lowPct": 50 },
{ "line": 11.5, "high": 8, "low": 10, "highPct": 44, "lowPct": 56 },
{ "line": 12.5, "high": 5, "low": 13, "highPct": 28, "lowPct": 72 }
],
"home": [
{ "line": 8.5, "high": 5, "low": 4, "highPct": 56, "lowPct": 44 },
{ "line": 9.5, "high": 5, "low": 4, "highPct": 56, "lowPct": 44 },
{ "line": 10.5, "high": 5, "low": 4, "highPct": 56, "lowPct": 44 },
{ "line": 11.5, "high": 5, "low": 4, "highPct": 56, "lowPct": 44 },
{ "line": 12.5, "high": 3, "low": 6, "highPct": 33, "lowPct": 67 }
],
"away": [
{ "line": 8.5, "high": 5, "low": 4, "highPct": 56, "lowPct": 44 },
{ "line": 9.5, "high": 4, "low": 5, "highPct": 44, "lowPct": 56 },
{ "line": 10.5, "high": 4, "low": 5, "highPct": 44, "lowPct": 56 },
{ "line": 11.5, "high": 3, "low": 6, "highPct": 33, "lowPct": 67 },
{ "line": 12.5, "high": 2, "low": 7, "highPct": 22, "lowPct": 78 }
]
}
},
"firstTeamToScoreTable": {
"teamToScore": {
"homeTeam": {
"all": {
"matches": "31",
"scoreFirst": "10",
"oppositeScoreFirst": "18"
},
"home": {
"matches": "15",
"scoreFirst": "5",
"oppositeScoreFirst": "7"
},
"away": {
"matches": "16",
"scoreFirst": "5",
"oppositeScoreFirst": "11"
}
},
"awayTeam": {
"all": {
"matches": "31",
"scoreFirst": "11",
"oppositeScoreFirst": "16"
},
"home": {
"matches": "16",
"scoreFirst": "7",
"oppositeScoreFirst": "8"
},
"away": {
"matches": "15",
"scoreFirst": "4",
"oppositeScoreFirst": "8"
}
}
},
"scoreFirst": {
"homeTeam": {
"won": { "scoreFirst": "6", "oppositeScoreFirst": "1" },
"draw": { "scoreFirst": "3", "oppositeScoreFirst": "3" },
"lost": { "scoreFirst": "1", "oppositeScoreFirst": "14" }
},
"awayTeam": {
"won": { "scoreFirst": "8", "oppositeScoreFirst": "4" },
"draw": { "scoreFirst": "3", "oppositeScoreFirst": "5" },
"lost": { "scoreFirst": "0", "oppositeScoreFirst": "7" }
}
}
},
"hiLoTable": {
"homeTeam": {
"all": {
"halfTime": [
{ "line": 0.5, "high": 18, "low": 13, "highPct": 58, "lowPct": 42 },
{ "line": 1.5, "high": 6, "low": 25, "highPct": 19, "lowPct": 81 },
{ "line": 2.5, "high": 2, "low": 29, "highPct": 6, "lowPct": 94 }
],
"fullTime": [
{ "line": 1.5, "high": 22, "low": 9, "highPct": 71, "lowPct": 29 },
{ "line": 2.5, "high": 9, "low": 22, "highPct": 29, "lowPct": 71 },
{ "line": 3.5, "high": 5, "low": 26, "highPct": 16, "lowPct": 84 }
]
},
"home": {
"halfTime": [
{ "line": 0.5, "high": 7, "low": 8, "highPct": 47, "lowPct": 53 },
{ "line": 1.5, "high": 1, "low": 14, "highPct": 7, "lowPct": 93 },
{ "line": 2.5, "high": 0, "low": 15, "highPct": 0, "lowPct": 100 }
],
"fullTime": [
{ "line": 1.5, "high": 10, "low": 5, "highPct": 67, "lowPct": 33 },
{ "line": 2.5, "high": 2, "low": 13, "highPct": 13, "lowPct": 87 },
{ "line": 3.5, "high": 1, "low": 14, "highPct": 7, "lowPct": 93 }
]
},
"away": {
"halfTime": [
{ "line": 0.5, "high": 11, "low": 5, "highPct": 69, "lowPct": 31 },
{ "line": 1.5, "high": 5, "low": 11, "highPct": 31, "lowPct": 69 },
{ "line": 2.5, "high": 2, "low": 14, "highPct": 13, "lowPct": 88 }
],
"fullTime": [
{ "line": 1.5, "high": 12, "low": 4, "highPct": 75, "lowPct": 25 },
{ "line": 2.5, "high": 7, "low": 9, "highPct": 44, "lowPct": 56 },
{ "line": 3.5, "high": 4, "low": 12, "highPct": 25, "lowPct": 75 }
]
}
},
"awayTeam": {
"all": {
"halfTime": [
{ "line": 0.5, "high": 19, "low": 12, "highPct": 61, "lowPct": 39 },
{ "line": 1.5, "high": 5, "low": 26, "highPct": 16, "lowPct": 84 },
{ "line": 2.5, "high": 4, "low": 27, "highPct": 13, "lowPct": 87 }
],
"fullTime": [
{ "line": 1.5, "high": 20, "low": 11, "highPct": 65, "lowPct": 35 },
{ "line": 2.5, "high": 11, "low": 20, "highPct": 35, "lowPct": 65 },
{ "line": 3.5, "high": 6, "low": 25, "highPct": 19, "lowPct": 81 }
]
},
"home": {
"halfTime": [
{ "line": 0.5, "high": 11, "low": 5, "highPct": 69, "lowPct": 31 },
{ "line": 1.5, "high": 3, "low": 13, "highPct": 19, "lowPct": 81 },
{ "line": 2.5, "high": 2, "low": 14, "highPct": 13, "lowPct": 88 }
],
"fullTime": [
{ "line": 1.5, "high": 12, "low": 4, "highPct": 75, "lowPct": 25 },
{ "line": 2.5, "high": 5, "low": 11, "highPct": 31, "lowPct": 69 },
{ "line": 3.5, "high": 3, "low": 13, "highPct": 19, "lowPct": 81 }
]
},
"away": {
"halfTime": [
{ "line": 0.5, "high": 8, "low": 7, "highPct": 53, "lowPct": 47 },
{ "line": 1.5, "high": 2, "low": 13, "highPct": 13, "lowPct": 87 },
{ "line": 2.5, "high": 2, "low": 13, "highPct": 13, "lowPct": 87 }
],
"fullTime": [
{ "line": 1.5, "high": 8, "low": 7, "highPct": 53, "lowPct": 47 },
{ "line": 2.5, "high": 6, "low": 9, "highPct": 40, "lowPct": 60 },
{ "line": 3.5, "high": 3, "low": 12, "highPct": 20, "lowPct": 80 }
]
}
}
},
"fhHadTable": {
"homeTeam": {
"all": {
"teamWin": "8",
"teamDraw": "14",
"teamLoss": "9",
"winPct": 26,
"drawPct": 45,
"lossPct": 29
},
"home": {
"teamWin": "4",
"teamDraw": "8",
"teamLoss": "3",
"winPct": 27,
"drawPct": 53,
"lossPct": 20
},
"away": {
"teamWin": "4",
"teamDraw": "6",
"teamLoss": "6",
"winPct": 25,
"drawPct": 38,
"lossPct": 38
}
},
"awayTeam": {
"all": {
"teamWin": "5",
"teamDraw": "13",
"teamLoss": "13",
"winPct": 16,
"drawPct": 42,
"lossPct": 42
},
"home": {
"teamWin": "3",
"teamDraw": "6",
"teamLoss": "7",
"winPct": 19,
"drawPct": 38,
"lossPct": 44
},
"away": {
"teamWin": "2",
"teamDraw": "7",
"teamLoss": "6",
"winPct": 13,
"drawPct": 47,
"lossPct": 40
}
}
}
}

View File

@@ -0,0 +1,13 @@
{
"name": "stub",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npx live-server --host=0.0.0.0 --port=8081"
},
"keywords": [],
"author": "",
"license": "ISC"
}

View File

@@ -0,0 +1,499 @@
{
"data": [
{
"categoryId": 10227,
"categoryName": "England",
"categoryImg": "england",
"competitions": [
{
"competitionId": 50015668,
"competitionName": "Eng Premier",
"standing_table_link": "https://footylogic.com/en/tournament/league/50015668/standings"
},
{
"competitionId": 50016923,
"competitionName": "Eng Championship",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016923/standings"
},
{
"competitionId": 50016924,
"competitionName": "Eng League 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016924/standings"
},
{
"competitionId": 50016925,
"competitionName": "Eng League 2",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016925/standings"
},
{
"competitionId": 50022578,
"competitionName": "FA Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50022578/standings"
},
{
"competitionId": 50018849,
"competitionName": "Eng League Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50018849/standings"
},
{
"competitionId": 50020336,
"competitionName": "Eng League Trophy",
"standing_table_link": "https://footylogic.com/en/tournament/league/50020336/standings"
},
{
"competitionId": 50015602,
"competitionName": "Eng Shield",
"standing_table_link": "https://footylogic.com/en/tournament/league/50015602/standings"
}
]
},
{
"categoryId": 10013,
"categoryName": "Australia",
"categoryImg": "australia",
"competitions": [
{
"competitionId": 50022033,
"competitionName": "Australian Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50022033/standings"
},
{
"competitionId": 50015616,
"competitionName": "Australian FA Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50015616/standings"
}
]
},
{
"categoryId": 10200,
"categoryName": "Spain",
"categoryImg": "spain",
"competitions": [
{
"competitionId": 50016200,
"competitionName": "Spanish Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016200/standings"
},
{
"competitionId": 50019599,
"competitionName": "Spanish Division 2",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019599/standings"
},
{
"competitionId": 50022469,
"competitionName": "Spanish Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50022469/standings"
},
{
"competitionId": 50024282,
"competitionName": "Spanish Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50024282/standings"
}
]
},
{
"categoryId": 10082,
"categoryName": "Germany",
"categoryImg": "germany",
"competitions": [
{
"competitionId": 50016467,
"competitionName": "German Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016467/standings"
},
{
"competitionId": 50016660,
"competitionName": "German Division 2",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016660/standings"
},
{
"competitionId": 50019550,
"competitionName": "German Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019550/standings"
},
{
"competitionId": 50019595,
"competitionName": "German Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019595/standings"
}
]
},
{
"categoryId": 10107,
"categoryName": "Italy",
"categoryImg": "italy",
"competitions": [
{
"competitionId": 50016549,
"competitionName": "Italian Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016549/standings"
},
{
"competitionId": 50019580,
"competitionName": "Italian Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019580/standings"
},
{
"competitionId": 50024543,
"competitionName": "Italian Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50024543/standings"
}
]
},
{
"categoryId": 10228,
"categoryName": "USA",
"categoryImg": "united-states-of-america",
"competitions": [
{
"competitionId": 50011183,
"competitionName": "US Football League",
"standing_table_link": "https://footylogic.com/en/tournament/league/50011183/standings"
},
{
"competitionId": 50013586,
"competitionName": "US League Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50013586/standings"
}
]
},
{
"categoryId": 10115,
"categoryName": "Korea Republic",
"categoryImg": "south-korea",
"competitions": [
{
"competitionId": 50011096,
"competitionName": "Korean Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50011096/standings"
},
{
"competitionId": 50012908,
"competitionName": "Korean FA Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50012908/standings"
}
]
},
{
"categoryId": 10109,
"categoryName": "Japan",
"categoryImg": "japan",
"competitions": [
{
"competitionId": 50010052,
"competitionName": "Japanese Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50010052/standings"
},
{
"competitionId": 50010155,
"competitionName": "Japanese Division 2",
"standing_table_link": "https://footylogic.com/en/tournament/league/50010155/standings"
},
{
"competitionId": 50011744,
"competitionName": "Japanese League Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50011744/standings"
},
{
"competitionId": 50014594,
"competitionName": "Emperor's Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50014594/standings"
},
{
"competitionId": 50010020,
"competitionName": "Japanese Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50010020/standings"
}
]
},
{
"categoryId": 10140,
"categoryName": "Mexico",
"categoryImg": "mexico",
"competitions": [
{
"competitionId": 50024375,
"competitionName": "Mexican Premier",
"standing_table_link": "https://footylogic.com/en/tournament/league/50024375/standings"
},
{
"competitionId": 127,
"competitionName": "Mexican Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/127/standings"
},
{
"competitionId": 141,
"competitionName": "Mexican Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/141/standings"
},
{
"competitionId": 50015005,
"competitionName": "Mexican Champion Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50015005/standings"
}
]
},
{
"categoryId": 10010,
"categoryName": "Argentina",
"categoryImg": "argentina",
"competitions": [
{
"competitionId": 50024762,
"competitionName": "Argentine Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50024762/standings"
},
{
"competitionId": 50023611,
"competitionName": "Argentine Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50023611/standings"
},
{
"competitionId": 50010688,
"competitionName": "Argentine Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50010688/standings"
},
{
"competitionId": 910,
"competitionName": "APL Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/910/standings"
}
]
},
{
"categoryId": 10074,
"categoryName": "France",
"categoryImg": "france",
"competitions": [
{
"competitionId": 50016199,
"competitionName": "French Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016199/standings"
},
{
"competitionId": 50018675,
"competitionName": "French Division 2",
"standing_table_link": "https://footylogic.com/en/tournament/league/50018675/standings"
},
{
"competitionId": 50023043,
"competitionName": "French FA Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50023043/standings"
},
{
"competitionId": 28,
"competitionName": "French League Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/28/standings"
},
{
"competitionId": 50023652,
"competitionName": "French Champion Trophy",
"standing_table_link": "https://footylogic.com/en/tournament/league/50023652/standings"
}
]
},
{
"categoryId": 10179,
"categoryName": "Russia",
"categoryImg": "russia",
"competitions": [
{
"competitionId": 50016142,
"competitionName": "Russian Premier",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016142/standings"
},
{
"competitionId": 50016363,
"competitionName": "Russian Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016363/standings"
},
{
"competitionId": 50015520,
"competitionName": "Russian Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50015520/standings"
}
]
},
{
"categoryId": 10208,
"categoryName": "Sweden",
"categoryImg": "sweden",
"competitions": [
{
"competitionId": 50023185,
"competitionName": "Swedish Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50023185/standings"
},
{
"competitionId": 50019777,
"competitionName": "Swedish Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019777/standings"
}
]
},
{
"categoryId": 10174,
"categoryName": "Portugal",
"categoryImg": "portugal",
"competitions": [
{
"competitionId": 50019002,
"competitionName": "Portuguese Premier",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019002/standings"
},
{
"competitionId": 50022009,
"competitionName": "Portuguese Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50022009/standings"
},
{
"competitionId": 50016144,
"competitionName": "Portuguese League Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016144/standings"
},
{
"competitionId": 50018847,
"competitionName": "Portuguese Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50018847/standings"
}
]
},
{
"categoryId": 10163,
"categoryName": "Norway",
"categoryImg": "norway",
"competitions": [
{
"competitionId": 50012569,
"competitionName": "Norwegian Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50012569/standings"
},
{
"competitionId": 50014272,
"competitionName": "Norwegian Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50014272/standings"
},
{
"competitionId": 151,
"competitionName": "Norwegian Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/151/standings"
}
]
},
{
"categoryId": 10153,
"categoryName": "Netherlands",
"categoryImg": "netherlands",
"competitions": [
{
"competitionId": 50019000,
"competitionName": "Dutch Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019000/standings"
},
{
"competitionId": 50019001,
"competitionName": "Dutch Division 2",
"standing_table_link": "https://footylogic.com/en/tournament/league/50019001/standings"
},
{
"competitionId": 50022411,
"competitionName": "Dutch Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50022411/standings"
},
{
"competitionId": 50018763,
"competitionName": "Dutch Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50018763/standings"
}
]
},
{
"categoryId": 10030,
"categoryName": "Brazil",
"categoryImg": "brazil",
"competitions": [
{
"competitionId": 50013324,
"competitionName": "Brazilian Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50013324/standings"
},
{
"competitionId": 50024101,
"competitionName": "Brazilian Paulista League",
"standing_table_link": "https://footylogic.com/en/tournament/league/50024101/standings"
},
{
"competitionId": 50012097,
"competitionName": "Brazilian Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50012097/standings"
}
]
},
{
"categoryId": 10043,
"categoryName": "Chile",
"categoryImg": "chile",
"competitions": [
{
"competitionId": 50009057,
"competitionName": "Chilean Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50009057/standings"
},
{
"competitionId": 50014689,
"competitionName": "Chilean Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50014689/standings"
},
{
"competitionId": 50009056,
"competitionName": "Chilean Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50009056/standings"
}
]
},
{
"categoryId": 10021,
"categoryName": "Belgium",
"categoryImg": "belgium",
"competitions": [
{
"competitionId": 50016588,
"competitionName": "Belgian Division 1",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016588/standings"
},
{
"competitionId": 50022259,
"competitionName": "Belgian Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50022259/standings"
},
{
"competitionId": 50016140,
"competitionName": "Belgian Super Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50016140/standings"
}
]
},
{
"categoryId": 10246,
"categoryName": "Scotland",
"categoryImg": "scotland",
"competitions": [
{
"competitionId": 50018485,
"competitionName": "Scottish Premier",
"standing_table_link": "https://footylogic.com/en/tournament/league/50018485/standings"
},
{
"competitionId": 50024631,
"competitionName": "Scottish FA Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50024631/standings"
},
{
"competitionId": 50015522,
"competitionName": "Scottish League Cup",
"standing_table_link": "https://footylogic.com/en/tournament/league/50015522/standings"
}
]
}
]
}

View File

@@ -0,0 +1,236 @@
{
"statusCode": 200,
"data": {
"info": [
{
"teamRank": "1",
"teamPlayed": "21",
"teamWin": "16",
"teamDraw": "3",
"teamLoss": "2",
"teamGoalsFor": "46",
"teamGoalsAway": "21",
"teamGoalsDiff": "25",
"teamPoints": "51",
"teamForm": "W,D,W,W,W",
"teamName": "Union Saint Gilloise",
"teamId": "50003201"
},
{
"teamRank": "2",
"teamPlayed": "21",
"teamWin": "12",
"teamDraw": "7",
"teamLoss": "2",
"teamGoalsFor": "40",
"teamGoalsAway": "22",
"teamGoalsDiff": "18",
"teamPoints": "43",
"teamForm": "D,W,W,D,D",
"teamName": "Anderlecht",
"teamId": "50000175"
},
{
"teamRank": "3",
"teamPlayed": "21",
"teamWin": "10",
"teamDraw": "8",
"teamLoss": "3",
"teamGoalsFor": "37",
"teamGoalsAway": "22",
"teamGoalsDiff": "15",
"teamPoints": "38",
"teamForm": "L,W,W,L,W",
"teamName": "AA Gent",
"teamId": "50000004"
},
{
"teamRank": "4",
"teamPlayed": "21",
"teamWin": "10",
"teamDraw": "7",
"teamLoss": "4",
"teamGoalsFor": "41",
"teamGoalsAway": "17",
"teamGoalsDiff": "24",
"teamPoints": "37",
"teamForm": "W,D,W,W,D",
"teamName": "Bruges",
"teamId": "50000586"
},
{
"teamRank": "5",
"teamPlayed": "21",
"teamWin": "9",
"teamDraw": "8",
"teamLoss": "4",
"teamGoalsFor": "42",
"teamGoalsAway": "21",
"teamGoalsDiff": "21",
"teamPoints": "35",
"teamForm": "D,W,L,W,W",
"teamName": "Genk",
"teamId": "50001352"
},
{
"teamRank": "6",
"teamPlayed": "21",
"teamWin": "9",
"teamDraw": "8",
"teamLoss": "4",
"teamGoalsFor": "41",
"teamGoalsAway": "21",
"teamGoalsDiff": "20",
"teamPoints": "35",
"teamForm": "W,L,D,D,W",
"teamName": "Antwerp",
"teamId": "50000187"
},
{
"teamRank": "7",
"teamPlayed": "21",
"teamWin": "10",
"teamDraw": "2",
"teamLoss": "9",
"teamGoalsFor": "26",
"teamGoalsAway": "23",
"teamGoalsDiff": "3",
"teamPoints": "32",
"teamForm": "D,L,W,W,L",
"teamName": "Cercle Bruges",
"teamId": "50000700"
},
{
"teamRank": "8",
"teamPlayed": "21",
"teamWin": "6",
"teamDraw": "9",
"teamLoss": "6",
"teamGoalsFor": "24",
"teamGoalsAway": "31",
"teamGoalsDiff": "-7",
"teamPoints": "27",
"teamForm": "L,D,W,L,D",
"teamName": "Sint Truiden",
"teamId": "50002840"
},
{
"teamRank": "9",
"teamPlayed": "21",
"teamWin": "7",
"teamDraw": "4",
"teamLoss": "10",
"teamGoalsFor": "22",
"teamGoalsAway": "26",
"teamGoalsDiff": "-4",
"teamPoints": "25",
"teamForm": "W,L,W,L,D",
"teamName": "KV Mechelen",
"teamId": "50001763"
},
{
"teamRank": "10",
"teamPlayed": "21",
"teamWin": "5",
"teamDraw": "8",
"teamLoss": "8",
"teamGoalsFor": "19",
"teamGoalsAway": "30",
"teamGoalsDiff": "-11",
"teamPoints": "23",
"teamForm": "L,D,L,D,D",
"teamName": "Standard",
"teamId": "50002975"
},
{
"teamRank": "11",
"teamPlayed": "21",
"teamWin": "5",
"teamDraw": "6",
"teamLoss": "10",
"teamGoalsFor": "30",
"teamGoalsAway": "38",
"teamGoalsDiff": "-8",
"teamPoints": "21",
"teamForm": "L,W,D,W,W",
"teamName": "Westerlo",
"teamId": "50003363"
},
{
"teamRank": "12",
"teamPlayed": "21",
"teamWin": "5",
"teamDraw": "6",
"teamLoss": "10",
"teamGoalsFor": "22",
"teamGoalsAway": "34",
"teamGoalsDiff": "-12",
"teamPoints": "21",
"teamForm": "L,W,L,D,L",
"teamName": "Charleroi",
"teamId": "50000711"
},
{
"teamRank": "13",
"teamPlayed": "21",
"teamWin": "5",
"teamDraw": "6",
"teamLoss": "10",
"teamGoalsFor": "22",
"teamGoalsAway": "41",
"teamGoalsDiff": "-19",
"teamPoints": "21",
"teamForm": "L,L,L,W,L",
"teamName": "RWD Molenbeek",
"teamId": "50002563"
},
{
"teamRank": "14",
"teamPlayed": "21",
"teamWin": "5",
"teamDraw": "3",
"teamLoss": "13",
"teamGoalsFor": "22",
"teamGoalsAway": "43",
"teamGoalsDiff": "-21",
"teamPoints": "18",
"teamForm": "W,L,L,L,L",
"teamName": "Eupen",
"teamId": "50001135"
},
{
"teamRank": "15",
"teamPlayed": "21",
"teamWin": "4",
"teamDraw": "5",
"teamLoss": "12",
"teamGoalsFor": "26",
"teamGoalsAway": "39",
"teamGoalsDiff": "-13",
"teamPoints": "17",
"teamForm": "D,W,L,L,D",
"teamName": "OH Leuven",
"teamId": "50002313"
},
{
"teamRank": "16",
"teamPlayed": "21",
"teamWin": "3",
"teamDraw": "4",
"teamLoss": "14",
"teamGoalsFor": "13",
"teamGoalsAway": "44",
"teamGoalsDiff": "-31",
"teamPoints": "13",
"teamForm": "W,L,L,L,L",
"teamName": "KV Kortrijk",
"teamId": "50001762"
}
],
"corrections": [],
"lastUpdated": "2024-01-23 08:32",
"splitIndex": 0,
"competitionName": "Belgian Division 1"
},
"message": "success"
}

View File

@@ -0,0 +1,61 @@
scrape_list = [".cday", ".alloddsLink", ".closeDay", ".cflag", ".h2hLink"];
document.querySelectorAll(".cflag img").item(0);
var output = [];
var l_cflag = [];
document.querySelectorAll(".cflag img").forEach((el, idx) => {
if (idx != 0) {
l_cflag.push(el.getAttribute("title"));
}
});
var link_with_date = [];
//var test = document.querySelector('#SelectDateTimeId').textContent
var test = "21/1(SUN)22/1(MON)23/1(TUE)24/1(WED)25/1(THU)";
var regex = /\d+\/\d+\(\w+\)/g;
var result = test.match(regex);
var date_string = result.map((r) => {
var temp = r.split("(")[0];
[day, month] = temp.split("/");
formatted_month = month < 10 ? "0" + month : month;
formatted_day = day < 10 ? "0" + day : day;
return `${2024}-${formatted_month}-${formatted_day}`;
});
link_with_date = date_string.map(
(d) => `https://bet.hkjc.com/football/odds/odds_hil.aspx?lang=en&mdate=${d}`
);
console.log(link_with_date);
// const str = "Hello, World!";
// const regex = /Hello/;
// const result = str.match(regex);
// console.log(result); // Output: ["Hello"]
var output = [];
document.querySelectorAll(".couponRow").forEach((el, idx) => {
if (idx == 1) {
console.log(el.querySelectorAll(".h2hLink"));
}
});
var output = [];
document.querySelectorAll(".couponRow").forEach((el, idx) => {
if (idx == 1) {
if (el.querySelectorAll(".cflag img").length > 0) {
var cflag = el
.querySelectorAll(".cflag img")
.item(0)
.getAttribute("title");
var alloddsLink = el.querySelectorAll(".alloddsLink").item(0).textContent;
querySelectorAll(".h2hLink").item(0).click();
console.log(cflag);
}
}
});
console.log(output.length);
scrape_list.forEach((cls_string) => {
// document.querySelectorAll(cls_string).forEach(el => )
});