我試圖刮包含以下HTML代碼網站:美麗的湯刮圖案?
<div class="content-sidebar-wrap"><main class="content"><article
class="post-773 post type-post status-publish format-standard has-post-
thumbnail category-money entry" itemscope
itemtype="http://schema.org/CreativeWork">
這包含數據我感興趣......我一直在使用BeautifulSoup解析它嘗試過,但以下回報:
<div class="content-sidebar-wrap"><main class="content"><article
class="entry">
<h1 class="entry-title">Not found, error 404</h1><div class="entry-content
"><p>"The page you are looking for no longer exists. Perhaps you can return
back to the site's "<a href="http://www.totalsportek.com/">homepage</a> and
see if you can find what you are looking for. Or, you can try finding it
by using the search form below.</p><form
action="http://www.totalsportek.com/" class="search-form"
itemprop="potentialAction" itemscope=""
itemtype="http://schema.org/SearchAction" method="get" role="search">
# I've made small modifications to make it readable
美麗的湯元素不包含我想要的代碼。我不太熟悉html,但我假設這會調用一些外部服務來返回數據..?我讀過這個與Schema有關的東西。
無論如何我可以訪問這些數據嗎?
您想從HTML代碼中獲得什麼? –
一個html表。試圖解析表格直接返回一個無 –
嗯我還是不明白,你試圖從中獲取信息的網站到底是什麼?如果信息是由JavaScript構建的,「requests」將不起作用。 –