udemy-userAPI 0.3.2__py3-none-any.whl → 0.3.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- udemy_userAPI/__version__.py +1 -1
- udemy_userAPI/api.py +8 -8
- udemy_userAPI/authenticate.py +5 -8
- udemy_userAPI/bultins.py +1 -1
- udemy_userAPI/sections.py +3 -3
- udemy_userAPI/udemy.py +1 -1
- {udemy_userAPI-0.3.2.dist-info → udemy_userAPI-0.3.4.dist-info}/METADATA +2 -2
- {udemy_userAPI-0.3.2.dist-info → udemy_userAPI-0.3.4.dist-info}/RECORD +11 -11
- {udemy_userAPI-0.3.2.dist-info → udemy_userAPI-0.3.4.dist-info}/LICENSE +0 -0
- {udemy_userAPI-0.3.2.dist-info → udemy_userAPI-0.3.4.dist-info}/WHEEL +0 -0
- {udemy_userAPI-0.3.2.dist-info → udemy_userAPI-0.3.4.dist-info}/top_level.txt +0 -0
udemy_userAPI/__version__.py
CHANGED
udemy_userAPI/api.py
CHANGED
@@ -66,7 +66,7 @@ def get_pssh(init_url):
|
|
66
66
|
from .authenticate import UdemyAuth
|
67
67
|
auth = UdemyAuth()
|
68
68
|
if not auth.verif_login():
|
69
|
-
raise LoginException("
|
69
|
+
raise LoginException("Seção expirada!")
|
70
70
|
res = requests.get(init_url, headers=HEADERS_octet_stream)
|
71
71
|
if not res.ok:
|
72
72
|
return
|
@@ -134,7 +134,7 @@ def extract(pssh, license_token):
|
|
134
134
|
from .authenticate import UdemyAuth
|
135
135
|
auth = UdemyAuth()
|
136
136
|
if not auth.verif_login():
|
137
|
-
raise LoginException("
|
137
|
+
raise LoginException("Seção expirada!")
|
138
138
|
license_url = (f"https://www.udemy.com/api-2.0/media-license-server/validate-auth-token?drm_type=widevine"
|
139
139
|
f"&auth_token={license_token}")
|
140
140
|
session_id = cdm.open()
|
@@ -163,7 +163,7 @@ def get_mpd_file(mpd_url):
|
|
163
163
|
from .authenticate import UdemyAuth
|
164
164
|
auth = UdemyAuth()
|
165
165
|
if not auth.verif_login():
|
166
|
-
raise LoginException("
|
166
|
+
raise LoginException("Seção expirada!")
|
167
167
|
try:
|
168
168
|
# Faz a solicitação GET com os cabeçalhos
|
169
169
|
response = requests.get(mpd_url, headers=HEADERS_USER)
|
@@ -240,7 +240,7 @@ def get_add_files(course_id: int):
|
|
240
240
|
from .authenticate import UdemyAuth
|
241
241
|
auth = UdemyAuth()
|
242
242
|
if not auth.verif_login():
|
243
|
-
raise LoginException("
|
243
|
+
raise LoginException("Seção expirada!")
|
244
244
|
url = (f'https://www.udemy.com/api-2.0/courses/{course_id}/subscriber-curriculum-items/?page_size=2000&fields['
|
245
245
|
f'lecture]=title,object_index,is_published,sort_order,created,asset,supplementary_assets,is_free&fields['
|
246
246
|
f'quiz]=title,object_index,is_published,sort_order,type&fields[practice]=title,object_index,is_published,'
|
@@ -312,7 +312,7 @@ def get_links(course_id: int, id_lecture: int):
|
|
312
312
|
from .authenticate import UdemyAuth
|
313
313
|
auth = UdemyAuth()
|
314
314
|
if not auth.verif_login():
|
315
|
-
raise LoginException("
|
315
|
+
raise LoginException("Seção expirada!")
|
316
316
|
try:
|
317
317
|
# Faz a solicitação GET com os cabeçalhos
|
318
318
|
response = requests.get(get, headers=HEADERS_USER)
|
@@ -360,7 +360,7 @@ def get_external_liks(course_id: int, id_lecture, asset_id):
|
|
360
360
|
from .authenticate import UdemyAuth
|
361
361
|
auth = UdemyAuth()
|
362
362
|
if not auth.verif_login():
|
363
|
-
raise LoginException("
|
363
|
+
raise LoginException("Seção expirada!")
|
364
364
|
url = (f'https://www.udemy.com/api-2.0/users/me/subscribed-courses/{course_id}/lectures/{id_lecture}/'
|
365
365
|
f'supplementary-assets/{asset_id}/?fields[asset]=external_url')
|
366
366
|
try:
|
@@ -561,7 +561,7 @@ def lecture_infor(course_id: int, id_lecture: int):
|
|
561
561
|
from .authenticate import UdemyAuth
|
562
562
|
auth = UdemyAuth()
|
563
563
|
if not auth.verif_login():
|
564
|
-
raise LoginException("
|
564
|
+
raise LoginException("Seção expirada!")
|
565
565
|
edpoint = (f"https://www.udemy.com/api-2.0/users/me/subscribed-courses/{course_id}/lectures/{id_lecture}/?"
|
566
566
|
f"fields[asset]=media_license_token")
|
567
567
|
r = requests.get(edpoint, headers=HEADERS_USER)
|
@@ -592,7 +592,7 @@ def assets_infor(course_id: int, id_lecture: int, assets_id: int):
|
|
592
592
|
from .authenticate import UdemyAuth
|
593
593
|
auth = UdemyAuth()
|
594
594
|
if not auth.verif_login():
|
595
|
-
raise LoginException("
|
595
|
+
raise LoginException("Seção expirada!")
|
596
596
|
endpoint = (f'https://www.udemy.com/api-2.0/assets/{assets_id}/?fields[asset]=@min,status,delayed_asset_message,'
|
597
597
|
f'processing_errors,body&course_id={course_id}&lecture_id={id_lecture}')
|
598
598
|
r = requests.get(endpoint, headers=HEADERS_USER)
|
udemy_userAPI/authenticate.py
CHANGED
@@ -88,13 +88,10 @@ class UdemyAuth:
|
|
88
88
|
else:
|
89
89
|
return False
|
90
90
|
else:
|
91
|
-
if
|
92
|
-
' reset reason: remote connection'
|
93
|
-
' failure, transport failure reason:'
|
94
|
-
' delayed connect error: 111')
|
95
|
-
in resp.text):
|
91
|
+
if 'error: 111' in resp.text:
|
96
92
|
raise Upstreamconnecterror(message='Erro no servidor remoto!')
|
97
|
-
|
93
|
+
else:
|
94
|
+
raise LoginException(f"Erro Ao obter login : {resp.text}")
|
98
95
|
except requests.ConnectionError as e:
|
99
96
|
raise UdemyUserApiExceptions(f"Erro de conexão: {e}")
|
100
97
|
except requests.Timeout as e:
|
@@ -119,7 +116,7 @@ class UdemyAuth:
|
|
119
116
|
"""
|
120
117
|
try:
|
121
118
|
if self.verif_login():
|
122
|
-
raise UserWarning("Atenção, você já possui uma
|
119
|
+
raise UserWarning("Atenção, você já possui uma seção válida!")
|
123
120
|
s = cloudscraper.create_scraper()
|
124
121
|
r = s.get(
|
125
122
|
"https://www.udemy.com/join/signup-popup/",
|
@@ -225,7 +222,7 @@ class UdemyAuth:
|
|
225
222
|
from .api import J
|
226
223
|
try:
|
227
224
|
if self.verif_login():
|
228
|
-
raise UserWarning("Atenção, você já possui uma
|
225
|
+
raise UserWarning("Atenção, você já possui uma seção válida!")
|
229
226
|
# Inicializa uma sessão com proteção contra Cloudflare
|
230
227
|
session = cloudscraper.create_scraper()
|
231
228
|
|
udemy_userAPI/bultins.py
CHANGED
@@ -76,7 +76,7 @@ class Files:
|
|
76
76
|
from .authenticate import UdemyAuth
|
77
77
|
auth = UdemyAuth()
|
78
78
|
if not auth.verif_login():
|
79
|
-
raise LoginException("
|
79
|
+
raise LoginException("Seção expirada!")
|
80
80
|
download_urls = []
|
81
81
|
for files in self.__data:
|
82
82
|
lecture_id = files.get('lecture_id', None)
|
udemy_userAPI/sections.py
CHANGED
@@ -12,7 +12,7 @@ def get_courses_plan(tipe: str) -> list:
|
|
12
12
|
from .authenticate import UdemyAuth
|
13
13
|
auth = UdemyAuth()
|
14
14
|
if not auth.verif_login():
|
15
|
-
raise LoginException("
|
15
|
+
raise LoginException("Seção expirada!")
|
16
16
|
courses_data = []
|
17
17
|
if tipe == 'default':
|
18
18
|
response = requests.get(f"https://www.udemy.com/api-2.0/users/me/subscribed-courses/?page_size=1000"
|
@@ -69,7 +69,7 @@ def get_details_courses(course_id):
|
|
69
69
|
from .authenticate import UdemyAuth
|
70
70
|
auth = UdemyAuth()
|
71
71
|
if not auth.verif_login():
|
72
|
-
raise LoginException("
|
72
|
+
raise LoginException("Seção expirada!")
|
73
73
|
response = requests.get(
|
74
74
|
f"https://www.udemy.com/api-2.0/courses/{course_id}/subscriber-curriculum-items/?"
|
75
75
|
f"caching_intent=True&fields%5Basset%5D=title%2Cfilename%2Casset_type%2Cstatus%2Ctime_estimation%2"
|
@@ -105,7 +105,7 @@ def get_course_infor(course_id):
|
|
105
105
|
from .authenticate import UdemyAuth
|
106
106
|
auth = UdemyAuth()
|
107
107
|
if not auth.verif_login():
|
108
|
-
raise LoginException("
|
108
|
+
raise LoginException("Seção expirada!")
|
109
109
|
end_point = (
|
110
110
|
f'https://www.udemy.com/api-2.0/courses/{course_id}/?fields[course]=title,context_info,primary_category,'
|
111
111
|
'primary_subcategory,avg_rating_recent,visible_instructors,locale,estimated_content_length,'
|
udemy_userAPI/udemy.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: udemy_userAPI
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.4
|
4
4
|
Summary: Obtenha detalhes de cursos que o usuário esteja inscrito da plataforma Udemy,usando o EndPoint de usuário o mesmo que o navegador utiliza para acessar e redenrizar os cursos.
|
5
5
|
Author: PauloCesar-dev404
|
6
6
|
Author-email: paulocesar0073dev404@gmail.com
|
@@ -19,7 +19,7 @@ Requires-Dist: pywidevine
|
|
19
19
|
# udemy-userAPI
|
20
20
|
|
21
21
|
|
22
|
-

|
23
23
|

|
24
24
|
[](https://paulocesar-dev404.github.io/me-apoiando-online/)
|
25
25
|
[](https://github.com/PauloCesar-dev404/udemy-userAPI/blob/main/docs/iniciando.md)
|
@@ -11,19 +11,19 @@ m3u8_analyzer/__init__.py,sha256=v7CiVqsCq2YH347C-QR1kHPJtXFFdru8qole3E9adCY,217
|
|
11
11
|
m3u8_analyzer/__version__.py,sha256=YP3yT87ZKrU3eARUUdQ_pg4xAXLGfBXjH4ZgEoZSq1I,25
|
12
12
|
m3u8_analyzer/exeptions.py,sha256=fK6bU3YxNSbfsPmCp4yudUvmwy_g6dj2KwIkH0dW4LI,3672
|
13
13
|
udemy_userAPI/__init__.py,sha256=BPle89xE_CMTKKe_Lw6jioYLgpH-q_Lpho2S-n1PIUA,206
|
14
|
-
udemy_userAPI/__version__.py,sha256=
|
15
|
-
udemy_userAPI/api.py,sha256=
|
16
|
-
udemy_userAPI/authenticate.py,sha256=
|
17
|
-
udemy_userAPI/bultins.py,sha256=
|
14
|
+
udemy_userAPI/__version__.py,sha256=Y5EswWnkEFqX77VlVabBYEHq1PF_ah5ZrWim3K_4g-s,405
|
15
|
+
udemy_userAPI/api.py,sha256=U47bxTkdqVgAwxOvHpOV7alzVnEEgpxygBYrnkH7x50,24277
|
16
|
+
udemy_userAPI/authenticate.py,sha256=tUeHkIUIlvBlSKyymvPjgYAzpalpYuO7gCFrwld5V8s,13885
|
17
|
+
udemy_userAPI/bultins.py,sha256=YLaiGqzHKK7HAgmw7wrgbev1Uq3dHAsU-j1vb3kQn_A,16428
|
18
18
|
udemy_userAPI/exeptions.py,sha256=kfnPdZpqYY8nd0gnl6_Vh-MIz-XupmmbRPIuFnyXupk,692
|
19
|
-
udemy_userAPI/sections.py,sha256=
|
20
|
-
udemy_userAPI/udemy.py,sha256=
|
19
|
+
udemy_userAPI/sections.py,sha256=qyD8GwU4AR9ezL1wgQOC3HopExk72L-vp49LJZQl8XI,5474
|
20
|
+
udemy_userAPI/udemy.py,sha256=nCx7czlGPgkqaIB-E1RVO1IGTS_G9yZWhBBhMHyt45I,2920
|
21
21
|
udemy_userAPI/.cache/.udemy_userAPI,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
udemy_userAPI/mpd_analyzer/__init__.py,sha256=i3JVWyvcFLaj5kPmx8c1PgjsLht7OUIQQClD4yqYbo8,102
|
23
23
|
udemy_userAPI/mpd_analyzer/bin.wvd,sha256=1rAJdCc120hQlX9qe5KUS628eY2ZHYxQSmyhGNefSzo,2956
|
24
24
|
udemy_userAPI/mpd_analyzer/mpd_parser.py,sha256=PgUkHc5x8FTuXFCuYkWPZr9TaO_nsKalb02EFYl_zeA,8926
|
25
|
-
udemy_userAPI-0.3.
|
26
|
-
udemy_userAPI-0.3.
|
27
|
-
udemy_userAPI-0.3.
|
28
|
-
udemy_userAPI-0.3.
|
29
|
-
udemy_userAPI-0.3.
|
25
|
+
udemy_userAPI-0.3.4.dist-info/LICENSE,sha256=l4jdKYt8gSdDFOGr09vCKnMn_Im55XIcQKqTDEtFfNs,1095
|
26
|
+
udemy_userAPI-0.3.4.dist-info/METADATA,sha256=IEu2-1E9wnR9zwn0KsViLF7dNwAigH4rBHsNEj5cgJ8,1438
|
27
|
+
udemy_userAPI-0.3.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
28
|
+
udemy_userAPI-0.3.4.dist-info/top_level.txt,sha256=ijTINaSDRKhdahY_X7dmSRFTxBIwQErWv9ATCG55mog,14
|
29
|
+
udemy_userAPI-0.3.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|