摘要:
html = ''' first item second item third item fourth item fifth item ''' from pyquery import PyQuery a... 阅读全文
posted @ 2019-01-15 17:59
青春叛逆者
阅读(224)
评论(0)
推荐(0)
摘要:
html = ''' first item second item third item fourth item fifth item ''' from pyquery import PyQuery a... 阅读全文
posted @ 2019-01-15 17:53
青春叛逆者
阅读(684)
评论(0)
推荐(0)
摘要:
html = ''' first item second item third item fourth item fifth item ''' from pyquery import PyQuery a... 阅读全文
posted @ 2019-01-15 17:37
青春叛逆者
阅读(565)
评论(0)
推荐(0)
摘要:
子元素 from pyquery import PyQuery as pq doc = pq(html) items = doc('.list') print('items 类型',type(items)) print(items) lis = items.find('li') print('lis 类型',type(lis)) print(lis) ''' 输出结果:items 类型 ... 阅读全文
posted @ 2019-01-15 16:41
青春叛逆者
阅读(722)
评论(0)
推荐(0)
摘要:
html = ''' first item second item third item fourth item fifth item ''' from pyquery import PyQuery as pq doc = pq(html) print(doc('#... 阅读全文
posted @ 2019-01-15 16:33
青春叛逆者
阅读(282)
评论(0)
推荐(0)
摘要:
#文本初始化 from pyquery import PyQuery as pq doc = pq(filename='demo.html') print(doc('li')) ''' #输出结果: first item second item third item fourth item fifth item ''' ... 阅读全文
posted @ 2019-01-15 16:26
青春叛逆者
阅读(271)
评论(0)
推荐(0)
摘要:
#url初始化 from pyquery import PyQuery as pq doc = pq(url='http://www.taobao.com') print(doc('head')) ''' 输出结果: 淘宝网 - 淘!我喜欢 ''' 阅读全文
posted @ 2019-01-15 16:21
青春叛逆者
阅读(267)
评论(0)
推荐(0)
摘要:
'' 拿出html里面的所有li ''' html = ''' first item second item third item fourth item fifth item ''' from pyquery import PyQuery as pq doc = pq(html... 阅读全文
posted @ 2019-01-15 16:18
青春叛逆者
阅读(191)
评论(0)
推荐(0)
浙公网安备 33010602011771号