一日一技:使用 Python 翻译 HTML 中的文本字符串

谢乾坤|青南 at 
相信大家都用过浏览器的翻译网页功能,例如对于下图这个英文网页:一键翻译成中文以后是这样的:你可能会觉得这个功能很简单,不就是字符串替换吗?那你可以试一试把下面这个 HTML 片段中的标签下面的英文翻译成中文。其它标签中的不要改动:123if you want to parse date and time, your could use datetime, by use this library, you can generate now time by one line code datetime.datetime.now() this is so easy.在标签中的 datetime 和标……