Esempio n. 1
0
 public string GetFriendlyUrlTitle(IRipper w, string url)
 {
     try
     {
         string       webPage      = w.GetWebPage("http://" + url);
         HtmlDocument htmlDocument = new HtmlDocument();
         string       str          = webPage;
         htmlDocument.LoadHtml(str);
         using (IEnumerator <HtmlNode> enumerator = ((IEnumerable <HtmlNode>)htmlDocument.get_DocumentNode().SelectNodes("//meta")).GetEnumerator())
         {
             while (((IEnumerator)enumerator).MoveNext())
             {
                 HtmlNode current = enumerator.Current;
                 if (current.get_Attributes().Contains("property") && !(current.get_Attributes().get_Item("property").get_Value() != "og:title"))
                 {
                     return(current.get_Attributes().get_Item("content").get_Value().Trim().Replace(" • Instagram photos and videos", ""));
                 }
             }
         }
         return((string)null);
     }
     catch (Exception ex)
     {
         return(url);
     }
 }
Esempio n. 2
0
        public ITrPlugin NewInstance(IRipper w, string config)
        {
            InstagramBlog instagramBlog = new InstagramBlog();

            this.TumblrSettings = this.readSettings(config);
            InstagramRipper instagramRipper = new InstagramRipper(this);

            instagramRipper.MyRipper = w;
            InstagramSettings tumblrSettings = this.TumblrSettings;

            instagramRipper.Settings = tumblrSettings;
            this.BlogRipper          = instagramRipper;
            return((ITrPlugin)instagramBlog);
        }
Esempio n. 3
0
        public ITrPlugin NewInstance(IRipper w, string xmlConfig)
        {
            TumblrWebsite tumblrWebsite = new TumblrWebsite();

            this.TumblrSettings = this.method_0(xmlConfig);
            TumblrBlogRipper tumblrBlogRipper = new TumblrBlogRipper(this);

            tumblrBlogRipper.MyRipper = w;
            TumblrSettings tumblrSettings = this.TumblrSettings;

            tumblrBlogRipper.Settings = tumblrSettings;
            this.BlogRipper           = tumblrBlogRipper;
            return((ITrPlugin)tumblrWebsite);
        }
Esempio n. 4
0
 public string GetFriendlyUrlTitle(IRipper w, string url)
 {
     url.Replace("www.", "");
     try
     {
         TumblrBlogRipper tumblrBlogRipper = new TumblrBlogRipper(this);
         tumblrBlogRipper.MyRipper = w;
         string url1 = url;
         return(tumblrBlogRipper.GetTitle(url1));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Esempio n. 5
0
 public bool ValidateUrl(IRipper w, string url)
 {
     return(url.Contains("instagram.com"));
 }
Esempio n. 6
0
        private static void smethod_0(IRipper iripper_0, ref List <Cookie> list_0, string string_0, string string_1)
        {
            string url = "https://www.tumblr.com/svc/account/register";

            iripper_0.PostWebPage(url, new NameValueCollection()
            {
                {
                    "determine_email",
                    string_1
                },
                {
                    "user[email]",
                    ""
                },
                {
                    "user[password]",
                    ""
                },
                {
                    "tumblelog[name]",
                    ""
                },
                {
                    "user[age]",
                    ""
                },
                {
                    "context",
                    "login"
                },
                {
                    "version",
                    "STANDARD"
                },
                {
                    "follow",
                    ""
                },
                {
                    "redirect_to",
                    "/dashboard"
                },
                {
                    "http_referer",
                    "https://www.tumblr.com/login?redirect_to=%2Fdashboard"
                },
                {
                    "form_key",
                    string_0
                },
                {
                    "seen_suggestion",
                    "0"
                },
                {
                    "used_suggestion",
                    "0"
                },
                {
                    "used_auto_suggestion",
                    "0"
                },
                {
                    "about_tumblr_slide",
                    ""
                },
                {
                    "action",
                    "signup_determine"
                },
                {
                    "tracking_url",
                    "/login"
                },
                {
                    "tracking_version",
                    "modal"
                },
                {
                    "random_username_suggestions",
                    "[\"DecadentAlpacaPerson\",\"CertainYouthNight\",\"BigAvenueObservation\",\"DarkPandaCherryblossom\",\"CyberKoalaLlama\"]"
                }
            }, ref list_0);
        }
Esempio n. 7
0
        private static List <Cookie> smethod_1(IRipper iripper_0, string string_0, string string_1)
        {
            string        url          = "https://www.tumblr.com/login";
            List <Cookie> list         = new List <Cookie>();
            string        webPage      = iripper_0.GetWebPage(url, ref list);
            HtmlDocument  htmlDocument = new HtmlDocument();
            string        str          = webPage;

            htmlDocument.LoadHtml(str);
            string string_0_1 = string.Empty;

            using (IEnumerator <HtmlNode> enumerator = ((IEnumerable <HtmlNode>)htmlDocument.get_DocumentNode().SelectNodes("//input")).GetEnumerator())
            {
                while (((IEnumerator)enumerator).MoveNext())
                {
                    HtmlNode current = enumerator.Current;
                    if (current.get_Attributes().Contains("name") && current.get_Attributes().get_Item("name").get_Value().Equals("form_key"))
                    {
                        string_0_1 = current.get_Attributes().get_Item("value").get_Value();
                    }
                }
            }
            TumblrLogin.smethod_0(iripper_0, ref list, string_0_1, string_0);
            iripper_0.PostWebPage(url, new NameValueCollection()
            {
                {
                    "determine_email",
                    string_0
                },
                {
                    "user[email]",
                    string_0
                },
                {
                    "user[password]",
                    string_1
                },
                {
                    "tumblelog[name]",
                    ""
                },
                {
                    "user[age]",
                    ""
                },
                {
                    "context",
                    "other"
                },
                {
                    "version",
                    "STANDARD"
                },
                {
                    "follow",
                    ""
                },
                {
                    "http_referer",
                    "https://www.tumblr.com/logout"
                },
                {
                    "form_key",
                    string_0_1
                },
                {
                    "seen_suggestion",
                    "0"
                },
                {
                    "used_suggestion",
                    "0"
                },
                {
                    "used_auto_suggestion",
                    "0"
                },
                {
                    "about_tumblr_slide",
                    ""
                },
                {
                    "random_username_suggestions",
                    "[\"DecadentAlpacaPerson\",\"CertainYouthNight\",\"BigAvenueObservation\",\"DarkPandaCherryblossom\",\"CyberKoalaLlama\"]"
                }
            }, ref list);
            return(list);
        }
Esempio n. 8
0
 public static List <Cookie> Login(IRipper myRipper, string username, string password)
 {
     return(TumblrLogin.smethod_1(myRipper, username, password));
 }
Esempio n. 9
0
 public bool ValidateUrl(IRipper w, string url)
 {
     return(true);
 }