stocks
来源:互联网 发布:java collection用法 编辑:程序博客网 时间:2024/05/14 20:46
import urllib link="http://finance.yahoo.com/q/cp?s=^STI"html=urllib.urlopen(link).read()from sgmllib import SGMLParserimport timeclass URLLister(SGMLParser): urls = [] cou=0 is_td="" def start_td(self, attrs):href = [v for k, v in attrs if k=='class']if 'yfnc_tabledata1' in href:self.is_td=1self.cou+=1 def end_td(self):self.is_td="" def handle_data(self,text):if self.is_td:self.urls.append(text)while True:print 'Symbol','Name ','LastTrade ','Change ','Volume 'lister=URLLister()lister.feed(html)exclusive=['&','C',' N'] #hacknames=[x for x in lister.urls if x!=' ' and not (x in exclusive) ]lenght=len(names)for i in range(0,lenght,7):print names[i:i+7]print '===================================================================='print 'will start to work in 1 min'time.sleep(60)
- stocks
- Yahoo Stocks
- Special Stocks in SAP
- Trademiner, Stocks, Futures & Forex!
- SPOJ AMR10E Stocks Prediction
- Pig Iron Stocks in India
- 南邮 OJ 1567 Suspicious Stocks
- Fitch and Mather Stocks 7 (.NET)
- Deal with Multiple Stocks - Google Finance API
- ACM 矩阵乘法 SPOJ AMR10E Stocks Prediction
- SPOJ 8059. Stocks Prediction (矩阵嵌矩阵)
- Best Time to Buy and Sell Stocks
- TaoSama Becomes the God of Stocks dp
- Pakistan: Low Stocks Ensure Cotton Prices Remains Stable
- Profit Measures - http://www.teenvestor.com/investors/stocks/profit_measures.htm
- Cloud Foundry samples学习笔记9:模拟股票交易系统stocks
- [leetcode] best time to buy and sell stocks III
- [leetcode] best time to buy and sell stocks II
- Corolla的生日
- 指针,指针,又见指针
- 使用execvp()函数需要注意的两点
- hibernate jdbc连接
- Boost Python 包装C++函数供Python使用时返回值为引用类型的解决方案
- stocks
- 浅用mysql比较函数
- Flex AIR 系统托盘于右键托盘菜单的实现
- vim ctags
- ESET NOD32 Antivirus 5
- 淘宝校园招聘笔试题
- 使应用程序常驻内存,不能被任务管理器关闭之配置文件设置
- 成功创办一个公司究竟需要多少钱?
- jquery getjson 记录一下,我每每做这个东东都会忘记他