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 Apr 3, 2018
1 parent 4c0b8b9 commit 724cf17
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Pydoc/main.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.5</tt></p>
@version:&nbsp;0.1.6</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
Expand Down
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.1</tt></p>
@version:&nbsp;0.1.6</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
Expand Down
4 changes: 2 additions & 2 deletions source/main.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.5
@version: 0.1.6
'''
import spider
import time
Expand Down Expand Up @@ -37,7 +37,7 @@ def Init():

def Show_right():
'''显示程序版权声明'''
print('陕师大校园通知自动提醒'+' '+'V0.1.5')
print('陕师大校园通知自动提醒'+' '+'V0.1.6')
print('版权所有 (c) QiZhao 保留所有权利。 ')
print('本程序仅供学习和研究使用,不得用于任何商业用途.')
print('如您在使用中遇到任何问题,可联系作者邮箱: zhaoqi99@outlook.com')
Expand Down
6 changes: 3 additions & 3 deletions source/spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def Spider_snnu_index(send_number,to_addr_str,flag=1):
subject = '师大主页'
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+)'
rule = 'info/1085/(\d+\.htm)" target="_blank">([\s\S]{5,100})((\d*-\d*-\d*))'
split_rule = '([^ ]*) (\d*-\d*-\d*) ([^\n]*)\n'

status, new_msgs = Spider(url, url_main, rule, split_rule, subject, subject_EN,flag)
Expand Down Expand Up @@ -262,7 +262,7 @@ def Spider_snnu_lib(send_number,to_addr_str,flag=1):
subject = '图书馆主页'
url = 'http://www.lib.snnu.edu.cn/action.do?webid=w-d-bggg-l'
url_main = 'http://www.lib.snnu.edu.cn/action.do?webid=w-l-showmsg&gtype=a&pid='
rule = 'pid=(\d*)[^>]*>([^<]*)[^\d]*2[^\d]*(\d*-\d*-\d*)'
rule = 'pid=(\d*)[\s\S]{20,57}>([^<]*)</[af][\S\s]{18,70}(\d{4}-\d*-\d*)'
split_rule = '([^ ]*) (\d*-\d*-\d*) ([^\n]*)\n'

status, new_msgs = Spider(url, url_main, rule, split_rule, subject, subject_EN,flag)
Expand All @@ -279,4 +279,4 @@ def test():
pattern = re.compile(rule, re.S)
data_use = re.findall(pattern, data)
print(data_use)
'''
'''
Binary file not shown.

0 comments on commit 724cf17

Please sign in to comment.