Guest Posted September 21, 2012 Share Posted September 21, 2012 I need to upload an image to google search by image and then get the variable the page after a search .. This is possible in AutoIt3? If so then how? Link to comment Share on other sites More sharing options...
StringingLong Posted September 21, 2012 Share Posted September 21, 2012 (edited) This has nothing to do with AutoIT. The images in Google search are scraped by Google's own spiders and they determine what shows up when a user does a search. In other words, you don't upload a picture to Google search nor can force it to show. Its under their criteria. To be given the *possibility* of Google including your picture into their search results, you must own a website and have pages with the images in it. However, that does not guarantee that your images will show up in Google search. Edited September 21, 2012 by StringingLong Link to comment Share on other sites More sharing options...
FireFox Posted September 21, 2012 Share Posted September 21, 2012 I need to upload an image to google search by image and then get the variable the page after a search .. This is possible in AutoIt3?If so then how?Hi,You mean dropping an image and then make a search for it?Br, FireFox. Link to comment Share on other sites More sharing options...
Guest Posted September 21, 2012 Share Posted September 21, 2012 (edited) Hi,You mean dropping an image and then make a search for it?Br, FireFox.yes..and then get the results page.like what he did here:but i need it for Google Edited September 21, 2012 by Guest Link to comment Share on other sites More sharing options...
FireFox Posted September 21, 2012 Share Posted September 21, 2012 @gil900 OK, I have not the time right now, so I will keep you in touch. Br, FireFox. Link to comment Share on other sites More sharing options...
Guest Posted September 21, 2012 Share Posted September 21, 2012 @gil900OK, I have not the time right now, so I will keep you in touch.Br, FireFox.This is also a welcome response.I tried without a break and at the end I realized that's the problem:Variable must be of type "Object" stop me..I found this topic: # entry804215And then I realized something was wrong ..I am also very grateful to this response .. At least I know now that someone will help me. Link to comment Share on other sites More sharing options...
FireFox Posted September 21, 2012 Share Posted September 21, 2012 @gil900 I'm not going to use the _IE UDF as long as in my opinion the browser sucks and It's not a furtive way to do it, which also sucks. I will use the WinHTTP UDF or the curl exe, or in "pure" autoit. Br, FireFox. armoros 1 Link to comment Share on other sites More sharing options...
FireFox Posted September 21, 2012 Share Posted September 21, 2012 (edited) This is what I have : #include "WinHttp.au3" ;~ #include <INet.au3> Global $hOpen = _WinHttpOpen() Global $sAddress = "http://www.google.fr/searchbyimage/upload" ;~ ConsoleWrite(_INetGetSource("http://www.google.fr/imghp?sbi=1") & @CRLF) Local $sLocalForm = _ '<form method="POST" enctype="multipart/form-data" action="' & $sAddress & '">' & _ '<input name="image_url">' & _ '<input type="file" name="encoded_image">' & _ '<input type="hidden" name="image_content">' & _ '<input type="hidden" name="filename">' & _ '<input type="hidden" name="num">' & _ '<input type="hidden" name="hl">' & _ '<input type="hidden" name="bih">' & _ '<input type="hidden" name="biw">' & _ '</form>' Local $sRead = _WinHttpSimpleFormFill($sLocalForm, $hOpen, Default, _ "encoded_image", @ScriptDir & "myimg.jpg", _ "num", 10, _ "h1", "fr", _ "bih", 573, _ "biw", 1193) _WinHttpCloseHandle($hOpen) ConsoleWrite($sRead & @CRLF) But I'm not able to make it work... the page is totally made in javascript and I can't retreive the form data because I think that the datas "bih" and "biw" must be right to succeed. Edit : typo. Br, FireFox. Edited September 21, 2012 by FireFox Link to comment Share on other sites More sharing options...
Guest Posted September 21, 2012 Share Posted September 21, 2012 (edited) This is what I have : #include "WinHttp.au3" ;~ #include <INet.au3> Global $hOpen = _WinHttpOpen() Global $sAddress = "http://www.google.fr/searchbyimage/upload" ;~ ConsoleWrite(_INetGetSource("http://www.google.fr/imghp?sbi=1") & @CRLF) Local $sLocalForm = _ '<form method="POST" enctype="multipart/form-data" action="' & $sAddress & '">' & _ '<input name="image_url">' & _ '<input type="file" name="encoded_image">' & _ '<input type="hidden" name="image_content">' & _ '<input type="hidden" name="filename">' & _ '<input type="hidden" name="num">' & _ '<input type="hidden" name="hl">' & _ '<input type="hidden" name="bih">' & _ '<input type="hidden" name="biw">' & _ '</form>' Local $sRead = _WinHttpSimpleFormFill($sLocalForm, $hOpen, Default, _ "encoded_image", @ScriptDir & "myimg.jpg", _ "num", 10, _ "h1", "fr", _ "bih", 573, _ "biw", 1193) _WinHttpCloseHandle($hOpen) ConsoleWrite($sRead & @CRLF) But I'm not able to make it work... the page is totally made in javascript and I can't retreive the form data because I think that the datas "bih" and "biw" must be right to succeed. Edit : typo. Br, FireFox. This is what I have : #include "WinHttp.au3" ;~ #include <INet.au3> Global $hOpen = _WinHttpOpen() Global $sAddress = "http://www.google.fr/searchbyimage/upload" ;~ ConsoleWrite(_INetGetSource("http://www.google.fr/imghp?sbi=1") & @CRLF) Local $sLocalForm = _ '<form method="POST" enctype="multipart/form-data" action="' & $sAddress & '">' & _ '<input name="image_url">' & _ '<input type="file" name="encoded_image">' & _ '<input type="hidden" name="image_content">' & _ '<input type="hidden" name="filename">' & _ '<input type="hidden" name="num">' & _ '<input type="hidden" name="hl">' & _ '<input type="hidden" name="bih">' & _ '<input type="hidden" name="biw">' & _ '</form>' Local $sRead = _WinHttpSimpleFormFill($sLocalForm, $hOpen, Default, _ "encoded_image", @ScriptDir & "myimg.jpg", _ "num", 10, _ "h1", "fr", _ "bih", 573, _ "biw", 1193) _WinHttpCloseHandle($hOpen) ConsoleWrite($sRead & @CRLF) But I'm not able to make it work... the page is totally made in javascript and I can't retreive the form data because I think that the datas "bih" and "biw" must be right to succeed. Edit : typo. Br, FireFox. Link www.google.com/searchbyimage/upload also good .. Have you heard about the plugin "http headers" to the browser - Firefox? This plugin shows the command you send to the site. For example, when I sent that message in this post i send some command. So that base idea. If you can send a request this way so you do not depend on the javacript .. If this is not what you did, then maybe to try it. I'm just giving an idea. Edited September 21, 2012 by Guest Link to comment Share on other sites More sharing options...
Guest Posted September 21, 2012 Share Posted September 21, 2012 I reveal the Google sending command:-----------------------------41184676334rn Content-Disposition: form-data; name="image_url"rn rn rn -----------------------------41184676334rn Content-Disposition: form-data; name="encoded_image"; filename="1.png"rn Content-Type: image/pngrn rn x89PNGrn x1anThis command is to:http://www.google.com/searchbyimage/uploadimage:i hope it is help... Link to comment Share on other sites More sharing options...
Guest Posted September 22, 2012 Share Posted September 22, 2012 (edited) I also have a code of iMacros for Firefox. This is the code: TAB T=1 URL GOTO=http://www.google.com/imghp?hl=en&tab=wi WAIT SECONDS=2 TAG POS=1 TYPE=SPAN ATTR=ID:qbi TAG POS=1 TYPE=A ATTR=TXT:Upload<SP>an<SP>image TAG POS=1 TYPE=INPUT:FILE FORM=ACTION:/searchbyimage ATTR=ID:qbfile CONTENT=D:1.jpg Maybe possible to convert the code to AutoIt3 language. Please help me ... Edited September 22, 2012 by Guest Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now