update ingesstion chapters
This commit is contained in:
parent
4a14036b01
commit
e60e5decdd
|
|
@ -9,7 +9,7 @@ spec:
|
|||
arguments:
|
||||
parameters:
|
||||
- name: book-slug
|
||||
value: "sahih-bukhari"
|
||||
value: "al-tirmidhi"
|
||||
- name: limit
|
||||
value: "0" # 0 means no limit
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ echo "=== Starting Full HadithAPI Ingestion ==="
|
|||
# Books to ingest (in order)
|
||||
BOOKS=(
|
||||
# "sahih-bukhari"
|
||||
"sahih-muslim"
|
||||
# "sahih-muslim"
|
||||
# "abu-dawood"
|
||||
# "al-tirmidhi"
|
||||
"al-tirmidhi"
|
||||
# "ibn-e-majah"
|
||||
# "sunan-nasai"
|
||||
# "musnad-ahmad"
|
||||
|
|
|
|||
|
|
@ -265,12 +265,12 @@ class HadithAPIClient(BaseAPIClient):
|
|||
# Process each chapter
|
||||
for chapter in chapters:
|
||||
# logger.warning("Processing chapter", chapter=chapter)
|
||||
if book_slug == 'sahih-muslim':
|
||||
if book_slug in {'sahih-muslim','al-tirmidhi','al-silsila-sahiha','al-tirmidhi'}:
|
||||
chapter_id = chapter.get('chapterNumber')
|
||||
else:
|
||||
chapter_id = chapter.get('id')
|
||||
chapter_number = chapter.get('chapterNumber')
|
||||
|
||||
print(chapter_id, chapter_number, chapter.get('name'))
|
||||
logger.info(
|
||||
"fetching_chapter",
|
||||
book_slug=book_slug,
|
||||
|
|
|
|||
Loading…
Reference in New Issue