simple-html-dom

    2熱度

    1回答

    我一直在遍尋網絡搜索DOM樹的簡單解釋和理解父,子,兄弟關係,並沒有找到我可以遵循的簡單解釋。 我希望這裏有人能夠用簡單的語言。 比方說,我們有一個樹遵循 <div class='DOM> <div class='DOM_A'> <p class='DOM_A_1'>some text</p> </div> <div class='DOM_B'

    -4熱度

    2回答

    我想創建變量$連接的陣列來獲得陣中的所有鏈接,這樣我可以花括號 include("simple_html_dom.php"); $html = file_get_html($url); $i=0; $linkObjs = $html->find('h3.r a'); foreach ($linkObjs as $linkObj) { $title = trim($link

    0熱度

    1回答

    嗨,我的工作與laravel我的HTML htmldom就像下面 <div class="content"> <h4 class="title">Now Showing</h4> <div class="movies"> <div class="movie"> <h4 class="movie-title">3D: Star Trek Beyond</h

    0熱度

    2回答

    所以我想做一個PHP抓取工具(供個人使用)。 代碼所做的是顯示「發現」每個eBay拍賣項目發現,不到1小時內結束,但似乎有問題。抓取工具無法獲取所有span元素,「剩餘時間」元素爲a。 simple_html_dom.php被下載並且未被編輯。 <?php include_once('simple_html_dom.php'); //url which i want to crawl -con

    0熱度

    1回答

    讓我們假設一個簡單的Web應用程序,如下所示,運行Simple HTML Dom Parser。 <?php include('simple_html_dom.php'); $html = file_get_html('http://someurl.com'); echo $html; ?> 正如預期的那樣,一切都來了,除了一個元素,.addedDiv類,它出

    2熱度

    1回答

    PHP:我解析了一些使用Simple Html Dom Parser的頁面,我已經完成了很多工作,但一直處於困境。 如何獲取駐留在javascript函數中的url。 (網址是隨機的)像這樣 <script> lstImages = array(); lstImages.push("abc.com/123873.php"); lstImages.push("abc.c

    1熱度

    2回答

    我想從一個巨大的乾草堆中找到頁面的標題,但沒有任何類或唯一的ID,所以我不能在這裏使用DOM解析器,我知道我必須使用正則表達式。 這裏是例子我試圖找到: <a href="http://example.com/xyz"> Series Hell In Heaven information </a> <a href="http://example.com/123"> Seri

    2熱度

    1回答

    我使用PHP簡單HTML DOM Parser從網站刮一些值。 我已經拆分了一個名爲$results(格式爲:number:number) 使用.str_replace的變量,但我需要分別使用$results中的這兩個數字。 這是我的代碼: require_once '../simple_html_dom.php'; $html = file_get_html('http://www.bete

    1熱度

    2回答

    我使用simple_html_dom獲得某網站的文本的屬性,但它給了我 Notice: Trying to get property of non-object in C:\wamp64\www\fetch.php on line 6 的網站有這個。 <div> <div class="info">number: (IUL)306/306/2016/68</div> <div class=

    0熱度

    1回答

    我正在使用簡單的HTML DOM從我正在抓取的網站獲取元素和值。它工作的很好,但每23,000頁左右,我遇到了相當於404頁面沒有找到,其中正常的html結構不存在。這會導致一個致命錯誤,我想在不破壞頁面的情況下逃脫。 以下是完整的錯誤報告: 致命錯誤:未捕獲的錯誤:調用一個成員函數find()方法對空在C:\ XAMPP \ htdocs中\刮\ simple_html_dom.php:1113