Created
May 13, 2018 10:32
-
-
Save doowonee/6f1fd232b3521b9844a73dbae166171d to your computer and use it in GitHub Desktop.
히토미 다운로더 로그 파서
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
히토미 다운로더 로그 포맷을 파싱하여 다운 받았던 주소들을 한줄씩 출력 | |
''' | |
import re, os | |
FILE = 'd:/newdesktop/target.txt' | |
result = set() | |
with open(FILE, 'r', encoding = 'utf-8') as f: | |
for string in f.readlines(): | |
rs = re.compile('https://.+.html').search(string) | |
if rs is not None: | |
result.add(rs.group()) | |
for x in result: | |
print(x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment