Selecting a specific div from a extern webpage using CURL

前端 未结 3 1354
谎友^
谎友^ 2021-02-15 07:29

Hi can anyone help me how to select a specific div from the content of a webpage.

Let\'s say i want to get the div with id=\"wrapper_content\" from webpage

3条回答
  •  庸人自扰
    2021-02-15 08:11

    check our hpricot, it lets you elegantly select sections

    first you would use curl to get the document, then use hpricot to get the part you need

提交回复
热议问题