for me it was learning to write pseudocode first. when you want to build a scraper or some automation tool, don't just start typing code right away. write down the steps in plain english first. step 1 go to site, step 2 grab the cookies, etc. it saves so much time because you solve the logic before fighting the syntax.
also... comment your code like you are explaining it to an idiot. in three months you will not remember why you wrote that specific regex or nested loop and you'll waste hours trying to reverse engineer your own script.