How to request data from an open source website such as Reddit or Github and display on the Local Django Website ?

26 views
Skip to first unread message

Shaurya Sharma

unread,
Dec 26, 2019, 8:05:14 AM12/26/19
to Django users
Hey there ,  I am quite a newbie to Django and I am trying to understand how API calls and requests work in Django. I have a simple Django website that has User login and authentication system. I want a user to save the top ten reddit posts and display them on their respective login system. I have seen the request method in Python and some web-crawling methods. I am unable to figure out a way to request data from Reddit . 
Here is the code I have written so far : 

lemme smash

unread,
Dec 27, 2019, 10:18:48 AM12/27/19
to Django users
you've really did the great, but in order to receive data from reddit you'll need to research on their api and it's not very related to django.

Karan Mittal

unread,
Dec 27, 2019, 11:50:37 AM12/27/19
to django...@googlegroups.com
hey Shaurya, 
if you haven't worked with DRF  then check it out. It will give you a much better idea of API calls.
Other than that, Reddit have its own API for you want to achieve. 
check out its documentation here: https://www.reddit.com/dev/api/
there is a difference between web crawling and requesting data from API. change your approach for making your project.
also, your project is very interesting . All the best for the same.

regards,
Karan Mittal

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c1e0f93e-e4ff-444c-8f96-e4120b2298eb%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages