parse.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. using System.Text;
  2. using dodohold.core;
  3. using System.Text.RegularExpressions;
  4. using System.Net;
  5. using System.Linq;
  6. using System.Security.Cryptography;
  7. using TencentCloud.Ecm.V20190719.Models;
  8. using System.Diagnostics;
  9. using static dodohold.core.ZTOExpress.CreateOrderArgs;
  10. namespace molilian.core
  11. {
  12. public partial class AlimamaPlus
  13. {
  14. private string _accountName;
  15. private int _accountId;
  16. private string _company;
  17. private string _tb_token;
  18. private string _floorId;
  19. private string _refpid;
  20. private string _user_agent;
  21. private string _cookies;
  22. private WebProxy? _proxy = null;
  23. private string _api;
  24. private int _api_id = 0;
  25. public TkConfigDTO _config;
  26. private static string _end_point;
  27. private static TkPoolDTO _account;
  28. static Random _random = new Random();
  29. public static string _url_pattern = @"https?://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]";
  30. static AlimamaPlus()
  31. {
  32. _end_point = Environment.GetEnvironmentVariable("EndPoint");
  33. }
  34. public AlimamaPlus(TkPoolDTO account)
  35. {
  36. // string accountName, string tb_token, string floorId, string refpid,
  37. // string cookies, string user_agent, string nodeName
  38. _config = TkConfigCore.Get();
  39. _account = account;
  40. _accountId = account.id;
  41. _accountName = account.name;
  42. _company = account.company;
  43. _tb_token = account.tb_token;
  44. _floorId = account.floorId;
  45. _refpid = account.refpid;
  46. _cookies = account.cookies;
  47. _user_agent = account.user_agent;
  48. if (!string.IsNullOrEmpty(account.nodeName))
  49. {
  50. _proxy = ProxyNodesCore.GetOne(account.nodeName);
  51. }
  52. _api = account.api;
  53. _api_id = account.api_id;
  54. }
  55. public bool ShouldIgnoreOtherAff(string content)
  56. {
  57. TkDataDTO result = new();
  58. //(_, _, var link_type, _) = InternalTextProcessing(content, ref result);
  59. InternalTextProcessing(content, ref result);
  60. return result.link_type == LinkTypeEnum.other_aff;
  61. }
  62. public TkDataDTO UnionParse(string content, ref TkDataDTO result)
  63. {
  64. InternalTextProcessing(content, ref result);
  65. //(result.success, result.content, result.link_type, result.shortLinkurl) = InternalTextProcessing(content,ref result);
  66. if (result.link_type == LinkTypeEnum.other_aff)
  67. {
  68. result.channel = TkChannelEnum.tb;
  69. result.channel_type = ChannelTypeEnum.tb;
  70. result.link_type = LinkTypeEnum.unknown;
  71. result.success = false;
  72. result.message = "放弃转链";
  73. result.reason = "其他推广链接";
  74. result.subCode = TkSubCodeEnum.OtherPromo;
  75. result.accountName = string.Empty;
  76. result.content = content;
  77. result.deeplink_url = GetDeeplink(null);
  78. result.itemName = GetTitle(content);
  79. }
  80. else
  81. {
  82. //处理过后的正文 用于转链
  83. if (result.success) content = result.content;
  84. result = alimamaParse(content, result);
  85. }
  86. result.content = content;
  87. result.link_type = result.link_type;
  88. return result;
  89. }
  90. public async Task<TkDataDTO> UnionParseAsync(string content, TkDataDTO result,
  91. CancellationToken cancellationToken = default,
  92. Dictionary<string, long> swData = null)
  93. {
  94. result.itemName = "点击打开淘宝APP";
  95. result = await InternalTextProcessingAsync(content, result, cancellationToken, swData);
  96. if (result.link_type == LinkTypeEnum.other_aff)
  97. {
  98. //============================== 其他推广链接 ==============================
  99. result.channel = TkChannelEnum.tb;
  100. result.channel_type = ChannelTypeEnum.tb;
  101. result.link_type = LinkTypeEnum.other_aff;
  102. result.success = false;
  103. result.message = "放弃转链";
  104. result.reason = "其他推广链接";
  105. result.subCode = TkSubCodeEnum.OtherPromo;
  106. result.accountName = string.Empty;
  107. result.content = content;
  108. result.deeplink_url = GetDeeplink(null);
  109. //result.itemName = GetTitle(content);
  110. return result;
  111. }
  112. //处理过后的正文 用于转链
  113. if (!result.success)
  114. {
  115. switch (result.link_type)
  116. {
  117. case LinkTypeEnum.profile:
  118. case LinkTypeEnum.live:
  119. case LinkTypeEnum.video:
  120. case LinkTypeEnum.note:
  121. case LinkTypeEnum.goods:
  122. result.reason = string.Empty;
  123. break;
  124. default:
  125. result.reason = "非标准链接";
  126. result.subCode = TkSubCodeEnum.NonStdLink;
  127. return result;
  128. }
  129. }
  130. //============================== 放弃转链-地区过滤 ==============================
  131. bool is_ignore2 = FlowControlIgnoreRequest(out string reason);
  132. if (is_ignore2)
  133. {
  134. result.success = false;
  135. result.message = "放弃转链";
  136. result.reason = reason;
  137. result.subCode = TkSubCodeEnum.TrafficCtrl;
  138. return result;
  139. }
  140. result = await alimamaParseAsync(result.content, result, cancellationToken);
  141. if (!result.success)
  142. {
  143. result.itemName = "点击打开淘宝APP";
  144. }
  145. if (string.IsNullOrEmpty(result.itemName) || result.link_type == LinkTypeEnum.profile)
  146. {
  147. result.itemName = "点击打开淘宝APP";
  148. }
  149. return result;
  150. }
  151. public static string ReplaceUrls(string content, string shortLink)
  152. {
  153. if (string.IsNullOrEmpty(content) || string.IsNullOrEmpty(shortLink)) return content;
  154. string result = content;
  155. Regex regex = new(_url_pattern);
  156. MatchCollection matches = regex.Matches(content);
  157. foreach (Match m in matches.Cast<Match>())
  158. {
  159. string url = m.Value;
  160. if (url.Contains("https://s.tb.cn/") ||
  161. url.Contains("http://s.tb.cn/") ||
  162. url.Contains("http://m.tb.cn/") ||
  163. url.Contains("http://m.tb.cn/"))
  164. {
  165. result = result.Replace(url, shortLink);
  166. }
  167. }
  168. return result;
  169. }
  170. public static string RemoveUrls(string content)
  171. {
  172. if (string.IsNullOrEmpty(content)) return content;
  173. string result = content;
  174. Regex regex = new(_url_pattern);
  175. MatchCollection matches = regex.Matches(content);
  176. foreach (Match m in matches.Cast<Match>())
  177. {
  178. string url = m.Value;
  179. result = result.Replace(url, string.Empty);
  180. }
  181. return result;
  182. }
  183. public static string GetLink(string content)
  184. {
  185. if (string.IsNullOrEmpty(content)) return content;
  186. //string pattern = @"https?:\/\/?([\da-z\.-]+)\.([a-z]{2,6})(:\d{1,5})?([\/\w\.-]*)*\/?(#[\S]+)?(\?[\S]+)?";
  187. Regex regex = new(_url_pattern);
  188. MatchCollection matches = regex.Matches(content);
  189. string result = string.Empty;
  190. if (matches.Count > 0)
  191. {
  192. result = matches[^1].Value; // 返回第一个匹配到的 URL
  193. }
  194. result = result.Replace("&nbsp;", "");
  195. return result;
  196. }
  197. public static string GetTaobaoLink(string content)
  198. {
  199. if (string.IsNullOrEmpty(content)) return content;
  200. string result = content;
  201. string pattern = @"(https?://(?:[\w-]+\.)*(?:tb\.cn|taobao\.com|juhuasuan\.com|tmall\.com|tmall\.hk)(?:/[a-zA-Z0-9\-\._~:/?#[\]@!$&'()*+,;=%]*)?)";
  202. Regex regex = new(pattern, RegexOptions.IgnoreCase);
  203. MatchCollection matches = regex.Matches(content);
  204. if (matches.Count > 0)
  205. {
  206. return matches[^1].Value; // 返回第一个匹配到的 URL
  207. }
  208. return string.Empty;
  209. }
  210. public static string GetDeeplink(string url)
  211. {
  212. if (string.IsNullOrEmpty(url)) return "tbopen://m.taobao.com/tbopen/index.html";
  213. string result = $"tbopen://m.taobao.com/tbopen/index.html?action=ali.open.nav&module=h5&h5Url={url.UrlEncode()}";
  214. //string result = $"tbopen://m.taobao.com/tbopen/index.html?action=ali.open.nav&module=h5&bootImage=0&afcPromotionOpen=false&bc_fl_src=h5_huanduan&source=slk_dp&h5Url={url.UrlEncode()}";
  215. return result;
  216. }
  217. public static string GetTitle(string content)
  218. {
  219. if (string.IsNullOrEmpty(content)) return string.Empty;
  220. string url = GetLink(content);
  221. if (!string.IsNullOrEmpty(url)) content = content.Replace(url, string.Empty);
  222. content = content.Replace("点击链接直接打开 或者 淘宝搜索直接打开", string.Empty).Trim();
  223. string[] words = Regex.Split(content, @"\s+");
  224. string word = words[^1];
  225. word = word.TrimStart('「').TrimEnd('」');
  226. return word;
  227. }
  228. public static bool IgnoreRegionIncluded(string _ignoreRegions, string? ipInfo, out string regionInfo)
  229. {
  230. regionInfo = string.Empty;
  231. if (string.IsNullOrEmpty(_ignoreRegions) || string.IsNullOrEmpty(ipInfo)) return false;
  232. string[] parts = ipInfo.Split('|');
  233. string countryInfo = null;
  234. if (parts.Length >= 4)
  235. {
  236. countryInfo = parts[0];
  237. regionInfo = parts[3];
  238. }
  239. if (string.IsNullOrEmpty(regionInfo)) return false;
  240. if (string.IsNullOrEmpty(countryInfo)) return false;
  241. string[] ignoreRegions = _ignoreRegions.Split('|');
  242. if (ignoreRegions.Contains(regionInfo)) return true;
  243. if (ignoreRegions.Contains(countryInfo))
  244. {
  245. regionInfo = countryInfo;
  246. return true;
  247. }
  248. foreach (var region in ignoreRegions)
  249. {
  250. if ("海外".Equals(region) && !"中国".Equals(countryInfo) && !"0".Equals(countryInfo))
  251. {
  252. regionInfo = "海外";
  253. return true;
  254. }
  255. }
  256. return false;
  257. }
  258. public static async Task<bool> OtherPlatformAsync(string content)
  259. {
  260. try
  261. {
  262. //腾讯会议
  263. string wemeetId = await ToolParsePlus.GetWemeetIdAsync(content);
  264. if (!string.IsNullOrEmpty(wemeetId)) return true;
  265. //百度网盘
  266. string surl = string.Empty, pwd = string.Empty;
  267. _ = ToolParsePlus.GetPanLink(content, ref surl, ref pwd);
  268. if (!string.IsNullOrEmpty(surl)) return true;
  269. //JD
  270. string url = JdUnionPlus.GetLink(content);
  271. var urlType = JdUnionPlus.GetLinkType(url, out _, out _);
  272. if (urlType != LinkTypeEnum.unknown) return true;
  273. //DY
  274. url = DyUnionPlus.GetLink(content);
  275. urlType = DyUnionPlus.GetLinkType(content, url);
  276. if (urlType != LinkTypeEnum.unknown) return true;
  277. }
  278. catch { }
  279. return false;
  280. }
  281. public static bool MatchRegexes(string text, List<string> extended)
  282. {
  283. text = RemoveUrls(text);
  284. string special_symbols = $"\\$\\(\\)\\/\\#\\&\\<\\>฿¢¥¥$🗝₰₵₲¤₪₴€₤£₳《¢💰🔑🎵✔💲🔐📲";
  285. string[] base_patterns =
  286. [
  287. $@"(.*?\d{{2}}\s[a-zA-Z]{{2}}\d{{4}}\s.*?[{special_symbols}]+[a-zA-Z0-9\s]+[{special_symbols}]).*",
  288. $@"[{special_symbols}]+\s*([a-zA-Z]{{1,2}}\d{{2,4}}\s[a-zA-Z0-9]{{11}}|[a-zA-Z0-9]{{11}}[a-zA-Z]{{1,2}}\d{{2,4}}\s|[a-zA-Z0-9]{{11}})\s*[{special_symbols}]+",
  289. @"🍑♭ɑ◑下单|Tao宝"
  290. ];
  291. List<string> mergedArray = extended.Union(base_patterns).ToList();
  292. /*
  293. (.*?\\d{2}\\s[a-zA-Z]{2}\\d{4}\\s.*?[\\$\\(\\)\\/\\#\\&\\<\\>฿¢¥¥$🗝₰₵₲¤₪₴€₤£₳《¢💰🔑🎵✔💲🔐📲]+[a-zA-Z0-9\\s]+[\\$\\(\\)\\/\\#\\&\\<\\>฿¢¥¥$🗝₰₵₲¤₪₴€₤£₳《¢💰🔑🎵✔💲🔐📲])).*\n[\\$\\(\\)\\/\\#\\&\\<\\>฿¢¥¥$🗝₰₵₲¤₪₴€₤£₳《¢💰🔑🎵✔💲🔐📲]+\\s*([a-zA-Z]{1,2}\\d{2,4}\\s[a-zA-Z0-9]{11}|[a-zA-Z0-9]{11}[a-zA-Z]{1,2}\\d{2,4}\\s|[a-zA-Z0-9]{11})\\s*[\\$\\(\\)\\/\\#\\&\\<\\>฿¢¥¥$🗝₰₵₲¤₪₴€₤£₳《¢💰🔑🎵✔💲🔐📲]+\n🍑♭ɑ◑下单|Tao宝
  294. 【3瓶】恩威万蓝莓叶黄素酯软糖儿童成人上班族如酸涩肿胀可服用,<z5TYWAblvTw >:// HU7709,打開/
  295. 置顶小助手,方便下次查询\r\n1★【劵】无\r\n2★【返.佣】 0.29圆 \r\n3★【付款.价】24.9 圆\r\n \r\n 1 ¢HZv5WAboi0D¢(/:/ HU8866\r\
  296. n长按覆制本内容,打开TaoBao/\r\n-\r\n返佣是指商家的推广佣.金\r\n通过我回复的口令下単收货后,我
  297. 会微信红.苞返给你!!\r\n\r\n有疑问可回复“人工”咨询客服*/
  298. //🍑🔗上 水和肌精华水& CZ0 VWdCWC2gj97&,
  299. //6฿04ZDWzrwxjN)/ CA97
  300. //1😘 腹制这条(CZ00 iHvtWzrXa7O(:/
  301. //¥EC8DG4Zj0dhd8DOw¥MF6563 oIo0WzOF1Cp##X-PyVpHiPlyj1OP##
  302. //6.6₵vU2jWzIW3Qx₲/ CZ5224
  303. //$F56nWzIDSFZ$
  304. //0復製这条口令( CZ00 D0M4WzI0jFJ¢,📱咑開[Tao宝]就可下单:/
  305. //8fuzhi本条消息:¤ CZ3458 JSR1WzrPCBU¤,打开🍑♭ɑ◑下单/
  306. //5€Lz6SWzrkLDw¥:// CZ13
  307. //3₲Igq3Wzkc5np₳:// CZ15
  308. //9.9🎈【康师傅易拉罐6罐】口伶:6₰TnxKWzr0wff₪:// CZ69
  309. //4₲99Y0WzJdK6S₳:// CZ46
  310. //4fuzhi本条消息:¤ CZ0002 WVCSWzrk6Ix¤,打开🍑♭ɑ◑下单/
  311. bool anyMatch = false;
  312. foreach (string pattern in mergedArray)
  313. {
  314. if (Regex.IsMatch(text, pattern, RegexOptions.IgnoreCase))
  315. {
  316. anyMatch = true;
  317. }
  318. }
  319. return anyMatch;
  320. }
  321. public static bool MatchOtherInfo(string text, List<string> extended)
  322. {
  323. string[] base_patterns =
  324. [
  325. "[ďȌƯƔɪƝɖƟɏƖԂȎȗϓɫɧơȲǏđǫƲƳɨǹƊȮǚƴɬɲƿȖȳɳɗʮϔӢǙɦɒɎƥʘưΊƞǪȈʠΌǓϒίȠƠƱƗǸþŌŬÿĩŅÞÓũŸÎŎûįŇĎÖÙŷÏňÜÝÍñĎÒüŶľńĎ0ųŷÏŇdǒǔyí℡抖yí℡ÞŐûŷÌñ]{6}",
  326. @"(?:.+)极速版(?:口令|搜索)",
  327. @"##[a-zA-Z0-9]+##\[抖音(?:极速版)?(?:口令|搜索)\]",
  328. @"岽|亰|菄|京东|婛",
  329. "打开【剪映】",
  330. "weishi://|baiduhaokan://",
  331. "复制打开「UC浏览器」|UC瀏覽器",
  332. "番茄免费小说",
  333. @"\?chanTag=[^&\s]*口令",
  334. @"(https?://pan\.baidu\.com/s/[A-Za-z0-9?\-_=]+)",
  335. @"https?:\/\/meeting\.tencent\.com[^\s]*",
  336. @"#腾讯会议:(\d{3}-\d{3}-\d{3})"
  337. ];
  338. List<string> mergedArray = extended.Union(base_patterns).ToList();
  339. bool anyMatch = false;
  340. foreach (string pattern in mergedArray)
  341. {
  342. if (Regex.IsMatch(text, pattern, RegexOptions.IgnoreCase))
  343. {
  344. anyMatch = true;
  345. }
  346. }
  347. return anyMatch;
  348. }
  349. public static bool MatchMultiToken(string text, List<string> extended)
  350. {
  351. text = RemoveUrls(text);
  352. string special_symbols = $"\\$\\(\\)\\/\\#\\&\\<\\>฿¢¥¥$🗝₰₵₲¤₪₴€₤£₳《¢💰🔑🎵✔💲🔐📲";
  353. string[] base_patterns =
  354. [
  355. @"[!$¥%]+([a-zA-Z0-9]{16})[!$¥%]+",
  356. @"\^v(\d+#[a-zA-Z0-9]+)(?:\?.*)?\^",
  357. "##([a-zA-Z0-9\\-]+)##",
  358. $@"(.*?\d{{2}}\s[a-zA-Z]{{2}}\d{{4}}\s.*?[{special_symbols}]+[a-zA-Z0-9\s]+[{special_symbols}]).*",
  359. $@"[{special_symbols}]+\s*([a-zA-Z]{{1,2}}\d{{2,4}}\s[a-zA-Z0-9]{{11}}|[a-zA-Z0-9]{{11}}[a-zA-Z]{{1,2}}\d{{2,4}}\s|[a-zA-Z0-9]{{11}})\s*[{special_symbols}]+",
  360. ];
  361. // PAGE6:/^v130091#P2J6EDxN8p8?chanTag=d9dc522bdea27437514052ea50f6a787^
  362. List<string> mergedArray = extended.Union(base_patterns).ToList();
  363. int matchCount = 0;
  364. foreach (string pattern in mergedArray)
  365. {
  366. Match match = Regex.Match(text, pattern, RegexOptions.IgnoreCase);
  367. if (match.Success)
  368. {
  369. matchCount++;
  370. text = text.Replace(match.Groups[^1].Value, ""); // 移除匹配的部分文本
  371. }
  372. }
  373. return matchCount >= 2;
  374. }
  375. public static bool FilterRiskLink(string ip, string oaid, string content, out string reason)
  376. {
  377. reason = string.Empty;
  378. string itemId = ExtractItemId(content);
  379. if (string.IsNullOrEmpty(itemId)) return false;
  380. string cacheKey = $":cache:parse:{ip}_{oaid}_{itemId}";
  381. int flag = RedisHelper.Get<int>(cacheKey);
  382. if (flag > 0)
  383. {
  384. reason = $"口令用户";
  385. return true;
  386. }
  387. return false;
  388. }
  389. public static bool ShouldIgnoreRequest(string ip, string oaid, out string reason)
  390. {
  391. reason = string.Empty;
  392. try
  393. {
  394. // IP和流量控制
  395. var config = TkConfigCore.Get();
  396. string ignorePercentageCity = config.ignorePercentageCity;
  397. string? ipInfo = IP2RegionPlus.Search(ip);
  398. if (IgnoreRegionIncluded(ignorePercentageCity, ipInfo, out string regionInfo))
  399. {
  400. reason = $"地区控制:{regionInfo}";
  401. return true;
  402. }
  403. }
  404. catch (Exception ex)
  405. {
  406. reason = "配置异常";
  407. }
  408. return false;
  409. }
  410. public static bool FlowControlIgnoreRequest(out string reason)
  411. {
  412. reason = string.Empty;
  413. try
  414. {
  415. // IP和流量控制
  416. var config = TkConfigCore.Get();
  417. int ignorePercentage = config.ignorePercentage;
  418. if (ignorePercentage == 0) return false;
  419. var randomValue = (decimal)_random.Next(0, 100);
  420. bool result = randomValue <= ignorePercentage; // 如果生成的随机数小于忽略百分比,则返回 true,表示需要忽略请求
  421. if (result)
  422. {
  423. reason = "流量控制";
  424. return true;
  425. }
  426. }
  427. catch (Exception ex)
  428. {
  429. reason = $"配置异常";
  430. }
  431. return false;
  432. }
  433. public static TkDataDTO GetFormattedObject(string content, string ip, string oaid)
  434. {
  435. string shortLinkurl = GetTaobaoLink(content);
  436. string deeplink_url = GetDeeplink(shortLinkurl);
  437. return new TkDataDTO()
  438. {
  439. message = string.Empty,
  440. subCode = TkSubCodeEnum.Other,
  441. channel = TkChannelEnum.tb,
  442. accountName = string.Empty,
  443. success = false,
  444. content = content,
  445. link_type = LinkTypeEnum.unknown,
  446. ip = ip,
  447. oaid = oaid,
  448. couponAmount = 0,
  449. taoToken = string.Empty,
  450. elapsedTime = 0,
  451. itemName = "点击打开淘宝APP",
  452. shortLinkurl = shortLinkurl,
  453. deeplink_url = deeplink_url,
  454. create_time = DateTime.Now,
  455. end_point = _end_point,
  456. };
  457. }
  458. public static string OppoDecode(string content)
  459. {
  460. try
  461. {
  462. string secretKey = "BwFeIvOEDZy9MFGi0JLZBO4yEhR44DGV";
  463. byte[] keyBytes = Encoding.UTF8.GetBytes(secretKey);
  464. if (!content.Contains("%IV%")) return content;
  465. string cipherText = content.GetContentPart("", "%IV%");
  466. string ivText = content.GetContentPart("%IV%", "");
  467. byte[] cipherBytes = Convert.FromBase64String(cipherText);
  468. byte[] ivBytes = Convert.FromBase64String(ivText);
  469. using RijndaelManaged aes = new();
  470. aes.Key = keyBytes;
  471. aes.IV = ivBytes;
  472. aes.Mode = CipherMode.CFB;
  473. aes.Padding = PaddingMode.PKCS7;
  474. ICryptoTransform decryptor = aes.CreateDecryptor(aes.Key, aes.IV);
  475. var outBytes = decryptor.TransformFinalBlock(cipherBytes, 0, cipherBytes.Length);
  476. content = outBytes.ConvertToString();
  477. }
  478. catch (Exception e) { }
  479. return content;
  480. }
  481. }
  482. }