摘要: 我选择主题是58同城二手汽车买卖网,爬取的网站是:http://gz.58.com/ershouche/?utm_source=market&spm=b-31580022738699-pe-f-829.hao360_101&PGTID=0d100000-0000-3ada-ba49-dc2ff301 阅读全文
posted @ 2017-11-02 17:43 36-林秋雁 阅读(165) 评论(0) 推荐(0) 编辑
摘要: import requests from re import * from bs4 import BeautifulSoup import pandas import sqlite3 #获取一个新闻列表页的所有新闻的上述详情,并包装成一个函数 def getclick(newurl): num=se 阅读全文
posted @ 2017-10-19 20:23 36-林秋雁 阅读(86) 评论(0) 推荐(0) 编辑
摘要: import requests import re from bs4 import BeautifulSoup from datetime import datetime gzccurl='http://news.gzcc.cn/html/xiaoyuanxinwen/' res=requests.get(gzccurl) res.encoding='utf-8' soup = Beaut... 阅读全文
posted @ 2017-10-11 19:53 36-林秋雁 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 用requests库和BeautifulSoup4库,爬取校园新闻列表的时间、标题、链接、来源。 选一个自己感兴趣的主题,做类似的操作,为“爬取网络数据并进行文本分析”做准备。 阅读全文
posted @ 2017-09-27 14:28 36-林秋雁 阅读(122) 评论(0) 推荐(0) 编辑
摘要: import jieba from wordcloud import WordCloud import matplotlib.pyplot as plt fr=open('t.txt','r',encoding='utf-8').read() words=jieba.lcut(fr) excludes={'.....'} counts={} for word in words: if ... 阅读全文
posted @ 2017-09-25 21:37 36-林秋雁 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 2.字典实例:建立学生学号成绩字典,做增删改查遍历操作。 3.列表,元组,字典,集合的遍历。总结列表,元组,字典,集合的联系与区别。 英文词频统计实例 阅读全文
posted @ 2017-09-20 16:10 36-林秋雁 阅读(160) 评论(0) 推荐(0) 编辑
摘要: for i in range(12): print(chr(9800+i),end="/") sr1="abcdefghijklmnopqrstuvwxyz" sr2=sr1.upper() sr=sr1+sr1+sr2+sr2 st=input("please input:") sR="" for j in st: if j==" ": sR = sR +... 阅读全文
posted @ 2017-09-18 15:43 36-林秋雁 阅读(130) 评论(0) 推荐(0) 编辑
摘要: from turtle import * begin_fill() fillcolor("yellow") for i in range(5): forward(200) right(144) end_fill() from turtle import * begin_fill() fillcolor("yellow") while True: forward(200... 阅读全文
posted @ 2017-09-13 21:01 36-林秋雁 阅读(105) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.pensize(5) turtle.speed(20) turtle.penup() turtle.goto(-290,230) turtle.pendown() turtle.fillcolor('red') turtle.begin_fill() tur 阅读全文
posted @ 2017-09-12 17:26 36-林秋雁 阅读(140) 评论(0) 推荐(0) 编辑
摘要: n1=input('输入一个数字') n2=input('输入一个数字') n3=float(n1) + float(n2) print (float(n3)) n1=float(input('输入三角形边长1')) n2=float(input('输入三角形边长2')) n3=float(input('输入三角形边长3')) s=(n1+n2+n3)/2 area = (s*(s-n1)... 阅读全文
posted @ 2017-09-06 11:47 36-林秋雁 阅读(172) 评论(0) 推荐(0) 编辑