udemy-userAPI 0.3.4__tar.gz → 0.3.5__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. {udemy_userapi-0.3.4/udemy_userAPI.egg-info → udemy_userapi-0.3.5}/PKG-INFO +2 -2
  2. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/README.md +1 -1
  3. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/README_PYPI.md +1 -1
  4. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI/__version__.py +1 -1
  5. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI/api.py +8 -8
  6. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI/authenticate.py +7 -3
  7. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI/bultins.py +3 -3
  8. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI/sections.py +3 -3
  9. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI/udemy.py +1 -1
  10. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5/udemy_userAPI.egg-info}/PKG-INFO +2 -2
  11. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/LICENSE +0 -0
  12. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/MANIFEST.in +0 -0
  13. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/setup.cfg +0 -0
  14. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/setup.py +0 -0
  15. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI/.cache/.udemy_userAPI +0 -0
  16. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI/__init__.py +0 -0
  17. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI/exeptions.py +0 -0
  18. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI/mpd_analyzer/__init__.py +0 -0
  19. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI/mpd_analyzer/bin.wvd +0 -0
  20. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI/mpd_analyzer/mpd_parser.py +0 -0
  21. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI.egg-info/SOURCES.txt +0 -0
  22. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI.egg-info/dependency_links.txt +0 -0
  23. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI.egg-info/not-zip-safe +0 -0
  24. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI.egg-info/requires.txt +0 -0
  25. {udemy_userapi-0.3.4 → udemy_userapi-0.3.5}/udemy_userAPI.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: udemy_userAPI
