Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- using System.Threading;
- using Nuls.AntiCaptcha;
- using Nuls.Core.Items;
- using Nuls.Core.StepClass;
- using Nuls.Core.StepClass.Actions;
- using Nuls.Core.StepClass.Enums;
- using Nuls.Core.StepClass.LinkFormats;
- using Nuls.Core.StepClass.SpecialFields;
- using Nuls.Core.Harvester.Spiders;
- using Nuls.Utils.StringTools;
- using Nuls.PluginBase;
- using System.Web;
- namespace Nuls.Plugins
- {
- public class ASPXRedirects : PluginClass
- {
- public ASPXRedirects()
- : this(null, null, null)
- {
- }
- public ASPXRedirects(string targetUrl, List<string> keywords, IAntiCaptcha antiCaptcha)
- {
- FootPrints.AddRange(new string[] { "\"not responsible for the content of external sites\" \"redirect.aspx\""
- });
- Url = targetUrl;
- Keywords = keywords;
- CaptchaInterface = antiCaptcha;
- }
- public override string Do(string url)
- {
- var trimmedUrl = UrlTrimmer.TrimToCurrentFolder(url);
- var stepPlayer = new StepPlayer(trimmedUrl);
- var targetUrl = System.String.Format("{0}redirect.aspx?url={1}", trimmedUrl, Url);
- var s = new Step();
- s.GoTo(targetUrl);
- s.IsLookupStep = true;
- s.SpecialLookupUrl = targetUrl;
- s.SuccessFullLinkPattern = "href=\"" + Url;
- stepPlayer.Add(s);
- return stepPlayer.PerformSteps();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement