bs4

    0熱度

    4回答

    <input type="hidden" name="vendor_service[customized_car_types[]][is_checked]"> <input type="checkbox" name="vendor_service[customized_car_types[]][is_checked]">== $0 <b>Sedan</b> 我想單擊複選框,當我將鼠標懸停在

    0熱度

    3回答

    table = soup.findAll('div', attrs={"class":"five columns"}) for data in table: para = data.findAll('p') print para 這就是我還剩下的。 <p><span class="four">Location: </span> <span id="wt-loc" titl

    0熱度

    2回答

    我解析與BS4和Python 3.5的網頁。 試圖只提取從一個div,看起來像這樣的用戶名(鏈接文本): <div class="about"><a href="es_viewprofile.aspx?profile_id=110181766">claudiakenzo</a> 33    Pasar el rato  &nbs

    0熱度

    1回答

    我對Python使用Visual Studio。我想安裝Beatifulsoup網絡報廢。安裝爲解釋器的Python 3.4。 我安裝了BS,但不起作用。請幫助我,以便在Visual Studio中使用Beatifulsoup。 我在代碼下面執行,得到「no module named bs4」錯誤。謝謝 from urllib.request import urlopen from bs4 im

    0熱度

    3回答

    .select()元素允許我從基於css選擇器的網頁獲取元素,但是這將搜索整個網頁。我將如何使用.select(),但只搜索特定元素的子元素。例如: <!-- Simplified example of the structure --> <ul> <li> <div class="foo">foo content</div> <div class="bar">

    0熱度

    1回答

    這是我的第一篇文章,所以我很抱歉,如果它是重複的,但我找不到與我有關的答案。如果有,請讓我知道,我會檢查出來。 我試圖抓住一個網站(下面)找到伯克利租金天花板,我遇到的麻煩是我似乎無法弄清楚如何插入地址到搜索框中,並從下一頁颳去信息。過去,我使用的網址隨搜索輸入而改變,但不在本網站上。我認爲我最好的選擇是使用bs4來抓取信息,然後使用request.session和requests.post來獲得

    0熱度

    1回答

    我正在尋找使用Python(> 10k)從大量網頁解析數據,並且我發現我寫入的函數經常遇到超時每500個循環出錯。我試圖用try - 除了代碼塊來解決這個問題,但是我想改進這個函數,所以它會在返回錯誤之前重新嘗試打開url四次或五次。有沒有一個優雅的方式來做到這一點? 我下面的代碼: def url_open(url): from urllib.request import Reques

    0熱度

    1回答

    我進口BS4爲: from bs4 import BeautifulSoup 但它拋出一個錯誤是這樣的: Traceback (most recent call last): File "/Users/koudai232/Desktop/test.py", line 4, in <module> from bs4 import BeautifulSoup File

    0熱度

    3回答

    THX! 1.它看起來像它某事的錯誤,但我沒能找到它 2.原來是這樣,但現在如下代碼。塊: from urllib.request import Request, urlopen from urllib.error import URLError,HTTPError from bs4 import BeautifulSoup import re print('https://v.qq.c

    1熱度

    1回答

    我抓到了這個頁面https://www.capfriendly.com/teams/bruins,特別是在Cap Cap(Fowards,Defense,GoalTenders)標籤下尋找表格。 我用Python和BeautifulSoup4和CSV作爲輸出格式。 import requests, bs4 r = requests.get('https://www.capfriendly.co