selenium中webdriver的局部HTML提取
别和我说selenium中的webdriver用driver.page_source,我就是不想把整篇HTML文档每次都全部提出来做Soup。因为,对下面这样左右结构的论坛而言,每次内容的改变对于整个HTML页面而言实在是一个很小的部分,如果我想把整个网站所有MOOC课程评论爬下来的话,将要做多少无用功!然而,百度遍中文内容并无解答。于是翻出去Google了一把,发现世界上已有前辈对该问题进行了解答:
主要思路是使用get_attribute方法,提取innerHTML,如下:
经验证,一切OK:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function