Skip to main content

Important Note

This API is unofficial, fully open source and in Beta version. If you have any questions/troubles, you can use Issues to let me know.

About

udemyAPI developed for udemy teachers. It helps you to monitor your course. You can monitor the questions in your course with this library.

Mail:AzizKpln@protonmail.com

LinkedIn:https://www.linkedin.com/in/aziz-k-074604170/

Importing The Modules

from udemyAPI.UdemyQuestionsAnswers import UdemyQuestionAnswers
from udemyAPI import apiConfigTeachingAssistant
from udemyAPI import apiConfigStandard
from udemyAPI.playwrightSetup import setupPlaywright
from udemyAPI.udemyLogin import login
from udemyAPI.teachingAssistant import teachingAssistantReports

setting up playwright

pwPage=setupPlaywright()._page_()

Logging in Udemy

login(pwPage,<email>,<password>)
  • If you don't want your password to be seen in the script that you're writing,
  • You can setup a virtual environment. You can search about it if you don't know how to.

configuration of udemyAPI teaching assistant

apiConfig=apiConfigTeachingAssistant(pwPage,<course_link>,<language>,<teaching_assistant_name>)

apiConfigTeachingAssistant returns;

  • Links of questions that's answered by a spesific teaching assistant in a spesific time.
  • Links of questions that's unanswered by a spesific teaching assistant in a spesific time.
  • Comments that's been made by a spesific teaching assistant in a spesific time.

first argument takes the playwright setup variable

the second one takes the course link(the link in student panel)

the third option is the language. EN and TR supported. It's the language of your udemy panel

the last option takes the teaching assistant name.

using the API for apiConfigTeachingAssistant

uAPI=teachingAssistantReports(apiConfig)

teachingAssistantReports inherits the values that you've written in apiConfigTeachingAssistant. therefore you have to use the variable 'apiConfig' inside of teachingAssistantReports function.

uAPI._teachingAssistantReports_(5)

To recieve the reports, use the function above and give a day. The code above returns the 5 days reports for teaching assistant "Aziz"

print("Comments By Assistant:",uAPI.commentsByTeachingAssistant)

uAPI.commentsByTeachingAssistant used to receive the comments that's been made by the teaching assistant

print("Answered:",uAPI.getLinksAnswered)

uAPI.getLinksAnswered used to receive the links that's been answered by the teaching assistant

print("UnAnswered:",uAPI.getLinksUnAnswered)

uAPI.getLinksUnAnswered used to receive the links that's NOT been answered by the teaching assistant

print(len(uAPI.getLinksUnAnswered))

you can also use the len() python function to recieve the length of answered/unanswered questions.

configuration of udemyAPI Standard function

apiConfig=apiConfigStandard(pwPage,<course_link>,<language>)

apiConfigStandard returns;

  • Questions that's not been read by anyone.
  • Questions that's not been answered by anyone.
  • Questions that's not been answered by any teaching assistant
      • (the difference is in here it looks for every teaching assistant in the course, but above, it looks for a spesific teaching assistant.)

first argument takes the playwright setup variable

the second one takes the course link(the link in teaching assistant panel)

the last option is the language. EN and TR supported. It's the language of your udemy panel

using the API for apiConfigStandard

uAPI=UdemyQuestionAnswers(apiConfig)

UdemyQuestionAnswers inherits the values that you've written in apiConfigStandard. therefore you have to use the variable 'apiConfig' inside of UdemyQuestionAnswers function.

uAPI.courseID=3

courseID takes the ID number of course. For the courses above;

1 means all courses

2 means etik hacker olma kursu

3 means etik hacker olma kursu seviye 2

uAPI.unAnsweredQuestions(5)

the code above is used to get unanswered questions in 5 days by anyone

uAPI.noAnswerByTeacingAssistants(5)

the code above is used to get unanswered questions in 5 days by any teaching assistants

uAPI.unReadQuestions(5)

the code above is used to get unread questions in 5 days by any teaching assistants

print(uAPI.getLinks)

the code above used for getting links

print(len(uAPI.getLinks))

you can use the len() function to see the number of links

Release files for udemyAPI 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for udemyAPI 0.0.1
File Size Uploaded
udemyAPI-0.0.1.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for udemyAPI 0.0.1
File Interpreter ABI Platform
udemyAPI-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.2 kB

Release files / udemyAPI-0.0.1.tar.gz

Download URL udemyAPI-0.0.1.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5b18d96d02fd8ca01666133536fbc849ffd64c16c55f00b2740d47a956c50993
BLAKE2b-256 checksum
How to use checksums
de8e452d9e9b2a66185351e4daa2845845115aad8f6a5a83d7426d37d2f70242
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.2

Release files / udemyAPI-0.0.1-py3-none-any.whl

Download URL udemyAPI-0.0.1-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c6b66f52b3863c58d0f83e5a32d96f9fa9921e0131b047083478762af90f989
BLAKE2b-256 checksum
How to use checksums
807afffc4f15dff74435e2d3292c3bcded5b83127bdc43147481f7801f416683
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.2

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page