Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using Nuls.PluginBase;
- using Nuls.Core.StepClass;
- using Nuls.Core.StepClass.SpecialFields;
- using Nuls.Core.StepClass.Enums;
- using Nuls.Core.StepClass.LinkFormats;
- using Nuls.Utils.StringTools;
- namespace Nuls.Plugins
- {
- public class Ultraseek : PluginClass
- {
- // Parameterless Constructor - needed for Serialization
- public Ultraseek() : this(null, null)
- {
- }
- public Ultraseek(string targetUrl, List<string> keywords)
- {
- // Add a Footprint so it gets hooked by our Harvester
- FootPrints.AddRange(new string[] { "URL Status \"urlstatusgo.html\"",
- "\"urlstatusgo.html\" \"URL Status\"",
- "Disallowed by URL filter \"urlstatusgo.html\"",
- "Collection \"urlstatusgo.html\"",
- "Relative URL \"urlstatusgo.html\"",
- "Not in any search index \"urlstatusgo.html\"",
- "From the URL Database \"urlstatusgo.html\"",
- "Content-type \"urlstatusgo.html\"",
- "URL hash \"urlstatusgo.html\"",
- "Character encoding \"urlstatusgo.html\"",
- "Referring URL \"urlstatusgo.html\"",
- "Number of hops from root \"urlstatusgo.html\"o",
- "Last response code \"urlstatusgo.html\"",
- "\"Disallowed by URL filter\" \"urlstatusgo.html\"",
- "\"Collection\" \"urlstatusgo.html\"",
- "\"Relative URL\" \"urlstatusgo.html\"",
- "\"Not in any search index.\" \"urlstatusgo.html\"",
- "\"From the URL Database\" \"urlstatusgo.html\"",
- "\"Content-type\" \"urlstatusgo.html\"",
- "\"URL hash\" \"urlstatusgo.html\"",
- "\"Character encoding\" \"urlstatusgo.html\"",
- "\"Referring URL\" \"urlstatusgo.html\"",
- "\"Number of hops from root\" \"urlstatusgo.html\"o",
- "\"Last response code\" \"urlstatusgo.html\"",});
- Url = targetUrl;
- Keywords = keywords;
- }
- public override string Do(string url)
- {
- var trimmedUrl = UrlTrimmer.TrimToCurrentFolder(url);
- var stepPlayer = new StepPlayer(trimmedUrl);
- var targetUrl = String.Format("{0}urlstatusgo.html?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