<commit_before># -*- coding:utf-8 -*-
from lxml import etree
import requests

__author__ = 'monkey'

# 题目要求：
# 用Pyhton写一个爬图片的程序，爬这个链接里的日本妹子图片
# 地址：http://tieba.baidu.com/p/2166231880

def spider(url):
    html = requests.get(url)
    print(html.text)

if __name__ == '__main__':
    url = "http://tieba.baidu.com/p/2166231880"
    spider(url)<commit_msg>第0013题<commit_after># -*- coding:utf-8 -*-
from lxml import etree
import requests

__author__ = 'monkey'

# 题目要求：
# 用Pyhton写一个爬图片的程序，爬这个链接里的日本妹子图片
# 地址：http://tieba.baidu.com/p/2166231880

def spider(url):
    html = requests.get(url)
    selector = etree.HTML(html.text)
    picitems = []
    picitems = selector.xpath('//div[@id="post_content_29397251028"]')

    print(len(picitems))

if __name__ == '__main__':
    url = "http://tieba.baidu.com/p/2166231880"
    spider(url)
{'fraction_non_alphanumeric': 0.15985576923076922, 'fraction_numerical': 0.06850961538461539, 'mean_word_length': 3.9289940828402368, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4290568', 'n_tokens_mistral': 429, 'n_tokens_neox': 399, 'n_words': 52}