Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Commit

Permalink
修复了由于学校主页更多通知链接改变而导致的程序异常崩溃的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoQi99 committed Mar 12, 2018
1 parent 5a646ff commit d5399b6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Pydoc/spider.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
&nbsp;<br>
@author:&nbsp;QiZhao<br>
@license:&nbsp;GNU&nbsp;GPLv3<br>
@version:&nbsp;0.1.0</tt></p>
@version:&nbsp;0.1.1</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
Expand Down
8 changes: 4 additions & 4 deletions source/spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@author: QiZhao
@license: GNU GPLv3
@version: 0.1.0
@version: 0.1.1
'''
import urllib.request
import re
Expand Down Expand Up @@ -66,7 +66,7 @@ def Data_processing(subject_EN, data, url_main):
new_data.append(temp)
data = new_data

Mkfile(file) # 初次抓取时新建数据文件
tool.Mkfile(file) # 初次抓取时新建数据文件
f_before = open(file, 'rb') # 读取数据文件中的通知信息
txt_before = f_before.read().decode('utf-8')
f_before.close()
Expand Down Expand Up @@ -167,8 +167,8 @@ def Spider_snnu_index(send_number,to_addr_str,flag=1):
'''
subject_EN = 'snnu_index'
subject = '师大主页'
url = 'http://www.snnu.edu.cn/announce-1348-1.html'
url_main = 'www.snnu.edu.cn/info/1085/'
url = 'http://www.snnu.edu.cn/tzgg.htm'
url_main = 'http://www.snnu.edu.cn/info/1085/'
rule = 'info/1085/(\d+\.htm)" target="_blank">([^ ]*)((\d*-\d+-\d+)'
split_rule = '([^ ]*) (\d*-\d*-\d*) ([^\n]*)\n'

Expand Down
Binary file not shown.

0 comments on commit d5399b6

Please sign in to comment.