remove unused codes

This commit is contained in:
Mako
2021-08-07 17:13:50 +09:00
parent f6e9bff8a9
commit fb320650c9
3 changed files with 1 additions and 34 deletions

View File

@@ -2,27 +2,6 @@
REM 接続が悪いときは5分待機してから再度pingを投げる
ping tools.ietf.org -n 1
@echo [+] %date% %time%
if %errorlevel% neq 0 (
timeout /t 300 1>nul 2>&1
ping tools.ietf.org -n 1
@echo [+] %date% %time%
if %errorlevel% neq 0 (
timeout /t 300 1>nul 2>&1
ping tools.ietf.org -n 1
@echo [+] %date% %time%
if %errorlevel% neq 0 (
timeout /t 300 1>nul 2>&1
ping tools.ietf.org -n 1
@echo [+] %date% %time%
if %errorlevel% neq 0 (
exit %errorlevel%
)
)
)
)
ping datatracker.ietf.org -n 1
@echo [+] %date% %time%
if %errorlevel% neq 0 (

View File

@@ -15,15 +15,11 @@ OUTPUT_PATH = os.path.join(OUTPUT_DIR, "obsoletes.json")
def fetch_remote_index():
# 発行されているRFCの番号の一覧をページから取得する
# url = 'https://tools.ietf.org/rfc/index'
url = 'https://www.ietf.org/download/rfc-index.txt'
headers = { 'User-agent': '', 'referer': url }
page = requests.get(url, headers, timeout=(36.2, 180))
#tree = html.fromstring(page.content)
# RFC INDEX の内容を抽出
#rfc_index = tree.xpath('//div[@class="content"]/pre//text()')
#rfc_index = ''.join(rfc_index)
rfc_index_page = page.content.decode('utf-8')
# RFCの一覧のみを抽出
rfc_index_list = rfc_index_page.split(
@@ -38,15 +34,8 @@ def fetch_remote_index():
if re.search(r'Not Issued', tmp):
continue
rfcs.append(tmp)
# pprint(rfcs)
#contents = re.compile(r'\n\n+').split(tmp)[2:] # 空行区切り、先頭の余分な文字を除去
#rfcs = []
#for content in contents:
# content = re.sub(r'\n +', ' ', content)
# if re.search(r'Not Issued', content):
# continue
# rfcs.append(content)
# pprint(rfcs)
rfc_numbers = [] # rfcの番号一覧
data = {} # 廃止・更新情報一覧

View File

@@ -230,7 +230,6 @@ def _cleanhtml(raw_html):
# [EntryPoint]
# RFCの取得処理
def fetch_rfc(number, force=False):
# url = 'https://tools.ietf.org/html/rfc%d' % number # 2021/06/06 URL変更
url = 'https://datatracker.ietf.org/doc/html/rfc%d' % number
output_dir = 'data/%04d' % (number//1000%10*1000)
output_file = '%s/rfc%d.json' % (output_dir, number)