This file contains 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
extension String { | |
func hexToColor() -> UIColor { | |
let hexString = self.trimmingCharacters(in: .whitespacesAndNewlines) | |
let scanner = Scanner(string: hexString) | |
if hexString.hasPrefix("#") { | |
scanner.scanLocation = 1 | |
} | |
let mask: UInt64 = 0xFF |
This file contains 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 Foundation | |
fileprivate enum LogType: String { | |
case info = "Info" | |
case error = "Error" | |
case debug = "Debug" | |
case checking = "Check" | |
case warning = "Warn" | |
case fatal = "Fatal" | |
} |
This file contains 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
# -*- coding: utf8 -*- | |
""" | |
# 주요기능 : 직방 매물 정보 크롤링 | |
# 상세기능 : 원하는 지역의 매물ID 를 가진 URL 을 입력받아 각 매물별 상세 정보를 csv 파일 및 jpg 파일로 저장 | |
# 추가계획 : 현재 계획 없음 | |
# 최종수정 : 2016.10.10 | |
""" |
This file contains 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
def get_preprocessed_number(number): | |
preprocess_dict = { | |
"-": "", | |
":": "", | |
".": "", | |
"영": "0", | |
"공": "0", | |
"일": "1", | |
"하나": "1", | |
"둘": "2", |
This file contains 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
# -*- coding: utf8 -*- | |
""" | |
# 주요기능 : 네이버 웹툰 이미지 크롤러 | |
# 상세기능 : 원하는 웹툰의 최신 에피소드 번호와 DB에 저장된 번호를 비교해 이후의 모든 에피소드 이미지를 서버에 웹툰/에피소드/파일.jpg로 저장 | |
# 파라미터 : 1. (필수 파라미터) (DB에 없는 웹툰) 웹툰의 titleid, (DB에 이미 있는 경우) 웹툰명 또는 titleid 입력 | |
# 2. (생략 가능, 기본값 0) 가져올 마지막 에피소드 번호 , 1화부터가 아닌 최신 화부터 지정한 번호까지 역순으로 크롤링한다. | |
# 3. (생략 가능, 기본값 None) "only" 라는 값이 들어왔을 경우, 2번 파라미터에 해당하는 번호의 에피소드 하나만 가져온다. | |
# |
This file contains 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
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'handlers': { | |
# Include the default Django email handler for errors | |
# This is what you'd get without configuring logging at all. | |
'mail_admins': { | |
'class': 'django.utils.log.AdminEmailHandler', | |
'level': 'ERROR', | |
# But the emails are plain text by default - HTML is nicer |