bs4

    -1熱度

    1回答

    我是新來的Python,並試圖開發一個簡單的網頁刮板。我遇到了在HTML中刪除腳本標記的問題。這裏是我的代碼: from urllib.request import Request, urlopen from bs4 import BeautifulSoup import re link = "https://yeezysupply.com/products/womens-mule-pvc

    1熱度

    1回答

    使用BeautifulSoup的HTML文檔中提取文本 我試圖從父評論文本使用BeautifulSoup從以下HTML網站songmeanings.com上: <div class="text" id="comment-73014911864"> <strong class="title"> General Comment </strong> This is a b

    0熱度

    1回答

    使用BeautifulSoup,我從所述頁面的html文檔中提取了網頁上的評論。使用此代碼我已經能夠打印出意見: import urllib2 from bs4 import BeautifulSoup url = "http://songmeanings.com/songs/view/3530822107858560012/" response = urllib2.bui

    2熱度

    1回答

    我想抓class_="href"與class_="_e4d"。基本上希望使用BeautifulSoup在課堂上刮課。 from bs4 import BeautifulSoup import selenium.webdriver as webdriver url = ("https://www.google.com/search?...") def get_related_search(

    0熱度

    1回答

    我使用以下find_all()表達式,獲取 所有NavigableStrings,按正常流程排序。 all_nav_strings = [x for x in node.find_all(text=True) if x.strip() != "" if not type(x) is bs4.Comment] 我想調整find_all()表達式以查找所有的圖像(正常流順序)爲好。 我試圖 fin

    1熱度

    1回答

    我正在嘗試一個簡單的應用程序。但是,我無法從VS.Code導入BS4。我試圖卸載,重新安裝,檢查路徑等我現在卡住了。有誰知道如何解決這個問題?請參閱屏幕截圖: Windows PowerShell Copyright (C) 2016 Microsoft Corporation. All rights reserved. PS C:\workarea\dev\test> & c:/APPS/

    0熱度

    2回答

    <div class="someClass"> <a href="href"> <img alt="some" src="some"/> </a> </div> 我使用BS4和我不能使用a.attrs['src']得到src,但我可以得到href img`標籤src`屬性。我該怎麼辦?

    0熱度

    1回答

    所以截至目前,我終於想通了如何把事情到數據幀,但我完全新的節目,想的東西不應該是在這個循環中,因此這個問題.. 所以我我試圖做的是拉動棒球數據http://rotoguru1.com/cgi-bin/byday.pl?game=dk 格式是正確的DF,但我有幾個問題。 1.)我在for循環中寫入了csv,用於抓取頁面,我認爲我必須將其取出。在寫入csv之前,我只是創建一個新變量來存儲信息? 2.)

    2熱度

    1回答

    我一直停留在這一段時間......我試圖從該站點刮玩家的名字和投影:https://www.fantasysportsco.com/Projections/Sport/MLB/Site/DraftKings/PID/793 腳本是通過由過去只是通過去要循環所有的PID在一個範圍內,但那不是問題。主要的問題是,當我檢查元素,我覺得值存儲在該類別中: <div class="salarybox exp

    -1熱度

    1回答

    我正在使用PyCharm。我已經安裝了bs4,仍然當我寫這篇文章的代碼: import requests from bs4 import BeautifulSoup 我得到一個name 'BeutifulSoup' is not defined錯誤。我見過很多「解決方案」,但沒有任何幫助。