bs4

    1熱度

    3回答

    我的第一次在SO上。感謝幫助我們這麼長時間的菜鳥。即將直奔點: 情景: 我在現有的程序正在讀取CSS選擇器從一個配置文件中的字符串,使程序的動態,並能夠通過只改變配置放棄任何現場工作CSS選擇器的值。 問題: 我試圖刮掉其渲染的項目,如下面的兩個選項一個網站: 選項1: ......... <div class="price"> <span class="price" style="c

    0熱度

    2回答

    我處理了幾網,讓我有到圖像 絕對路徑列表,用下面的代碼: for img in images: try: if img["src"].startswith("http"): abs_img_url = img["src"] else: abs_img_url = urljoin(url, img["src"]) except Ke

    1熱度

    1回答

    我使用BS4與Python3搶產品的細節上亞馬遜, 這裏搜索是我的代碼: from bs4 import BeautifulSoup as BS import requests html = requests.get('http://www.amazon.in/s/ref=nb_sb_noss_2?url=search- alias%3Daps&field-keywords=hp+moni

    -1熱度

    1回答

    慢慢地教我自己使用硒的一些自動化。製作一個小程序來自動檢出將要在線發佈的產品。一切看起來都很完美,除非程序只有在我輸入確切的產品名稱後才能使用。 首先,我有這樣的用戶輸入: Productname = raw_input("Pleae enter the name of your product:") 這是我使用,我相信是指具有關鍵字工作,並不需要確切的產品name.`中的XPath點擊腳本

    1熱度

    2回答

    import bs4 import requests headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'} url = 'http://twitter

    0熱度

    3回答

    即時通訊新的python,或任何comp語言的事情,但即時通訊嘗試刮從使用此代碼的網站標題,但它一直打印「無」,如果標題,或任何標籤,如果我取代它,doesn不存在。 import bs4 from urllib.request import urlopen as uReq from bs4 import BeautifulSoup as soup my_url = "https://w

    0熱度

    1回答

    print(bsObj.find(id="mv-content-text").findAll("p")[0]) 我使用python3.6來練習scrapy。代碼來自於這本書,Pyhon的Web Scraping。 ()。findAll()

    1熱度

    1回答

    我試圖用美麗的湯 <tr class="TTRow"> <td> <a class="tablebluelink" href="" target="_blank">517330</a></td> <td class="TTRow_left">CMI</td> <td>29 Jun 2017</td> </tr> 我想提取從下面的HTML

    0熱度

    2回答

    通常我可以編寫一個腳本,用於抓取,但我一直在抓這個網站的表格爲我正在研究這個研究項目。我打算在輸入我的目標狀態的URL之前驗證在一個國家工作的腳本。 import requests import bs4 as bs url = ("http://programs.dsireusa.org/system/program/detail/284") dsire_get = requests.ge

    0熱度

    2回答

    所以我用這個series Python的財務和它不斷給我的錯誤 - 1) line 22, in <module> save_sp500_tickers() and 2) line 8, in save_sp500_tickers soup = bs.BeautifulSoup(resp.text,'lxml')and 3) line 165, in __init__