That's what I went through. The boredom was what was killer. I found that I started reading for fun actually. Never happened in the past. I'd always be playing video games, or looking up P. Now I thoroughly enjoy reading a book when I'm not studying.
Keep a journal going. Every time you get a crave, write about it, and say why you don't need it.
If you find yourself about to look something up, tell yourself "no!" "Don't do it!" Sometimes you have to be aggressive with yourself, like "don't do it you fucking idiot!"and usually this will give you a split second to close out the window. Which will then allow you to walk away from the computer. Then you can go for a walk or something to distract yourself.