D
D
Davidd20082021-06-17 18:11:30
Python
Davidd2008, 2021-06-17 18:11:30

I can't get the value when parsing the site?

here is the code

import requests 
import lxml
from bs4 import BeautifulSoup

url="https://steamcommunity.com/market/listings/730/Snakebite%20Case"

responce=requests.get(url).text
soup=BeautifulSoup(responce,"lxml")


block=soup.find('div',id='market_commodity_buyrequests')
block2=block.find('span',class_='market_commodity_orders_header_promote')
print(block2)

input()

why does it output
None?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-06-17
@David2008

Because the data is loaded dynamically. Open F12->Network, filter by XHR and see what requests are being sent and what data is being received

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question