解析PuTTY IRC Ch

2024-04-27 02:57:17 发布

您现在位置:Python中文网/ 问答频道 /正文

所以我想做一个程序来监控irc聊天,如果用户的名字被提及,我会给他们发一封电子邮件。你知道吗

我想知道是否有可能将irc聊天信息输出到一个txt文件?如果可能的话,我想用Python。你知道吗

irc聊天是一个周末聊天。我不会撒谎,我编程时间不长,所以我很笨。我也曾想过用作弊引擎捕获内存,但这似乎是一个非常糟糕的解决方案,我更希望它能在Linux上运行。我也看了一下mIRC脚本,也许可以工作?你知道吗

更新: 我可以使用PuTTY日志记录功能记录聊天的输出,但是输出很难读取和解析:

22[33m:[39m12[33m:[39m07 [1m[32m@[36mUSERNAMECENSORED[0m [32m| [39m"Two software developers are required, for[7C[34m│[1m[39m[32m@[0mUSER[58D[32m| [39mstudent summer positions, to write RESTful web [34m│[1m[39m[32m@[0mUSER[32m| [39mservices in Python using the Django REST[9C[34m│[1m[39m[34m [0mUSER[6;20H[32m| [39mframework. The application being developed is a [34m│[1m[39m[34m [0mdanielrb[7;20H[32m| [39mfinancial accounting system. Therefore, a[8C[34m│[1m[39m[34m [0mDee[56D [32m| [39mknowledge of accounting is a distinct advantage. [34m│[1m[39m[34m [0meoghanc[60D[32m| [39mApplicants will be required to attend an[9C[34m│[1m[39m[34m [0mUser[10;20H[32m| [39minterview which will include technical[11C[34m│[1m[39m[34m [0mME[59D[32m| [39massignments. As well as training and experience, [34m│[1m[39m[34m [0mmtlight[60D [32m| [39mthe[46C[34m│[1m[39m[34m [0mshane 22[33m:[39m12[33m:[39m09 [1m[32m@[36mUser[0m [32m| [39mpositions offer €400 per week for the successful [34m│[1m[39m[34m [0msherkin[60D[32m| [39mcandidates."[37C[34m│[1m[39m[34m [0myensil22[33m:[39m17[33m:[39m03 [1m[32m@[36mUSER[0m [32m| [39mIt's only two months of work (approx) though :/ [34m│ [39m22[33m:[39m27[33m:[39m52 [1m[32m@

我该如何解析它,以便在提到某个用户时能够判断,并以字符串的形式读取消息?你知道吗


Tags: oftheto用户程序信息foris