• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Java HTTP 403 Response Issue

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm looking to download videos from YouTube. My code works with most video. I can save the videos no problem but for some videos an HTTP response code of 403 is returned. For example all Vevo videos return 403 errors.

I'm pretty sure it is to do with the headers. I've added headers to the request as per Chromes Live HTTP Headers.

This is my code. Can somebody please suggest something I'm missing.

 
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A 403 means "Forbidden"; it is usually returned by a request when authorization fails.
 
Stephen Murray
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, thank you for your response. The video is Coldplay's Viva La Vida which I can access through my browser. As I said in my post I can download most other videos besides ones such as Vevo videos. Are there any other HTTP fields such as Cookies I should be using to get it to work?
 
Bear Bibeault
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess I would use the browser tools to inspect the request that works, and compare it to the request that doesn't work in order to find out what the differences are.
 
Stephen Murray
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have done, that is where those headers came from.
 
Bear Bibeault
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the requests are identical, the response should be identical. There's got to be some difference.
 
And then the flying monkeys attacked. My only defense was this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic