sandboxnu / major-scraper

Scraping Northeastern's Academic Catalog for use in GraduateNU.
GNU General Public License v3.0
3 stars 0 forks source link

Extra Brackets Outputted in OR on Computer_Science_and_Behavioral_Neuroscience_BS #10

Closed AlpacaFur closed 8 months ago

AlpacaFur commented 9 months ago

Summary

The following major is outputted into the incorrect format on line 347 (the courses property should not have another nested array in it): degrees/Major/2023/computer-information-science/Computer_Science_and_Behavioral_Neuroscience_BS/parsed.json

You can see the nested array brackets highlighted below:

This is likely a parser postprocessor edge case issue (in src/parse/postprocess.ts).

{
  "type": "OR",
  "courses": [
-   [
      {
        "type": "AND",
        "courses": [
          {
            "subject": "PT",
            "classId": 5410,
            "description": "Functional Human Neuroanatomy",
            "type": "COURSE"
          },
          {
            "subject": "PT",
            "classId": 5411,
            "description": "Lab for PT 5410",
            "type": "COURSE"
          }
        ]
      }
-   ],
    {
      "type": "COURSE",
      "classId": 3200,
      "subject": "PSYC"
    }
  ]
}

Tasks