title: 403 Forbidden when downloading an FLV directly from YouTube
body: <p>I'm currently writing a Java application which will download any video and convert it to MP3 (I know there's a ton of similar stuff out there, this is just a bit of a learning experience.)</p>
  
  <p>I'm currently at the point where it retrieves the list of formats and URLs, and it downloads the videos in MP4 format just fine (the only thing it does to achieve that is directly download the URL given in the stream format map.)</p>
  
  <p>However, youtube gives me a 403 forbidden error whenever I try to download an FLV video (which is quite a large issue since a lot of videos are only available in FLV format.)
  After some quick inspection using chrome developer tools it turns out there's a cookie called ACTIVITY which is being sent to the server when starting the actual video download, and the value is very similar to a timestamp received from the original call to /watch, only 3 digits more accurate (so that would be milliseconds). I'm not sure if this is the problem; could be generate_204, a request that also caught my attention in the chrome developer tools.</p>
  
  <p>Please don't point me to complicated unreadable Python/etc. examples. I strongly dislike Python and I'm not at the level where I'm able to fluently read someone else's code (especially if it's large and complicated ;) yet. Thanks.</p>
  
  <p><strong>tl;dr - What else is there to get youtube to send me my FLV instead of throwing a 403 forbidden? Does it have to do with cookies? generate_204? etc..</strong></p>