They are basically the sistergroup. When the term dinosaur was coined, the most distantly related dinosaurs were taken as reference and everything and everything "between" them was defined as a dinosaur. Pterodactyls weren't known back than, that's basically the reason they are excluded
Please do not listen to this Podcast!!!
You will loose all your friends and family by dumping a metric fuckton of completely out-of-context dino-facts all over your social life.
Trust me, its not gonna be pretty.
I listened to a few episodes and little plastic dinosaurs started appearing in our living room.
Also my three-year-old started speaking in tongues (says my granny because apparently she doesn't now what a Micropachycephalosaurus is)
Dinosaurs are currently defined as anything that descends from the most recent common ancestor of triceratops and the pigeon.
Which, as others pointed out is mostly due to dinosaurs being originally defined before we found the first pterodactyl.
If you want to refer to dinosaurs and pterodactyls, you could use avemetatarsalians (anything more closely related to birds than crocs) or ornithodirans (dinosaurs + pterosauromorphs).
Also fun is that there's a number of crocodillians that look suspiciously dinosaur- like, like Shuvosaurus. Convergent evolution is wild.