Free Udemy courses, no Hoax
May 30, 2020
Free Udemy courses, no Hoax
Many Telegram channels provide udemy courses for free, but the problem is looking through ~500 pages for udemy URLs can be daunting. So what to do 🤔
👉 “TELEGRAM API”, and a crawler 🕸 can do the job for you.
Get ready for the Magic
First, go to telegram API and register for a telegram App great thanks to @Dayal Chand Aichara he explains it vividly. From there we can get messages from telegram channels. The next step is to get Udemy channels in the telegram, the easiest method is just to search the Udemy in telegram. Voila Solved.✌ make necessary changes to code and you will get the messages on an average the messages in these kinds of channels range from 80 - 100. so fix the message count appropriately If you want to put more count be my guest.😜 then use python regex to extract all the URLs from the messages.that is pretty simple:
re.findall(r'(https?://\S+)', str(message["content"]))
as we found all the URLs, next job is to categorize the URLs into different sites there are many sites which provide free courses, so head to the site get the Xpath of the “CLICK HERE” ‘s then use selenium web driver to get the href within.
important point is that always use unquote to take care of URL encoding
from urllib.parse import unquote
unquote(URL)
store all those links in a text file and check if its not already present in text.
for url in udemy_url:
if(not(url in lines)):
try:
file.write("\n"+url+"\n")
except:
pass
there you have it, all udemy URL in a text file.