WikiCrawler/Utility/CategoryTranslation.cs
/// <summary>
/// Look for the specified category. Return the actual category used.
/// </summary>
Look for the specified category. Return the actual category used.
Look for the specified category . Return the actual category used .
public static MediaWiki.Article TryFetchCategory(MediaWiki.Api api, string cat)
		{
			cat = MediaWiki.WikiUtils.GetCategoryCategory(cat);
			MediaWiki.Article extant;
			if (s_extantCategories.TryGetValue(cat, out extant))
			{
				return extant;
			}
			Console.WriteLine("FETCH: '" + cat + "'");
			MediaWiki.Article art = GetCategory(api, ref cat);
			art = ProcessCategoryRedirects(api, art);
			s_extantCategories[cat] = art;
			return art;
		}
public static MediaWiki . Article TryFetchCategory ( MediaWiki . Api api , string cat ) { cat = MediaWiki . WikiUtils . GetCategoryCategory ( cat ) ; MediaWiki . Article extant ; if ( s_extantCategories . TryGetValue ( cat , out extant ) ) { return extant ; } Console . WriteLine ( " " + cat + " " ) ; MediaWiki . Article art = GetCategory ( api , ref cat ) ; art = ProcessCategoryRedirects ( api , art ) ; s_extantCategories [ cat ] = art ; return art ; }
Look for the specified category.
Look for the specified category .
// preprocess name
api
MediaWiki.Api
cat
string