s***l 发帖数: 129 | | i*****f 发帖数: 578 | 2 web or terminal?
web should be trivial, just with some url lib.
terminal: might be able to fork a terminal (e.g. with pexpect), control the
terminal to navigate to online user
But, I think this is more suitable for a term (cterm/fterm) to accomplish
this job with their scripting interface.
【在 s***l 的大作中提到】 : 比如mitbbs下?
| s***l 发帖数: 129 | 3 Can you show me some sample code for the task?
If web is easier, you can give me an example for web. Thanks!
the
【在 i*****f 的大作中提到】 : web or terminal? : web should be trivial, just with some url lib. : terminal: might be able to fork a terminal (e.g. with pexpect), control the : terminal to navigate to online user : But, I think this is more suitable for a term (cterm/fterm) to accomplish : this job with their scripting interface.
| j*a 发帖数: 14423 | 4 让老刑开放api
the
【在 i*****f 的大作中提到】 : web or terminal? : web should be trivial, just with some url lib. : terminal: might be able to fork a terminal (e.g. with pexpect), control the : terminal to navigate to online user : But, I think this is more suitable for a term (cterm/fterm) to accomplish : this job with their scripting interface.
| i*****f 发帖数: 578 | 5 this is the page(s) that lists the online bbs users:
http://www.mitbbs.com/mitbbs_bbsuser.php
let's drag it down:
import urllib
f = urllib.urlopen("http://www.mitbbs.com/mitbbs_bbsuser.php")
buf = f.read()
# you can also print it to verify:
print buf
By examining the html file, you could see there's a very clear structure
of how the users are listed:
3 |
|
: Can you show me some sample code for the task? : If web is easier, you can give me an example for web. Thanks! : : the
| i*****f 发帖数: 578 | 6 强烈要求!
【在 j*a 的大作中提到】 : 让老刑开放api : : the
| j*a 发帖数: 14423 | 7 python3有啥好用的snmp库?
还有画图的库,比如graphviz之类的?
【在 i*****f 的大作中提到】 : this is the page(s) that lists the online bbs users: : http://www.mitbbs.com/mitbbs_bbsuser.php : let's drag it down: : import urllib : f = urllib.urlopen("http://www.mitbbs.com/mitbbs_bbsuser.php") : buf = f.read() : # you can also print it to verify: : print buf : By examining the html file, you could see there's a very clear structure : of how the users are listed:
| i*****f 发帖数: 578 | 8 there's a package called pysnmp. it rands highest in cheeze shop. I haven
't tried it though.
graphviz has several python bindings. I haven't used them either :)
【在 j*a 的大作中提到】 : python3有啥好用的snmp库? : 还有画图的库,比如graphviz之类的?
| s***l 发帖数: 129 | 9 假定我就是要匹配USERXXX, THE_IP_ADDRESS, 是否"Web浏览"
regular express 怎么写?
另外yahoo stock, amazon也是类似的parse么?
3 |
|
USERXXX
|
USERXXX
|
THE_IP_ADDRESS |
Web浏览 |
31 |
【在 i*****f 的大作中提到】 : this is the page(s) that lists the online bbs users: : http://www.mitbbs.com/mitbbs_bbsuser.php : let's drag it down: : import urllib : f = urllib.urlopen("http://www.mitbbs.com/mitbbs_bbsuser.php") : buf = f.read() : # you can also print it to verify: : print buf : By examining the html file, you could see there's a very clear structure : of how the users are listed:
| | |