Skip to content

Commit

Permalink
redeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
brownjf2027 committed Jul 6, 2024
1 parent 0c009fd commit fafcf85
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from bs4 import BeautifulSoup
import requests
import json

response = requests.get("https://fantasyfootball.theringer.com/")
contents = response.text

soup = BeautifulSoup(contents, "html.parser")

# print(soup.prettify())

data = json.loads(soup.find(name="script", id="__NEXT_DATA__").text)

players = data['props']['pageProps']['playerData']
qbs = data['props']['pageProps']['tiers']['qb']['halfpoint'][0]

qb_list = []
print(type(players))
for qb in qbs:
for player in players:
print(player)
print(qb)
if player == qb:
new_player = {
"first_name": players[qb]['first_name'],
"last_name": players[qb]['last_name'],
"order_halfpoint": players[qb]['order_halfpoint']
}
qb_list.append(new_player)

print(qb_list)

0 comments on commit fafcf85

Please sign in to comment.