So if you're stuck in an infinite cloudflare validation, it means that you are detected as bot, or something is off with your browser... Example: You are using a cloudflare bypass extension. What i found works is to use an undetected browser on your bot... puppeteer-real-browser in Nodejs and Seleniumbase in python seems to work for me, not all the time but they get the job done.
Hope it helps.