Question: i want to use the optional arguments without `-` or `--`,

want to achive something like this:

```
scriptname install <other options>
scriptname uninstall <other options>

```

my code:

```
parser = argparse.ArgumentParser()
parser.add_argument("install","INSTALL",action='store_true',help="INSTALL SOMETHING",default="")
parser.add_argument("uninstall","UNINSTALL",action='store_true',help="UNINSTALL SOMETHING",default="") 

args = parser.parse_args()

if args.install:
     install logic

if args.uninstall:
     uninstall logic

```

getting the error below

```
ValueError: invalid option string 'install': must start with a character '-'

```

Answer: 
You don't have to use Selenium when you can just extract the match stats right off the HTML:

```py
import re
from ast import literal_eval

url = 'https://www.whoscored.com/Matches/1294545/LiveStatistics/Germany-Bundesliga-2018-2019-Bayern-Munich-Hoffenheim'
res = requests.get(
    url,
    headers={
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0',
    }
)
res.raise_for_status()
html = res.text

```

so far nothing special. 

```py
match_data = re.search('var matchStats = ([^;]+)', html, flags=re.MULTILINE).group(1)
match_data_clean = re.sub(',,', ",'',", match_data_clean)

stats = literal_eval(match_data_clean)

```

when we inspect `match_data` we can see a bunch of arrays with invalid syntax, like this:

```
ams',,'yellow',,,21,328

```

so we clean that off with a bit of `re` magic by inserting empty strings between commas.

Printing `stats` gives us:

```
[[[37,
   1211,
   'Bayern Munich',
   'Hoffenheim',
   '24/08/2018 19:30:00',
   '24/08/2018 00:00:00',
   6,
   'FT',
   '1 : 0',
   '3 : 1',
   '',
   '',
   '3 : 1',
   'Germany',
   'Germany'],
  [[[21, [], [['Kasim Adams', '', 'yellow', '', '', 21, 328428, 0]], 0, 1],
    [23,
     [['Thomas Müller',
       'Joshua Kimmich',
       'goal',
       '(1-0)',
       '',
       23,
       37099,
       283323]],
     [],
     1,
     0],

```

from here on, it's just finding the right indices that correspond to the data you're looking for.
Request is not the best tool to parse data in this case because this website uses JavaScript, so it is better to use Selenium and a web driver.
I gave it a try and I could parse the names of the players of both teams in 2 different lists.

```
from selenium import webdriver
from bs4 import BeautifulSoup
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
import time

# Open web page
driver = webdriver.Firefox(executable_path='YOUR PATH') #You have to put the path of your WebDriver
driver.get('https://www.whoscored.com/Matches/1294545/LiveStatistics/Germany-Bundesliga-2018-2019-Bayern-Munich-Hoffenheim')

# Accept
element=WebDriverWait(driver,20).until(ec.element_to_be_clickable((By.XPATH,"/html/body/div[1]/div/div/div[2]/button")))
driver.execute_script("arguments[0].click();", element)
time.sleep(3)

# Scrolling down the page
results = driver.find_element_by_css_selector("#statistics-table-home-summary > table:nth-child(1)")
driver.execute_script("arguments[0].scrollIntoView();", results)
time.sleep(7)

# Make soup
source = driver.page_source
soup = BeautifulSoup(source, 'lxml')

table_home = soup.find_all('table', {"id": "top-player-stats-summary-grid"})[0]
players_home = [a.text for a in table_home.find_all('a')]
print(players_home)

table_away = soup.find_all('table', {"id": "top-player-stats-summary-grid"})[1]
players_away = [a.text for a in table_away.find_all('a')]
print(players_away)

driver.quit()

```