For example:
I do not want the "dog" appearing in my search results
https://www.google.com/search?q=cat+-dog
https://www.google.com/search?q=baseball+-dog
I'm new to Fiddler,So please give me a good hint.
Thanks
14 Answers, 1 is accepted
See http://blogs.telerik.com/fiddler/posts/13-07-15/understanding-fiddlerscript for a good introduction to FiddlerScript, including details of how to manipulate the fullUrl property.
Regards,
Eric Lawrence
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
I want to know,if I can hide the words in the search box
http://i.stack.imgur.com/P3ZTz.jpg
Thanks.
Regards,
Eric Lawrence
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
I know Fiddler can do this very easily,but I don't know where to start from? This task is important to me.
Thank you
Looking forward to your reply.
Use the utilSetResponseBody method to assign the body of the response to the string of your choosing.
Regards,
Eric Lawrence
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Another thing to be aware of is that the URL part including and after the # is called the "URL Fragment". URL Fragments are kept on the clientside and are never sent to the server. They're typically examined by clientside javascript (e.g. AJAX code) to perform operations without navigating the main page.
Regards,
Eric Lawrence
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Another question:I’ve scripted it to append a string to the URL and when I keep issuing the request it keeps appending over and over again
In OnBeforeRequest function
if (oSession.uriContains("www.youtube.com/results?search_query=")) {
var sText = "+test1+test2+test3";
oSession.fullUrl = oSession.fullUrl + sText;
}
visual info: http://imgur.com/oRp24Ux,RvxtQTO,LniAECS#0
How can I fix this ?
Thank you for your time
To prevent adding text to a string multiple times, one approach would be to check to see whether that text is already in the string before adding it.
Regards,
Eric Lawrence
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Really sorry to bother you,
I will keep it small,Can I add JQuery code to fiddler?
var keywordInput = $('input[name="-adult"]');
$('input[name="SearchButton"]').click(function() {
window.location = 'http://example.com?kwd=' + encodeURIComponent(keywordInput.val());
});
Thank you for your time.
You can't use jQuery in Fiddler itself (e.g. in the script) since jQuery expects to run in the browser, and Fiddler isn't a browser.
Regards,
Eric Lawrence
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
I tried it several times, but no luck. Please help me
if (oSession.uriContains("www.youtube.com/results?search_query="))
{
var str = oSession.fullUrl;
var sAppend = "+test1+test2+test3";
if (oSession.fullUrl.indexOf(sAppend, str.length - sAppend.length) !== -1)
{
oSession.fullUrl = str + sAppend;
}
}
The problem with this code is that it appends string to the very end of the URL
if (oSession.uriContains("&q="))
{
var str = oSession.fullUrl;
var sAppend = "+test1+test2+test3";
if (!oSession.uriContains(sAppend))
{
oSession.fullUrl = str + sAppend;
}
}
So, How can I place +test1+test2+test3 right next to search?q= ?
Example:www.google.co.uk/search?site=webhp&source=hp&q=+test1+test2+test3&aqs=chrome..69i57.1582j0j4&sourceid=chrome&es_sm=122&ie=UTF-8
I tried the below code, but it takes me to google+ site
if (oSession.uriContains("&q="))
{
var str = oSession.fullUrl.IndexOf("&q=") ;
var sAppend = "+test1+test2+test3";
if (!oSession.uriContains(sAppend))
{
oSession.fullUrl = oSession.fullUrl.Substring( 0,oSession.fullUrl.IndexOf("&q=")) + sAppend ;
}
}
Where did I go wrong?
Thank you for your time.
if (oSession.uriContains("search?q="))
{var str = oSession.fullUrl;
var sAppend = "+test1+test2+test3";
if (!oSession.uriContains(sAppend))
{
oSession.fullUrl = str.replace( "search?q=","search?q=+test1+test2+test3" );
}
}
This code works,but when I click Next page in google. It browser freezes completely. Any ideas?