Skip to content

Commit 4feddff

Browse files
committed
Merge branch 'master' into develop
# Conflicts: # crawling/koreatech_article/convert_content.py
2 parents 28fd78d + 9382a2f commit 4feddff

2 files changed

Lines changed: 1 addition & 24 deletions

File tree

crawling/koreatech_article/table.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -105,26 +105,3 @@ def upload_image(s3, file_name: str, image: bytes) -> str:
105105
print(e)
106106

107107
return f'{S3_CONFIG["upload_domain"]}/{file_name}'
108-
109-
def upload_txt(file_name: str, text_content: str) -> str:
110-
s3 = boto3.client(
111-
service_name='s3',
112-
aws_access_key_id=S3_CONFIG['aws_access_key_id'],
113-
aws_secret_access_key=S3_CONFIG['aws_secret_access_key'],
114-
)
115-
encoded_text = text_content.encode('utf-8')
116-
117-
try:
118-
s3.upload_fileobj(
119-
Fileobj=BytesIO(encoded_text),
120-
Bucket=S3_CONFIG['bucket'],
121-
Key=file_name,
122-
ExtraArgs={
123-
'ContentType': 'text/plain; charset=utf-8',
124-
'ACL': 'public-read'
125-
}
126-
)
127-
except Exception as e:
128-
print(e)
129-
130-
return f'{S3_CONFIG["upload_domain"]}/{file_name}'

crawling/koreatech_lecture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ColumnNames(Enum):
2828
CLASS_NUMBER = ["분반"]
2929
REGULAR_NUMBER = ["수강\n정원", "수정\n정원", "정원"]
3030
DEPARTMENT = ["개설학부(과)"]
31-
TARGET = ["수강신청\n가능학년", "수강대상 (학부/전공/학년)"]
31+
TARGET = ["수강신청\n가능학년", "수강대상 (학부/전공/학년)", "대상학부(과)"]
3232
PROFESSOR = ["담당교수"]
3333
IS_ENGLISH = ["영어강의"]
3434
DESIGN_SCORE = ["설\n계", "설계"]

0 commit comments

Comments
 (0)