带有bs4值的Python Steam Web抓取返回为None

时间:2020-06-24 07:22:35

标签: python web-scraping beautifulsoup python-requests

我登录了我的Steam帐户并尝试获取我的Steam钱包的金额,但该值始终无济于事。

import webbrowser, requests, time, datetime
from bs4 import BeautifulSoup
import matplotlib.pyplot as plt

def get_bal():
    bal = requests.get('https://steamcommunity.com/market/search?appid=730&q=dragon')
    soup2 = BeautifulSoup(bal.content, "html.parser")
    money = soup2.find(id="marketWalletBalanceAmount")
    #money = 4.8
    print(money)
    return money
get_bal()

0 个答案:

没有答案