Skip to content

Commit

Permalink
입력으로 공개 URL도 사용할 수 있도록 변경 (#8)
Browse files Browse the repository at this point in the history
* feat: 입력으로 시간표 URL 자체를 사용할 수 있도록 변경

- everytime.py: URL로 주어진 입력의 경우 re.match(), re.search()를 통해 identifier를 찾도록 변경
- requirements: re 버전을 2.2.1 위로 설정

* ref: urllib.parse를 사용해 파싱하도록 변경

* Update everytime.py

* Update everytime.py

---------

Co-authored-by: Hoseong Son <[email protected]>
  • Loading branch information
minsoo0715 and sookcha authored Sep 25, 2023
1 parent 329f69a commit ddf0fc8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions everytime.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from datetime import time
import requests
from urllib.parse import urlparse

class Everytime:
def __init__(self, path):
url = urlparse(path)
if url.netloc == "everytime.kr":
self.path = url.path.replace("/@", "")
return
self.path = path

def get_timetable(self):
Expand Down

0 comments on commit ddf0fc8

Please sign in to comment.