Need help to build http request for yoututbe video upload - http

Let me mention it first that I am a learner at building HTTP Requests. I am trying to examine HTTP traffic and how it works. I had some luck with loging in successfully by getting the values of various tokens from the page and passing them as parameters :
GALX, dsh, and bgresponse
to :
https://accounts.google.com/ServiceLoginAuth
with parameters:
continue=$continue&service=youtube&dsh=$dsh&hl=en_US&GALX=$GALX&pstMsg=1&dnConn=&checkConnection=youtube:1000:1&checkedDomains=youtube&timeStmp=&secTok=&_utf8=$_utf8&bgresponse=$bgresponse&Email=$Email&Passwd=$Password&signIn=Sign in&PersistentCookie=yes&rmShown=1
Now I am stuck at trying to build the HTTP Request to upload a video to Youtube. Apart from the video file what parameters do I need to pass to upload a video to Youtube?
Can anyone please help me build the HTTP Request?
Any help will be highly appreciated.
Thanks in advance.
Praney

I would recommend to use Google's Resumable Upload guide. It shows the HTTP requests you need, with a simple example. It was enough for me to get it working, but since Friday evening I am encountering a "503 : Service Unavailable" error, which should mean the Youtube API service is having some issues (although it might be because I did something wrong).

Related

How can I get the source of a HTTP request?

The referer header does not always provide the full url of the site spawning the http request, and I would like to know if there is any way I could figure out the source url of the site that is making the request.
I am currently using OWASP ZAP as a proxy, but am unable to trace some of the http requests back to the source site due to the incomplete referer.
Try searching for the full URL in the ZAP Search tab. If that doesnt work try searching for just the path.
If the URL is generated by JavaScript then that might not work.
Depending on how you are exploring the app you may be able to work back through the history and work it out by a process of elimination, but that could take a while...

Scraping Websites via Google Cached Pages pages has been blocked

I'm trying to create a Service that Scraping websites by using Google Cached Pages.
Example
https://webcache.googleusercontent.com/search?q=cache:nike.com
The Response that I get is the HTML from Google cache, which is an older version of the Nike site.
And it works fine as long as I run it locally on my computer,
but when I deploy to google cloud platform, there I use porxy server
I get a 403 error that I can not access the information through a porxy server
Example of response from proxy server
433. That’s an error.Your client does not have permission to get URL /s
earch?q=cache:http://nike.com from this server. (Client IP address: XX.XXX.XX.XXX)<br
Please see Google's Terms of Service posted at
https://policies.google.com/terms If you believe that you
have received this response in error, please report your
problem. However, please make sure to take a look at our Terms of
Service (http://www.google.com/terms_of_service.html). In your email,
please send us the entire code displayed below. Please also
send us any information you may know about how you are performing your
Google searches-- for example, "I' m using the Opera browser on Linux
to do searches from home. My Internet access is through a dial-up
account I have with the FooCorp ISP." or "I'm using the Konqueror
browser on Linux t o search from my job at myFoo.com. My machine's IP
address is 10.20.30.40, but all of myFoo' s web traffic goes through
some kind of proxy server whose IP address is 10.11.12.13." (If y ou
don't know any information like this, that's OK. But this kind of
information can help us track down problems, so please tell us what
you can.)We will use all this information to diagnose the
problem, and we'll hopefully have you back up and searching with
Google agai n quickly! Please note that although we read all
the email we receive, we are not always able to send a personal
response to each and every email. So don't despair if you don't hear
back from u s! Also note that if you do not send us the
entire code below, we will not be able to help
you.Best wishes,The Google
Article that talks about the problem https://proxyserver.com/web-scraping-crawling/scraping-websites-via-google-cached-pages/
How can I solve this problem, and run requests from the cloud as well without being blocked? Add parameters?
Thanks :)
I guess that you should add a property in the header of your http request
for example :
URL u = new URL("https://www.google.com//search?q=c");
URLConnection c = u.openConnection();
c.setRequestProperty("User-Agent", "MSIE 7.0");
or
HttpRequest request =HttpRequest.newBuilder(new URI("https://www.google.com//search?q=c")).header("User-Agent", "MSIE 7.0").GET().build();
// note to change the URI
this two examples are in Java but the same concept is applied in all environments I guess
hope that was helpfull

Change web html content/Run bash script on http request

Disclaimer: I am not good at understanding http requests, so please bear with me
I am trying to change the content of an html web page whenever an http GET/POST request is made. It would work something like this:
What I want to accomplish
When my phone is charging, it is going to send an http request to the web server. The web server is going to change the content of the webpage to say something like "Phone is charging."
What I've done so far
I managed to send an HTTP request from my phone to the server every time the phone connects to a charger, I just don't know what to do with the http request that arrives to the server.
Thanks ahead of time!
EDIT: I figured out, according to #LawrenceCherone (thanks Lawrence!) that I can't do this with a static html page and just nginx. He said that I have to use a scripting language. Does bash work for this? Or should I learn something like python, PHP or something else?
I can't find any tutorials online for what I am trying to accomplish for some reason. Haven't seen any tutorials on how to 'react' to a POST request

How to call php through c# using API?

I am trying to call a php website through API, which gives the below Error 403.
Kindly check my code below. If anyone has a solution kindly help me.
I guess your request is true, but the website detects that an application tries to get to website and blocks the request to stop scrapping website.
If you want to pass the server filter, I think you should check a request to this website from a browser and then add the browser headers to your request so the server assume it as a browser and will accept it.

Find Site from HTTP Request

Is there a way to go through a series of request and see what pages they are coming from? I am getting all HTTP requests sent from my PC. I am trying to see if there is a way in which I can just find out the main request. Like if a page has images on it, when the images request is sent, is there a way to see if the images are coming from another page using just HTTP requests. I don't know if I explained this well enough, so please ask any questions. I don't know if there is a way to do this, but I hope there is. Thanks!
If you're using Windows: Fiddler.

Resources