Question: I have this URL: <https://www.basketball-reference.com/teams/TOR/2020/lineups> , and I want to scrape the 5-man lineup.
I've tried this:

```
url = requests.get("https://www.basketball-reference.com/teams/TOR/2020/lineups")
soup=BeautifulSoup(url.content,'html.parser')
lineup=soup.find_all('div',{'class':'table_outer_container.mobile_table'})
print(lineup)
[]

```

[html code for the URL](https://i.stack.imgur.com/oj4XS.jpg)

Answer: 
It is a comment - see if you do:

`import requests
from bs4 import BeautifulSoup, Comment`
`url = requests.get("https://www.basketball-reference.com/teams/TOR/2020/lineups")
soup = BeautifulSoup(url.content, 'html.parser')
print(soup.find_all('div', {'class': ''}))`

you'll get line starting with `<!-- <div class="table_outer_container"> <div class="overthrow table_container" id="div_lineups_5-man_">` and so on. As it starts with a `<!--` it is a comment.

Extracting comments can happen like:
`import requests
from bs4 import BeautifulSoup, Comment`
`url = requests.get("https://www.basketball-reference.com/teams/TOR/2020/lineups")
soup = BeautifulSoup(url.content, 'html.parser')
comments = soup.find_all(string=lambda text: isinstance(text, Comment))
for c in comments:
 print(c.extract())`
you can get the table using pandas read\_html() method: You can try the below code for your required table it stores df in the "data" variable:-

```
from selenium import webdriver
import pandas as pd

driver = driver = webdriver.Chrome(executable_path='Your/path/to/chromedriver.exe') 
driver.get("https://www.basketball-reference.com/teams/TOR/2020/lineups")

html = driver.page_source

tables = pd.read_html(html)
data = tables[-7]

driver.quit() 

```