fix: use consist paper url order
This commit is contained in:
parent
2506828b14
commit
0213768511
|
|
@ -39,6 +39,7 @@ def get_paper_urls(year: int) -> List[str]:
|
|||
ret = re.findall(
|
||||
r'<li class="res-list".*?<a href="(.+?)".*?</li>', body, flags=re.S)
|
||||
ret = [i for i in ret if i not in PAPER_EXCLUDE]
|
||||
ret.sort()
|
||||
return ret
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ from .filetools import _file_path
|
|||
|
||||
def test_get_paper_urls():
|
||||
assert get_paper_urls(2019) == [
|
||||
'http://www.gov.cn/zhengce/content/2018-12/06/content_5346276.htm',
|
||||
'http://www.gov.cn/zhengce/content/2019-03/22/content_5375877.htm',
|
||||
'http://www.gov.cn/zhengce/content/2018-12/06/content_5346276.htm'
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user