File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 1111import numpy as np
1212import pandas as pd
1313from lxml import html
14- from selenium .common .exceptions import ElementClickInterceptedException , NoSuchElementException
14+ from selenium .common .exceptions import (
15+ ElementClickInterceptedException ,
16+ NoSuchElementException ,
17+ )
1518from selenium .webdriver .common .by import By
1619
1720from ._common import BaseSeleniumReader , make_game_id , standardize_colnames
@@ -88,13 +91,13 @@ def _parse_url(url: str) -> dict:
8891 """
8992 patt = (
9093 r"^(?:https:\/\/www.whoscored.com)?\/"
91- + r"(?:Regions \/(\d+)\/)?"
92- + r"(?:Tournaments \/(\d+)\/)?"
93- + r"(?:Seasons \/(\d+)\/)?"
94- + r"(?:Stages \/(\d+)\/)?"
95- + r"(?:Matches \/(\d+)\/)?"
94+ + r"(?:regions \/(\d+)\/)?"
95+ + r"(?:tournaments \/(\d+)\/)?"
96+ + r"(?:seasons \/(\d+)\/)?"
97+ + r"(?:stages \/(\d+)\/)?"
98+ + r"(?:matches \/(\d+)\/)?"
9699 )
97- matches = re .search (patt , url )
100+ matches = re .search (patt , url , re . IGNORECASE )
98101 if matches :
99102 return {
100103 "region_id" : matches .group (1 ),
You can’t perform that action at this time.
0 commit comments