Skip to main content

You can find everything you need in README.MD

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

udemyAPI-0.0.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

udemyAPI-0.0.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file udemyAPI-0.0.1.tar.gz.

File metadata

  • Download URL: udemyAPI-0.0.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for udemyAPI-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5b18d96d02fd8ca01666133536fbc849ffd64c16c55f00b2740d47a956c50993
MD5 855edd61524ca1fca8bbf0fa378a6879
BLAKE2b-256 de8e452d9e9b2a66185351e4daa2845845115aad8f6a5a83d7426d37d2f70242

See more details on using hashes here.

File details

Details for the file udemyAPI-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: udemyAPI-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for udemyAPI-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9c6b66f52b3863c58d0f83e5a32d96f9fa9921e0131b047083478762af90f989
MD5 0543ee72750874ad27e5a0c7a6ee1178
BLAKE2b-256 807afffc4f15dff74435e2d3292c3bcded5b83127bdc43147481f7801f416683

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page