forked from sookcha/every2cal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheverytime.py
29 lines (27 loc) ยท 1.06 KB
/
everytime.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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):
return requests.post(
"https://api.everytime.kr/find/timetable/table/friend",
data={
"identifier": self.path,
"friendInfo": 'true'
},
headers={
"Accept": "*/*",
"Connection": "keep-alive",
"Pragma": "no-cache",
"Cache-Control": "no-cache",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"Host": "api.everytime.kr",
"Origin": "https://everytime.kr",
"Referer": "https://everytime.kr/",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36"
}).text