Find out which one of my installed app open spam links
Possibly it's a background service of any app in your phone which is letting these spam ads in.
To find out the app, what you can do is install Shutapp and enable its service and try to stop apps one by one (these apps will be the apps running in background).
To see the list of running apps, click under the big circle. I use this app for the very same purpose and it also really works well in closing these apps.
Remember, closing apps will disable their notifications like closing WhatsApp will let to no notification of any new message at all until reopening of that app.Hope it helps you.