Hi Viplay
On 09/10/2020 16.26, Viplav Dube wrote:
Dear all,
Need to write a small scraper for JSON links and get the news on one API
call for current date and store it in the table in this format (Id,
Date, Title, Details, New From (CNN, Times, etc.) and URL of News).
News can be searched via any keyword in title or in detail field.
You can probably use the requests library
(https://requests.readthedocs.io/en/master/) for the scraping.
Not really sure if you mean you want to call an existing API, in which
case just using requests should be fine, or you actually need to parse
HTML and find links ("scraping") in which case you probably need to
combine it with beatiful soup
(https://www.crummy.com/software/BeautifulSoup/bs4/doc/).
Shouldn't be a problem to create a database model for storing that
information using standard Django models and searching shouldn't be much
of a problem either:
https://docs.djangoproject.com/en/3.1/topics/db/search/
Hope that helps a bit.
Kind regards,
Kasper Laudrup
--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/bb232ec7-672e-633f-1fb6-79c608693870%40stacktrace.dk.