Skip to content

Missing Attributes #2

@csandrew-dev

Description

@csandrew-dev

If an attribute, such as the description is missing, the script error instead of removing that attribute from the generated json file.

example:
https://developer.apple.com/documentation/appleschoolmanagerapi/errorlinks

uv run schemer.py https://developer.apple.com/documentation/appleschoolmanagerapi/errorlinks ./asm/schema

produces:

================================================================
Title: ErrorLinks
Traceback (most recent call last):
  File "/Users/monty/Documents/Dev/AppleDocParser/schemer.py", line 115, in <module>
    main()
    ~~~~^^
  File "/Users/monty/Documents/Dev/AppleDocParser/schemer.py", line 38, in main
    print("Description:", desc_tag.text)
                          ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'text'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions