项目作者: kashishkhullar

项目描述 :
Bhagwad gita hindi in json
高级语言: Python
项目地址: git://github.com/kashishkhullar/gita_json.git
创建时间: 2020-12-15T17:24:53Z
项目社区:https://github.com/kashishkhullar/gita_json

开源协议:

下载


Srimad Bhagwad Gita in JSON

This project aims to provide entire bhagwad gita in json format in hindi.

JSON Schema

  1. {
  2. "$schema": "http://json-schema.org/draft-04/schema#",
  3. "type": "object",
  4. "properties": {
  5. "chapter_hindi": {
  6. "type": "string"
  7. },
  8. "verse_hindi": {
  9. "type": "string"
  10. },
  11. "verse_meaning_hindi": {
  12. "type": "string"
  13. },
  14. "word_meaning_hindi": {
  15. "type": "string"
  16. },
  17. "chapters": {
  18. "type": "object",
  19. "properties": {
  20. "chapter_number": {
  21. "type": "object",
  22. "properties": {
  23. "chapter_number": {
  24. "type": "string"
  25. },
  26. "chapter_summary": {
  27. "type": "string"
  28. },
  29. "name": {
  30. "type": "string"
  31. },
  32. "name_meaning": {
  33. "type": "string"
  34. },
  35. "verses_count": {
  36. "type": "integer"
  37. },
  38. "verse_numbers": {
  39. "type": "array",
  40. "items": [
  41. {
  42. "type": "string"
  43. }
  44. ]
  45. }
  46. }
  47. },
  48. "verses": {
  49. "type": "object",
  50. "properties": {
  51. "chapter_number": {
  52. "type": "object",
  53. "properties": {
  54. "verse_number": {
  55. "type": "object",
  56. "properties": {
  57. "meaning": {
  58. "type": "string"
  59. },
  60. "text": {
  61. "type": "string"
  62. },
  63. "verse_number": {
  64. "type": "string"
  65. },
  66. "word_meanings": {
  67. "type": "string"
  68. }
  69. }
  70. }
  71. }
  72. }
  73. }
  74. }
  75. }
  76. }
  77. }
  78. }

Dataset

Refer to file dataset.json in the root folder of the project.

Source

Entire data has been scrapped from https://bhagavadgita.io/ using python packages BeautifulSoup and Requests

Run

Required: Python 3 and pip

  1. Install required packages

    1. pip install requests beautifulsoup4
  2. Add name of the output file in scrapper.py By default its dataset.json

    1. data_file = open("_file_name_.json", "w", encoding="utf-8")
  3. run the python file scrapper.py

    1. python scrapper.py
  4. A json file with the name you saved will be created in the root directory of the project folder