python test0729.py
来源:互联网 发布:mac迅雷会员不能加速 编辑:程序博客网 时间:2024/05/15 09:09
#!/usr/env python#-*- coding: utf-8 -*-import urllib import urllib2 import random import requestsimport os,sys import MySQLdbfrom BeautifulSoup import BeautifulSoupfrom sgmllib import SGMLParser import redef main():t="https://play.google.com/store/apps/category/PERSONALIZATION"html=requests.get(t)result=html.contentprint type(result)soup=BeautifulSoup(result)temp=soup.prettify("utf-8")pattern=re.compile('<a class="title" href="(.+?)" title')dataresult=re.findall(pattern,temp)print dataresultprint len(dataresult)print type(temp)f=file("hello.txt","w+")f.writelines(temp)f.close()if __name__=="__main__": main()
- python test0729.py
- 边学边用python-searchs.py
- python __init__.py
- python __init__.py
- python 的sitecustomize.py
- 【python 练习】read_first_20line.py
- python __init__.py
- python __init__.py
- python之 __init__.py
- python __init__.py介绍
- 【python】__init__.py
- python __init__.py详解
- python crawler0723.py
- python crawler0723.py
- python crawler0729.py
- python __init__.py
- Python tab.py
- python __init__.py
- 写代码的时候突然有个想法,就是子弹的缓冲池
- 遇到的异常
- Linux内核态下的文件操作
- Linux on Mac study notes (1)
- [技术讨论]功能性和非功能性,显性和隐性的需求属性的转换与分析
- python test0729.py
- 把数据写入xml格式的string字符串(本人菜鸟,高手绕道)
- TortoiseSVN客户端重新设置用户名和密码
- Oracle删除当前用户下的所有表、视图、序列、函数、存储过程、包
- Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools
- Flex 4 皮肤设计资料
- error: conflicting types for 'memcpy' 类似报错解决方法
- 一个数组只含0,1,2三种数,对这个数组排序,要求只能扫描一遍数组
- 自己实现队列