commit 146db13d18496c2279aa92d2905cb874fb983d51
parent b37211256d85b94cf3ea41887ce6827e20290904
Author: Dominik Schmidt <das1993@hotmail.com>
Date: Sat, 23 Jan 2016 13:59:14 +0100
Use a static captcha-probe-url.
Don't let the user specify one on the commandline.
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/captcha.d b/captcha.d
@@ -9,6 +9,8 @@ import std.range;
import std.algorithm.searching;
+immutable string probe_url="https://www.facebook.com/Facebook";
+
/**
* Tries to fetch the captcha and set the cookies
*
@@ -18,7 +20,7 @@ int main(string[] args){
auto h=HTTP();
char[] buf;
- h.url=args[1];
+ h.url=probe_url;
h.setUserAgent(FBStream.userAgent);
h.setCookieJar(getCookiePath());
h.onReceive = (ubyte[] data){
@@ -63,7 +65,7 @@ int main(string[] args){
captcha=captcha[0..$-1]; //Exclude '\n'
buf=null;
- h.url=args[1];
+ h.url=probe_url;
h.method=HTTP.Method.post;
h.setPostData(
format(