This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests # pip install requests | |
import re # pip install re | |
from datetime import datetime | |
from colorama import Fore, Back, Style, init # pip install colorama | |
# colorama stuff | |
init(autoreset=True) | |
# for chess.com header | |
#------------------------ IMPORTANT------------------------ # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import re | |
from datetime import datetime | |
def extract_game_id(link): | |
# Use regular expression to extract the game ID from the link | |
match = re.search(r'/game/live/(\d+)', link) | |
if match: | |
return match.group(1) | |
else: |