3
- Version: 0.3.4
3
+ Version: 0.3.5
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
- ![Versão](https://img.shields.io/badge/version-0.3.4-orange)
22
+ ![Versão](https://img.shields.io/badge/version-0.3.5-orange)
23
23
  ![Licença](https://img.shields.io/badge/license-MIT-orange)
24
24
  [![Sponsor](https://img.shields.io/badge/💲Donate-yellow)](https://paulocesar-dev404.github.io/me-apoiando-online/)
25
25
  [![Sponsor](https://img.shields.io/badge/Documentation-green)](https://github.com/PauloCesar-dev404/udemy-userAPI/blob/main/docs/iniciando.md)
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- ![Versão](https://img.shields.io/badge/version-0.3.4-orange)
6
+ ![Versão](https://img.shields.io/badge/version-0.3.5-orange)
7
7
  ![Licença](https://img.shields.io/badge/license-MIT-orange)
8
8
  [![Sponsor](https://img.shields.io/badge/💲Donate-yellow)](https://paulocesar-dev404.github.io/me-apoiando-online/)
9
9
  [![Sponsor](https://img.shields.io/badge/Documentation-green)](https://github.com/PauloCesar-dev404/udemy-userAPI/blob/main/docs/iniciando.md)
@@ -1,7 +1,7 @@
1
1
  # udemy-userAPI
2
2
 
3
3
 
4
- ![Versão](https://img.shields.io/badge/version-0.3.4-orange)
4
+ ![Versão](https://img.shields.io/badge/version-0.3.5-orange)
5
5
  ![Licença](https://img.shields.io/badge/license-MIT-orange)
6
6
  [![Sponsor](https://img.shields.io/badge/💲Donate-yellow)](https://paulocesar-dev404.github.io/me-apoiando-online/)
7
7
  [![Sponsor](https://img.shields.io/badge/Documentation-green)](https://github.com/PauloCesar-dev404/udemy-userAPI/blob/main/docs/iniciando.md)
@@ -1,4 +1,4 @@
1
- __version__ = '0.3.4'
1
+ __version__ = '0.3.5'
2
2
  __lib_name__ = 'udemy_userAPI' # local name
3
3
  __repo_name__ = 'udemy-userAPI'
4
4
  __autor__ = 'PauloCesar-dev404'
@@ -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("Seção expirada!")
69
+ raise LoginException("Sessã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("Seção expirada!")
137
+ raise LoginException("Sessã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("Seção expirada!")
166
+ raise LoginException("Sessã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("Seção expirada!")
243
+ raise LoginException("Sessã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("Seção expirada!")
315
+ raise LoginException("Sessã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("Seção expirada!")
363
+ raise LoginException("Sessã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("Seção expirada!")
564
+ raise LoginException("Sessã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("Seção expirada!")
595
+ raise LoginException("Sessã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)
@@ -89,7 +89,11 @@ class UdemyAuth:
89
89
  return False
90
90
  else:
91
91
  if 'error: 111' in resp.text:
92
- raise Upstreamconnecterror(message='Erro no servidor remoto!')
92
+ raise Upstreamconnecterror(message=
93
+ 'Erro ao se comunicar com o servidor remoto!')
94
+ elif 'upstream connect error or disconnect/reset before headers. reset reason: connection timeout' in resp.text:
95
+ raise Upstreamconnecterror(""
96
+ "Ocorreu uma falha de tempo de resposta!")
93
97
  else:
94
98
  raise LoginException(f"Erro Ao obter login : {resp.text}")
95
99
  except requests.ConnectionError as e:
@@ -116,7 +120,7 @@ class UdemyAuth:
116
120
  """
117
121
  try:
118
122
  if self.verif_login():
119
- raise UserWarning("Atenção, você já possui uma seção válida!")
123
+ raise UserWarning("Atenção, você já possui uma Sessão válida!")
120
124
  s = cloudscraper.create_scraper()
121
125
  r = s.get(
122
126
  "https://www.udemy.com/join/signup-popup/",
@@ -222,7 +226,7 @@ class UdemyAuth:
222
226
  from .api import J
223
227
  try:
224
228
  if self.verif_login():
225
- raise UserWarning("Atenção, você já possui uma seção válida!")
229
+ raise UserWarning("Atenção, você já possui uma Sessão válida!")
226
230
  # Inicializa uma sessão com proteção contra Cloudflare
227
231
  session = cloudscraper.create_scraper()
228
232
 
@@ -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("Seção expirada!")
79
+ raise LoginException("Sessão expirada!")
80
80
  download_urls = []
81
81
  for files in self.__data:
82
82
  lecture_id = files.get('lecture_id', None)
@@ -418,7 +418,7 @@ class Course:
418
418
 
419
419
  for chapter in self.__data.values():
420
420
  for index, video in enumerate(chapter.get('videos_in_chapter', [])):
421
- section = f"{chapter.get('title_chapter')}" # Adicionar numeração da seção
421
+ section = f"{chapter.get('title_chapter')}" # Adicionar numeração da Sessão
422
422
  title = video.get('video_title')
423
423
  id_lecture = video.get('lecture_id')
424
424
  id_asset = video.get('asset_id')
@@ -430,7 +430,7 @@ class Course:
430
430
  'section_order': section_order
431
431
  }
432
432
  videos.append(dt)
433
- section_order += 1 # Incrementar o número da seção após processar os vídeos do capítulo
433
+ section_order += 1 # Incrementar o número da Sessão após processar os vídeos do capítulo
434
434
  return videos
435
435
 
436
436
  def get_details_lecture(self, lecture_id: int) -> Lecture:
@@ -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("Seção expirada!")
15
+ raise LoginException("Sessã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("Seção expirada!")
72
+ raise LoginException("Sessã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("Seção expirada!")
108
+ raise LoginException("Sessã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,'
@@ -20,7 +20,7 @@ class Udemy:
20
20
  """
21
21
  self.__headers = HEADERS_USER
22
22
  if not verif_login:
23
- raise LoginException("Seção expirada!")
23
+ raise LoginException("Sessão expirada!")
24
24
 
25
25
  @staticmethod
26
26
  def my_subscribed_courses_by_plan() -> list[dict]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: udemy_userAPI
3
- Version: 0.3.4
3
+ Version: 0.3.5
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
- ![Versão](https://img.shields.io/badge/version-0.3.4-orange)
22
+ ![Versão](https://img.shields.io/badge/version-0.3.5-orange)
23
23
  ![Licença](https://img.shields.io/badge/license-MIT-orange)
24
24
  [![Sponsor](https://img.shields.io/badge/💲Donate-yellow)](https://paulocesar-dev404.github.io/me-apoiando-online/)
25
25
  [![Sponsor](https://img.shields.io/badge/Documentation-green)](https://github.com/PauloCesar-dev404/udemy-userAPI/blob/main/docs/iniciando.md)
File without changes
File without changes
File without changes
File without changes