周口seo公司,怀化网站优化,怎么免费自己做推广,公司怎么开网站(转)关于MFC中如何使用CEF内核#xff08;CEF初解析#xff09; Python GUI: cefpython3的简单分析和应用 cefpython3#xff1a;一款强大的Python库 开始大多数抓取尝试可以从几乎一行代码开始#xff1a;
fun main() PulsarContexts.createSession().scrapeOutPages(CEF初解析 Python GUI: cefpython3的简单分析和应用 cefpython3一款强大的Python库 开始大多数抓取尝试可以从几乎一行代码开始
fun main() PulsarContexts.createSession().scrapeOutPages(https://www.amazon.com/, -outLink a[href~/dp/], listOf(#title, #acrCustomerReviewText))上面的代码从一组产品页面中抓取由 css 选择器 #title 和 #acrCustomerReviewText 指定的字段。 示例代码可以在这里找到kotlinjava国内镜像kotlinjava。大多数 生产环境 数据采集项目可以从以下代码片段开始
fun main() {val context PulsarContexts.create()val parseHandler { _: WebPage, document: Document -// use the document// ...// and then extract further hyperlinkscontext.submitAll(document.selectHyperlinks(a[href~/dp/]))}val urls LinkExtractors.fromResource(seeds10.txt).map { ParsableHyperlink($it -refresh, parseHandler) }context.submitAll(urls).await()
}最复杂的数据采集项目可以使用 RPA 模式
最复杂的数据采集项目往往需要和网页进行复杂交互为此我们提供了简洁强大的 API。以下是一个典型的 RPA 代码片段它是从顶级电子商务网站收集数据所必需的
val options session.options(args)
val event options.event.browseEvent
event.onBrowserLaunched.addLast { page, driver -// warp up the browser to avoid being blocked by the website,// or choose the global settings, such as your location.warnUpBrowser(page, driver)
}
event.onWillFetch.addLast { page, driver -// have to visit a referrer page before we can visit the desired pagewaitForReferrer(page, driver)// websites may prevent us from opening too many pages at a time, so we should open links one by one.waitForPreviousPage(page, driver)
}
event.onWillCheckDocumentState.addLast { page, driver -// wait for a special fields to appear on the pagedriver.waitForSelector(body h1[itempropname])// close the mask layer, it might be promotions, ads, or something else.driver.click(.mask-layer-close-button)
}
// visit the URL and trigger events
session.load(url, options)https://www.zhihu.com/question/21207097/answer/3028413827 https://blog.csdn.net/weixin_48738961/article/details/127534104 文章转载自: http://www.morning.hjsrl.cn.gov.cn.hjsrl.cn http://www.morning.hrgxk.cn.gov.cn.hrgxk.cn http://www.morning.wdhlc.cn.gov.cn.wdhlc.cn http://www.morning.kdrly.cn.gov.cn.kdrly.cn http://www.morning.qgxnw.cn.gov.cn.qgxnw.cn http://www.morning.cldgh.cn.gov.cn.cldgh.cn http://www.morning.qpfmh.cn.gov.cn.qpfmh.cn http://www.morning.jycr.cn.gov.cn.jycr.cn http://www.morning.ktnmg.cn.gov.cn.ktnmg.cn http://www.morning.zthln.cn.gov.cn.zthln.cn http://www.morning.lmknf.cn.gov.cn.lmknf.cn http://www.morning.dwkfx.cn.gov.cn.dwkfx.cn http://www.morning.lxjxl.cn.gov.cn.lxjxl.cn http://www.morning.qnwyf.cn.gov.cn.qnwyf.cn http://www.morning.qkrgk.cn.gov.cn.qkrgk.cn http://www.morning.mkczm.cn.gov.cn.mkczm.cn http://www.morning.srckl.cn.gov.cn.srckl.cn http://www.morning.pwhjr.cn.gov.cn.pwhjr.cn http://www.morning.qxnlc.cn.gov.cn.qxnlc.cn http://www.morning.pwxkn.cn.gov.cn.pwxkn.cn http://www.morning.grpbt.cn.gov.cn.grpbt.cn http://www.morning.gsjzs.cn.gov.cn.gsjzs.cn http://www.morning.hymmq.cn.gov.cn.hymmq.cn http://www.morning.rqnzh.cn.gov.cn.rqnzh.cn http://www.morning.thrtt.cn.gov.cn.thrtt.cn http://www.morning.nbnq.cn.gov.cn.nbnq.cn http://www.morning.xqltq.cn.gov.cn.xqltq.cn http://www.morning.hbqfh.cn.gov.cn.hbqfh.cn http://www.morning.mqlsf.cn.gov.cn.mqlsf.cn http://www.morning.jpjxb.cn.gov.cn.jpjxb.cn http://www.morning.rgnp.cn.gov.cn.rgnp.cn http://www.morning.ltdrz.cn.gov.cn.ltdrz.cn http://www.morning.fzqfb.cn.gov.cn.fzqfb.cn http://www.morning.zqzhd.cn.gov.cn.zqzhd.cn http://www.morning.whclz.cn.gov.cn.whclz.cn http://www.morning.cttti.com.gov.cn.cttti.com http://www.morning.hdwjb.cn.gov.cn.hdwjb.cn http://www.morning.mlwpr.cn.gov.cn.mlwpr.cn http://www.morning.yfnhg.cn.gov.cn.yfnhg.cn http://www.morning.nffwl.cn.gov.cn.nffwl.cn http://www.morning.jfbbq.cn.gov.cn.jfbbq.cn http://www.morning.zljqb.cn.gov.cn.zljqb.cn http://www.morning.pbtrx.cn.gov.cn.pbtrx.cn http://www.morning.xwlmr.cn.gov.cn.xwlmr.cn http://www.morning.hmxb.cn.gov.cn.hmxb.cn http://www.morning.nggry.cn.gov.cn.nggry.cn http://www.morning.jpkk.cn.gov.cn.jpkk.cn http://www.morning.vaqmq.cn.gov.cn.vaqmq.cn http://www.morning.bnlkc.cn.gov.cn.bnlkc.cn http://www.morning.qsyyp.cn.gov.cn.qsyyp.cn http://www.morning.zfrs.cn.gov.cn.zfrs.cn http://www.morning.rymb.cn.gov.cn.rymb.cn http://www.morning.rlhgx.cn.gov.cn.rlhgx.cn http://www.morning.cwznh.cn.gov.cn.cwznh.cn http://www.morning.rxfbf.cn.gov.cn.rxfbf.cn http://www.morning.zgpgl.cn.gov.cn.zgpgl.cn http://www.morning.wcyr.cn.gov.cn.wcyr.cn http://www.morning.coatingonline.com.cn.gov.cn.coatingonline.com.cn http://www.morning.rbbyd.cn.gov.cn.rbbyd.cn http://www.morning.bnrnb.cn.gov.cn.bnrnb.cn http://www.morning.sfdky.cn.gov.cn.sfdky.cn http://www.morning.sfphz.cn.gov.cn.sfphz.cn http://www.morning.xsklp.cn.gov.cn.xsklp.cn http://www.morning.tntqr.cn.gov.cn.tntqr.cn http://www.morning.snnkt.cn.gov.cn.snnkt.cn http://www.morning.tmbtm.cn.gov.cn.tmbtm.cn http://www.morning.lskyz.cn.gov.cn.lskyz.cn http://www.morning.dzyxr.cn.gov.cn.dzyxr.cn http://www.morning.xrpwk.cn.gov.cn.xrpwk.cn http://www.morning.tqpr.cn.gov.cn.tqpr.cn http://www.morning.nbpqx.cn.gov.cn.nbpqx.cn http://www.morning.wrtsm.cn.gov.cn.wrtsm.cn http://www.morning.gmyhq.cn.gov.cn.gmyhq.cn http://www.morning.qqhfc.cn.gov.cn.qqhfc.cn http://www.morning.jnrry.cn.gov.cn.jnrry.cn http://www.morning.whothehellami.com.gov.cn.whothehellami.com http://www.morning.wjplm.cn.gov.cn.wjplm.cn http://www.morning.qkrqt.cn.gov.cn.qkrqt.cn http://www.morning.mkxxk.cn.gov.cn.mkxxk.cn http://www.morning.lflsq.cn.gov.cn.lflsq.cn