官方版

Crawl Sequential URLs

Add a rule to Fiddler with Global scope as follows:

  1. public static ToolsAction("Crawl Sequential URLs")
  2. function doCrawl(){
  3. var sBase: String;
  4. var sInt: String;
  5. sBase = FiddlerObject.prompt("Enter base URL with ## in place of the start integer", "http://www.example.com/img##.jpg");
  6. sInt = FiddlerObject.prompt("Start At", "1");
  7. var iFirst = int.Parse(sInt);
  8. sInt = FiddlerObject.prompt("End At", "12");
  9. var iLast = int.Parse(sInt);
  10. for (var x=iFirst; x<=iLast; x++)
  11. {
  12. //Replace 's' with your HTTP Request. Note: \ is a special character in JScript
  13. // If you want to represent a backslash in a string constant, double it like \\
  14. var s = "GET " + sBase.Replace("##", x.ToString()) + " HTTP/1.0\r\n\r\n";
  15. var b=false;
  16. while(!b){
  17. try{
  18. FiddlerObject.utilIssueRequest(s);
  19. b=true;
  20. }
  21. catch(e){
  22. var iT = Environment.TickCount + 10000;
  23. FiddlerObject.StatusText = "Waiting 10 sec because we have too many requests outstanding...";
  24. while (iT > Environment.TickCount){ Application.DoEvents(); }
  25. }
  26. }
  27. }
  28. }

谷歌翻译版

URL抓取顺序

将规则添加到Fiddler,如下所示:

  1. public static ToolsAction("Crawl Sequential URLs")
  2. function doCrawl(){
  3. var sBase: String;
  4. var sInt: String;
  5. sBase = FiddlerObject.prompt("Enter base URL with ## in place of the start integer", "http://www.example.com/img##.jpg");
  6. sInt = FiddlerObject.prompt("Start At", "1");
  7. var iFirst = int.Parse(sInt);
  8. sInt = FiddlerObject.prompt("End At", "12");
  9. var iLast = int.Parse(sInt);
  10. for (var x=iFirst; x<=iLast; x++)
  11. {
  12. //Replace 's' with your HTTP Request. Note: \ is a special character in JScript
  13. // If you want to represent a backslash in a string constant, double it like \\
  14. var s = "GET " + sBase.Replace("##", x.ToString()) + " HTTP/1.0\r\n\r\n";
  15. var b=false;
  16. while(!b){
  17. try{
  18. FiddlerObject.utilIssueRequest(s);
  19. b=true;
  20. }
  21. catch(e){
  22. var iT = Environment.TickCount + 10000;
  23. FiddlerObject.StatusText = "Waiting 10 sec because we have too many requests outstanding...";
  24. while (iT > Environment.TickCount){ Application.DoEvents(); }
  25. }
  26. }
  27. }
  28. }