python reptile crawling ancient poetry examples to explain the acquisition to add annotations and translations

Copyright Notice: Copyright: This article is a blogger original article, shall not be reproduced without the bloggers allowed. Website: http: //laiczhang.com. https://blog.csdn.net/qq_44621510/article/details/90741034

Specific to this site each poem, if you want to get it notes and translations, how to achieve.
For example:
https://so.gushiwen.org/shiwenv_30a67e5c53be.aspx
poem, go directly after, notes and translations are not completely out of the show, you need to click on "read more expand", will be fully displayed.
Examples of third-party libraries python re library of ancient poetry online poetry crawling
python library examples of third-party libraries bs4 crawling ancient poetry online poetry
python xpath library examples of third-party libraries crawling ancient poetry online poetry
this how the above three ways achieve?

F12 look will know,
Annotated translation Address: https://so.gushiwen.org/shiwen2017/ajaxfanyi.aspx?id=XXXX
XXXX search page source code about href = "javascript: fanyiShow, in the back of the brackets is the id
to the address you give an example: https://so.gushiwen.org/shiwenv_30a67e5c53be.aspx
1, to obtain the source code pages get id of 2141
2, the direct gET address: https://so.gushiwen.org/shiwen2017/ ajaxfanyi.aspx? id = 2141 to get annotated translation of the content

Guess you like

Origin blog.csdn.net/qq_44621510/article/details/90741034