I'm currently trying to scrape the json output of the follow 'https://sports.bovada.lv/soccer/premier-league'
it has a source with the following
<script type="text/javascript">var swc_market_lists = {"items":[{"description":"Game Lines","id":"23", ... </script>
I'm trying to get the contents of the swc_market_lists var
Now the issue I have is that when I use the following code
import requests
from lxml import html
url = 'https://sports.bovada.lv/soccer/premier-league'
r = requests.get(url)
tree = html.fromstring(r.content)
var = tree.xpath('//script')
print(var)
I get an empty var value.
I have also tried saving the r.text and viewing it but I don't see the script tags in there.
What am I missing?