Selecting a specific div from a extern webpage using CURL

前端 未结 3 1815
执念已碎
执念已碎 2021-02-15 07:06

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 07:55

    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

提交回复
热议问题