To start, no it doesn't work. If anyone has told you that you can, they're very misguided!!
The issue is that you won't actually understand the grammar your using or what context its actually being used in. You maybe can learn a European language this way because the way the languages express themselves are pretty consistent and (for the most part) the syntax is similar.
The Japanese language expresses itself very differently. For the sake of example, when giving someone an invitation to do something, you do it in the negative. (This is because it gives the person your speaking to an easy way to say no if they so choose and the Japanese like to be indirect with their language.) A lot of Japanese sentence structures are just a case of memorising them and trying to understand the context in which they are used. This is simply because you can't translate Japanese literally, it looks like total gibberish if you do! So this swings back round to the fact that you probably wouldn't really understand the technical side of what is being said. Or even know how do read/write it in kana let alone kanji...
Another example of a problem with this idea: when translating a Japanese sentence you use your particles as your guide, they tell you what each bit of your sentence is doing essentially. We don't have that in English. At all. Nothing similar. You maybe able to memorise sentences and regurgitate them, but you won't be able to construct new sentences without this knowledge. Furthermore you wouldn't be able to distinguish between keigo, polite form and plain form and therefore may speak in the wrong context. (Also these forms have their own verb conjugations and uses as well, beginning to see the picture yet :/)
So how can you actually use these forms of media as a learning aid? (Emphasis on the aid.)
Understanding grammar => seeing it used in a 'real life' situation => understanding use.
This is something I do myself a lot, not only because I love watching anime and drama. I find that when I'm trying to learn a new sentence structure, or trying to get my head around the context that its being used in conversation etc I find watching an episode of something normally helps. (Drama tends to be better in my experience.) I find that the things I know grab my attention and then I can hear how its being used, and with subtitles see how thats been translated. (Sometimes one grammar structure may have a multitude of different uses, so subtitles are good for seeing how it translates in a particular context.)
It will also help your hearing, as you will hear many people with different tones of voice speak. Sometimes I also try and speak back lines, this will help develop a better pronunciation and accent. So as you can see, its not all doom and gloom, it can be really helpful if you utilise it correctly! With manga and books you can get a Japanese copy and an English copy and compare translations. It will help your kanji reading and reading fluency too. If you find something online you want to read, there is a page on here with useful websites, and some of them are read along dictionary type websites. Check it out, you may find something useful!
To tie this off, yes by all means use it to help you learn. BUT only do so along side a structured learning programme or 'proper study'. By just watching/listening your passively learning, but it will only help if you've actively learnt something to begin with.
See you! Naru hime xx