找回密码
 快速注册
搜索
查看: 39|回复: 2

如何爬取Convergence期刊?

[复制链接]

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2023-8-15 23:54 |阅读模式
本帖最后由 hbghlyj 于 2023-8-16 00:14 编辑 Convergence期刊是MMA发行的免费期刊,内容是数学教育与数学史。
打开Printer-friendly view,是按照节点编号的。发现从115315到117942都是有内容的:

根据URL globbing#Numerical ranges执行
  1. curl -O "https://www.maa.org/book/export/html/[115315-117942]"
复制代码
批量下载这些HTML文件。
MMA阅读页面有LaTeX代码,有MathJax。
Printer-friendly view有LaTeX代码,无MathJax。
例如https://www.maa.org/book/export/html/116806
Screenshot 2023-08-15 at 23-59-58 What is 0^0.png

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2023-8-15 23:56
本帖最后由 hbghlyj 于 2023-8-16 00:24 编辑 例如MAA网站上阅读maa.org/press/periodicals/convergence/what-is-00-todays-algebra-books
在HTML代码中有一行
  1. <div id="node-116808" class="node node-loci-article  clearfix">
复制代码

可见整个页面的节点编号是116808。
下方有Printer-friendly version的链接maa.org/book/export/html/116808,与上面的编号相符。

在HTML代码中也有一行
  1. <div id="book-navigation-116806" class="book-navigation">
复制代码

可见116806是一小节的编号。
所以maa.org/book/export/html/116806是这个小节的Printer-friendly version


由nodeId可以用mathDL访问内容,例如:
maa.org/mathDL/46/?pa=content&sa=viewDocument&nodeId=3802
但是这个页面的node编号是117821
为什么nodeId=3802会链接到117821呢

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2023-8-16 00:19
但Convergence期刊不是全都在115315-117942的范围内,较新的node编号是7位数:
例如Beyond Riemann Sums的node编号是3574972:
maa.org/book/export/html/3574972
为了爬取较新的Convergence期刊,需要确定7位数node编号的范围呢
好像3574972是最新的吧?
3574971页面存在;maa.org/book/export/html/3574971
3574973页面不存在:maa.org/book/export/html/3574973

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 15:34

Powered by Discuz!

× 快速回复 返回顶部 返回列表