hydra-crawler 1.4.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/dist/apis/autocomplete.api.d.ts +7 -0
  2. package/dist/apis/autocomplete.api.js +15 -9
  3. package/dist/apis/autocomplete.api.js.map +1 -0
  4. package/dist/apis/bugs.api.d.ts +7 -0
  5. package/dist/apis/bugs.api.js +21 -15
  6. package/dist/apis/bugs.api.js.map +1 -0
  7. package/dist/apis/crawl.api.d.ts +7 -0
  8. package/dist/apis/crawl.api.js +15 -9
  9. package/dist/apis/crawl.api.js.map +1 -0
  10. package/dist/apis/domains.api.d.ts +7 -0
  11. package/dist/apis/domains.api.js +24 -19
  12. package/dist/apis/domains.api.js.map +1 -0
  13. package/dist/apis/images.api.d.ts +7 -0
  14. package/dist/apis/images.api.js +20 -14
  15. package/dist/apis/images.api.js.map +1 -0
  16. package/dist/apis/statistics.api.d.ts +8 -0
  17. package/dist/apis/statistics.api.js +27 -20
  18. package/dist/apis/statistics.api.js.map +1 -0
  19. package/dist/apis/test.api.d.ts +5 -0
  20. package/dist/apis/test.api.js +15 -9
  21. package/dist/apis/test.api.js.map +1 -0
  22. package/dist/apis/urls.api.d.ts +7 -0
  23. package/dist/apis/urls.api.js +21 -15
  24. package/dist/apis/urls.api.js.map +1 -0
  25. package/dist/apps/cleanup.app.d.ts +19 -0
  26. package/dist/apps/cleanup.app.js +118 -100
  27. package/dist/apps/cleanup.app.js.map +1 -0
  28. package/dist/apps/cross-populate-export.app.d.ts +12 -0
  29. package/dist/apps/cross-populate-export.app.js +60 -47
  30. package/dist/apps/cross-populate-export.app.js.map +1 -0
  31. package/dist/apps/cross-populate-import.app.d.ts +12 -0
  32. package/dist/apps/cross-populate-import.app.js +64 -51
  33. package/dist/apps/cross-populate-import.app.js.map +1 -0
  34. package/dist/apps/denylist.app.d.ts +17 -0
  35. package/dist/apps/denylist.app.js +115 -98
  36. package/dist/apps/denylist.app.js.map +1 -0
  37. package/dist/apps/expire.app.d.ts +19 -0
  38. package/dist/apps/expire.app.js +44 -31
  39. package/dist/apps/expire.app.js.map +1 -0
  40. package/dist/apps/extract-text.app.d.ts +8 -0
  41. package/dist/apps/extract-text.app.js +43 -35
  42. package/dist/apps/extract-text.app.js.map +1 -0
  43. package/dist/apps/hydra.app.d.ts +34 -0
  44. package/dist/apps/hydra.app.js +150 -137
  45. package/dist/apps/hydra.app.js.map +1 -0
  46. package/dist/apps/import.app.d.ts +11 -0
  47. package/dist/apps/import.app.js +44 -32
  48. package/dist/apps/import.app.js.map +1 -0
  49. package/dist/apps/internal-hydra-common.app.d.ts +28 -0
  50. package/dist/apps/internal-hydra-common.app.js +5 -11
  51. package/dist/apps/internal-hydra-common.app.js.map +1 -0
  52. package/dist/apps/query.app.d.ts +20 -0
  53. package/dist/apps/query.app.js +63 -49
  54. package/dist/apps/query.app.js.map +1 -0
  55. package/dist/apps/reattempt.app.d.ts +17 -0
  56. package/dist/apps/reattempt.app.js +66 -53
  57. package/dist/apps/reattempt.app.js.map +1 -0
  58. package/dist/apps/requeue-domain.app.d.ts +13 -0
  59. package/dist/apps/requeue-domain.app.js +50 -37
  60. package/dist/apps/requeue-domain.app.js.map +1 -0
  61. package/dist/apps/seed.app.d.ts +15 -0
  62. package/dist/apps/seed.app.js +53 -40
  63. package/dist/apps/seed.app.js.map +1 -0
  64. package/dist/apps/startup.app.d.ts +11 -0
  65. package/dist/apps/startup.app.js +51 -38
  66. package/dist/apps/startup.app.js.map +1 -0
  67. package/dist/apps/unarchive.app.d.ts +15 -0
  68. package/dist/apps/unarchive.app.js +67 -54
  69. package/dist/apps/unarchive.app.js.map +1 -0
  70. package/dist/classes/cleaner.d.ts +12 -0
  71. package/dist/classes/cleaner.js +227 -207
  72. package/dist/classes/cleaner.js.map +1 -0
  73. package/dist/classes/crawler.d.ts +34 -0
  74. package/dist/classes/crawler.js +248 -241
  75. package/dist/classes/crawler.js.map +1 -0
  76. package/dist/classes/dns.d.ts +3 -0
  77. package/dist/classes/dns.js +10 -13
  78. package/dist/classes/dns.js.map +1 -0
  79. package/dist/classes/expirer.d.ts +10 -0
  80. package/dist/classes/expirer.js +107 -94
  81. package/dist/classes/expirer.js.map +1 -0
  82. package/dist/classes/expiry.d.ts +8 -0
  83. package/dist/classes/expiry.js +16 -19
  84. package/dist/classes/expiry.js.map +1 -0
  85. package/dist/classes/lists.d.ts +9 -0
  86. package/dist/classes/lists.js +13 -18
  87. package/dist/classes/lists.js.map +1 -0
  88. package/dist/classes/robot.d.ts +15 -0
  89. package/dist/classes/robot.js +40 -30
  90. package/dist/classes/robot.js.map +1 -0
  91. package/dist/classes/tracker.d.ts +25 -0
  92. package/dist/classes/tracker.js +82 -64
  93. package/dist/classes/tracker.js.map +1 -0
  94. package/dist/cli.d.ts +1 -0
  95. package/dist/cli.js +72 -65
  96. package/dist/cli.js.map +1 -0
  97. package/dist/enums/eavailable-strategy.d.ts +4 -0
  98. package/dist/enums/eavailable-strategy.js +3 -5
  99. package/dist/enums/eavailable-strategy.js.map +1 -0
  100. package/dist/enums/elist.d.ts +7 -0
  101. package/dist/enums/elist.js +7 -11
  102. package/dist/enums/elist.js.map +1 -0
  103. package/dist/enums/eserver.d.ts +8 -0
  104. package/dist/enums/eserver.js +3 -5
  105. package/dist/enums/eserver.js.map +1 -0
  106. package/dist/enums/ex-powered-by.d.ts +6 -0
  107. package/dist/enums/ex-powered-by.js +3 -5
  108. package/dist/enums/ex-powered-by.js.map +1 -0
  109. package/dist/helpers/matcher.d.ts +5 -0
  110. package/dist/helpers/matcher.js +2 -5
  111. package/dist/helpers/matcher.js.map +1 -0
  112. package/dist/helpers/random.d.ts +4 -0
  113. package/dist/helpers/random.js +2 -5
  114. package/dist/helpers/random.js.map +1 -0
  115. package/dist/helpers/utf-decoder.d.ts +4 -0
  116. package/dist/helpers/utf-decoder.js +3 -6
  117. package/dist/helpers/utf-decoder.js.map +1 -0
  118. package/dist/interfaces/iexpiry.d.ts +7 -0
  119. package/dist/interfaces/iexpiry.js +9 -13
  120. package/dist/interfaces/iexpiry.js.map +1 -0
  121. package/dist/interfaces/imatch.d.ts +6 -0
  122. package/dist/interfaces/imatch.js +6 -9
  123. package/dist/interfaces/imatch.js.map +1 -0
  124. package/dist/interfaces/iparser-config.d.ts +4 -0
  125. package/dist/interfaces/iparser-config.js +4 -7
  126. package/dist/interfaces/iparser-config.js.map +1 -0
  127. package/dist/interfaces/iparser.d.ts +8 -0
  128. package/dist/interfaces/iparser.js +2 -2
  129. package/dist/interfaces/iparser.js.map +1 -0
  130. package/dist/interfaces/irequest-outcome.d.ts +11 -0
  131. package/dist/interfaces/irequest-outcome.js +2 -2
  132. package/dist/interfaces/irequest-outcome.js.map +1 -0
  133. package/dist/interfaces/iserver.d.ts +4 -0
  134. package/dist/interfaces/iserver.js +2 -2
  135. package/dist/interfaces/iserver.js.map +1 -0
  136. package/dist/parsers/accessibility-metrics.parser.d.ts +11 -0
  137. package/dist/parsers/accessibility-metrics.parser.js +34 -26
  138. package/dist/parsers/accessibility-metrics.parser.js.map +1 -0
  139. package/dist/parsers/asp-error.parser.d.ts +12 -0
  140. package/dist/parsers/asp-error.parser.js +36 -28
  141. package/dist/parsers/asp-error.parser.js.map +1 -0
  142. package/dist/parsers/bad-words.parser.d.ts +10 -0
  143. package/dist/parsers/bad-words.parser.js +21 -13
  144. package/dist/parsers/bad-words.parser.js.map +1 -0
  145. package/dist/parsers/complex-english.parser.d.ts +15 -0
  146. package/dist/parsers/complex-english.parser.js +33 -25
  147. package/dist/parsers/complex-english.parser.js.map +1 -0
  148. package/dist/parsers/data.parser.d.ts +14 -0
  149. package/dist/parsers/data.parser.js +12 -16
  150. package/dist/parsers/data.parser.js.map +1 -0
  151. package/dist/parsers/dictionary.parser.d.ts +19 -0
  152. package/dist/parsers/dictionary.parser.js +47 -39
  153. package/dist/parsers/dictionary.parser.js.map +1 -0
  154. package/dist/parsers/html.parser.d.ts +13 -0
  155. package/dist/parsers/html.parser.js +4 -8
  156. package/dist/parsers/html.parser.js.map +1 -0
  157. package/dist/parsers/hyperlinks.parser.d.ts +20 -0
  158. package/dist/parsers/hyperlinks.parser.js +82 -77
  159. package/dist/parsers/hyperlinks.parser.js.map +1 -0
  160. package/dist/parsers/image-tags.parser.d.ts +20 -0
  161. package/dist/parsers/image-tags.parser.js +38 -34
  162. package/dist/parsers/image-tags.parser.js.map +1 -0
  163. package/dist/parsers/jpeg.parser.d.ts +11 -0
  164. package/dist/parsers/jpeg.parser.js +28 -20
  165. package/dist/parsers/jpeg.parser.js.map +1 -0
  166. package/dist/parsers/paragraphs.parser.d.ts +13 -0
  167. package/dist/parsers/paragraphs.parser.js +33 -40
  168. package/dist/parsers/paragraphs.parser.js.map +1 -0
  169. package/dist/parsers/parser.d.ts +19 -0
  170. package/dist/parsers/parser.js +30 -17
  171. package/dist/parsers/parser.js.map +1 -0
  172. package/dist/parsers/php-error.parser.d.ts +12 -0
  173. package/dist/parsers/php-error.parser.js +42 -34
  174. package/dist/parsers/php-error.parser.js.map +1 -0
  175. package/dist/parsers/phrase.parser.d.ts +8 -0
  176. package/dist/parsers/phrase.parser.js +16 -11
  177. package/dist/parsers/phrase.parser.js.map +1 -0
  178. package/dist/parsers/regex.parser.d.ts +10 -0
  179. package/dist/parsers/regex.parser.js +30 -22
  180. package/dist/parsers/regex.parser.js.map +1 -0
  181. package/dist/parsers/server.parser.d.ts +12 -0
  182. package/dist/parsers/server.parser.js +66 -56
  183. package/dist/parsers/server.parser.js.map +1 -0
  184. package/dist/parsers/spelling.parser.d.ts +10 -0
  185. package/dist/parsers/spelling.parser.js +21 -13
  186. package/dist/parsers/spelling.parser.js.map +1 -0
  187. package/dist/parsers/string.parser.d.ts +8 -0
  188. package/dist/parsers/string.parser.js +5 -8
  189. package/dist/parsers/string.parser.js.map +1 -0
  190. package/dist/parsers/text.parser.d.ts +8 -0
  191. package/dist/parsers/text.parser.js +24 -18
  192. package/dist/parsers/text.parser.js.map +1 -0
  193. package/dist/parsers/words.parser.d.ts +11 -0
  194. package/dist/parsers/words.parser.js +32 -28
  195. package/dist/parsers/words.parser.js.map +1 -0
  196. package/dist/queries/complex-english.query.d.ts +2 -0
  197. package/dist/queries/complex-english.query.js +37 -38
  198. package/dist/queries/complex-english.query.js.map +1 -0
  199. package/dist/queries/flash-content.query.d.ts +2 -0
  200. package/dist/queries/flash-content.query.js +45 -32
  201. package/dist/queries/flash-content.query.js.map +1 -0
  202. package/dist/queries/linking-to-domains.query.d.ts +2 -0
  203. package/dist/queries/linking-to-domains.query.js +35 -27
  204. package/dist/queries/linking-to-domains.query.js.map +1 -0
  205. package/dist/queries/readability-score.query.d.ts +2 -0
  206. package/dist/queries/readability-score.query.js +21 -13
  207. package/dist/queries/readability-score.query.js.map +1 -0
  208. package/dist/servers/crawl.server.d.ts +35 -0
  209. package/dist/servers/crawl.server.js +133 -121
  210. package/dist/servers/crawl.server.js.map +1 -0
  211. package/dist/servers/express.server.d.ts +8 -0
  212. package/dist/servers/express.server.js +7 -10
  213. package/dist/servers/express.server.js.map +1 -0
  214. package/dist/servers/maintenance.server.d.ts +22 -0
  215. package/dist/servers/maintenance.server.js +42 -36
  216. package/dist/servers/maintenance.server.js.map +1 -0
  217. package/dist/servers/rest.server.d.ts +7 -0
  218. package/dist/servers/rest.server.js +40 -51
  219. package/dist/servers/rest.server.js.map +1 -0
  220. package/dist/servers/socket-io.server.d.ts +12 -0
  221. package/dist/servers/socket-io.server.js +48 -15
  222. package/dist/servers/socket-io.server.js.map +1 -0
  223. package/dist/services/database.service.d.ts +68 -0
  224. package/dist/services/database.service.js +528 -462
  225. package/dist/services/database.service.js.map +1 -0
  226. package/dist/types/tcrawl-config.d.ts +14 -0
  227. package/dist/types/tcrawl-config.js +14 -17
  228. package/dist/types/tcrawl-config.js.map +1 -0
  229. package/dist/types/thydra-config.d.ts +4 -0
  230. package/dist/types/thydra-config.js +4 -7
  231. package/dist/types/thydra-config.js.map +1 -0
  232. package/dist/types/tparser-ctor.d.ts +7 -0
  233. package/dist/types/tparser-ctor.js +2 -2
  234. package/dist/types/tparser-ctor.js.map +1 -0
  235. package/dist/types/tquery.d.ts +7 -0
  236. package/dist/types/tquery.js +2 -2
  237. package/dist/types/tquery.js.map +1 -0
  238. package/dist/types/trobots-config.d.ts +4 -0
  239. package/dist/types/trobots-config.js +4 -7
  240. package/dist/types/trobots-config.js.map +1 -0
  241. package/package.json +41 -29
  242. package/angular/10-es2015.bacd4ae5dd7913ce55f0.js +0 -1
  243. package/angular/10-es5.bacd4ae5dd7913ce55f0.js +0 -1
  244. package/angular/11-es2015.0f031dcf752d1e8eda6b.js +0 -1
  245. package/angular/11-es5.0f031dcf752d1e8eda6b.js +0 -1
  246. package/angular/3rdpartylicenses.txt +0 -1127
  247. package/angular/5-es2015.951498ca9c1bc74e57bf.js +0 -1
  248. package/angular/5-es5.951498ca9c1bc74e57bf.js +0 -1
  249. package/angular/6-es2015.65f680261a3506b88381.js +0 -1
  250. package/angular/6-es5.65f680261a3506b88381.js +0 -1
  251. package/angular/7-es2015.625197f3af1dbf3e805d.js +0 -1
  252. package/angular/7-es5.625197f3af1dbf3e805d.js +0 -1
  253. package/angular/8-es2015.55518901987a5b834309.js +0 -1
  254. package/angular/8-es5.55518901987a5b834309.js +0 -1
  255. package/angular/9-es2015.6cc9bde262564e7836f2.js +0 -1
  256. package/angular/9-es5.6cc9bde262564e7836f2.js +0 -1
  257. package/angular/Roboto-Black.41ed1105a6ebb8ffe34e.woff2 +0 -0
  258. package/angular/Roboto-Black.937491dfcbe64ca9a9f1.woff +0 -0
  259. package/angular/Roboto-BlackItalic.2e1ee657996854c6f427.woff +0 -0
  260. package/angular/Roboto-BlackItalic.50ca4c51ebc27e7e7d2f.woff2 +0 -0
  261. package/angular/Roboto-Bold.73288d91c325e82a5b92.woff +0 -0
  262. package/angular/Roboto-Bold.92fbd4e93cf0a5dbebaa.woff2 +0 -0
  263. package/angular/Roboto-BoldItalic.5f600d98a73d800ae575.woff2 +0 -0
  264. package/angular/Roboto-BoldItalic.6d89acbd21d7e3fbecb2.woff +0 -0
  265. package/angular/Roboto-Light.c27d89ac77468ae18f28.woff2 +0 -0
  266. package/angular/Roboto-Light.d923dfafc0c5183b59aa.woff +0 -0
  267. package/angular/Roboto-LightItalic.506274c7228cf81cae4d.woff2 +0 -0
  268. package/angular/Roboto-LightItalic.d4b8c137518d9d92bb28.woff +0 -0
  269. package/angular/Roboto-Medium.092c6130df8fd2199888.woff +0 -0
  270. package/angular/Roboto-Medium.1d3bced88509b0838984.woff2 +0 -0
  271. package/angular/Roboto-MediumItalic.18ff1628c628080166c1.woff +0 -0
  272. package/angular/Roboto-MediumItalic.d620b8f53f75966fe42e.woff2 +0 -0
  273. package/angular/Roboto-Regular.64cfb66c866ea50cad47.woff2 +0 -0
  274. package/angular/Roboto-Regular.e02e9d6ff5547f7e9962.woff +0 -0
  275. package/angular/Roboto-RegularItalic.4dd2af1e8df532f41db8.woff2 +0 -0
  276. package/angular/Roboto-RegularItalic.5ea38fff9eebef99c5df.woff +0 -0
  277. package/angular/Roboto-Thin.dbd56bd3357dc3617fe5.woff2 +0 -0
  278. package/angular/Roboto-Thin.e7f7c82374bd0ebef14b.woff +0 -0
  279. package/angular/Roboto-ThinItalic.5dd9349c940073834e9a.woff +0 -0
  280. package/angular/Roboto-ThinItalic.a8cef84f735ef887abdc.woff2 +0 -0
  281. package/angular/assets/config/app-config.json +0 -16
  282. package/angular/assets/images/splashbg.jpg +0 -0
  283. package/angular/assets/web-app-commons/fonts/material-icons/MaterialDesignIcons-Community-2.7.94.woff +0 -0
  284. package/angular/assets/web-app-commons/fonts/material-icons/MaterialDesignIcons-Community-2.7.94.woff2 +0 -0
  285. package/angular/assets/web-app-commons/fonts/material-icons/material-design-icons-community.css +0 -11293
  286. package/angular/favicon.ico +0 -0
  287. package/angular/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.f2a0933406f783065152.woff +0 -0
  288. package/angular/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.6467d9a24f234e8e8e07.woff2 +0 -0
  289. package/angular/index.html +0 -16
  290. package/angular/main-es2015.3a582572476c7f292e52.js +0 -1
  291. package/angular/main-es5.3a582572476c7f292e52.js +0 -1
  292. package/angular/polyfills-es2015.7df68534018bc2f6cb09.js +0 -1
  293. package/angular/polyfills-es5.e79468f406fae2989221.js +0 -1
  294. package/angular/runtime-es2015.6d2cff76cdb2790d3308.js +0 -1
  295. package/angular/runtime-es5.6d2cff76cdb2790d3308.js +0 -1
  296. package/angular/styles.c5c6c2534225b85c4ff0.css +0 -1
  297. package/config/bad-words.json +0 -1
  298. package/config/complex-english.json +0 -400
  299. package/config/hydra-auth.json +0 -8
  300. package/config/hydra-crawler.json +0 -84
  301. package/config/list-allow.json +0 -171
  302. package/config/list-deny.json +0 -248
  303. package/config/list-expiry.json +0 -7
  304. package/config/schedule.json +0 -25
  305. package/config/spelling.json +0 -1
@@ -1,20 +1,26 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Crawler = void 0;
4
- const url_1 = require("url");
5
- const http = require("http");
6
- const https = require("https");
7
- const tscommons_core_1 = require("tscommons-core");
8
- const tscommons_async_1 = require("tscommons-async");
9
- const hydra_crawler_ts_assets_1 = require("hydra-crawler-ts-assets");
10
- const nodecommons_cli_1 = require("nodecommons-cli");
11
- const nodecommons_process_1 = require("nodecommons-process");
12
- const nodecommons_security_1 = require("nodecommons-security");
13
- const robot_1 = require("../classes/robot");
14
- const random_1 = require("../helpers/random");
15
- const elist_1 = require("../enums/elist");
16
- const dns_1 = require("./dns");
17
- class Crawler {
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { URL } from 'url';
11
+ import * as http from 'http';
12
+ import * as https from 'https';
13
+ import { commonsMapToObject, commonsTypeHasPropertyString } from 'tscommons-es-core';
14
+ import { commonsAsyncAbortTimeout, commonsAsyncTimeout } from 'tscommons-es-async';
15
+ import { EStatus } from 'hydra-crawler-ts-assets';
16
+ import { commonsOutputAlert, commonsOutputCompleted, commonsOutputDebug, commonsOutputError, commonsOutputInfo } from 'nodecommons-es-cli';
17
+ import { commonsGracefulAbortAddCallback, commonsGracefulAbortRemoveCallback } from 'nodecommons-es-process';
18
+ import { commonsHashMd5 } from 'nodecommons-es-security';
19
+ import { Robot } from '../classes/robot';
20
+ import { Random } from '../helpers/random';
21
+ import { EList } from '../enums/elist';
22
+ import { Dns } from './dns';
23
+ export class Crawler {
18
24
  constructor(domain, database, crawlConfig, parsersConfig, robotsConfig, parsers, lists, tracker) {
19
25
  this.domain = domain;
20
26
  this.database = database;
@@ -41,11 +47,11 @@ class Crawler {
41
47
  let timedOut = false;
42
48
  const timedOutMessage = `Timeout on crawl of ${url}`;
43
49
  const secondaryTimeoutId = `crawler_${url}_secondary_timeout`;
44
- tscommons_async_1.CommonsAsync.timeout(connectTimeout + 60000, secondaryTimeoutId)
50
+ commonsAsyncTimeout(connectTimeout + 60000, secondaryTimeoutId)
45
51
  .then(() => {
46
52
  if (timedOut || completed)
47
53
  return;
48
- nodecommons_cli_1.CommonsOutput.debug(`Secondary timeout for ${url}`);
54
+ commonsOutputDebug(`Secondary timeout for ${url}`);
49
55
  timedOut = true;
50
56
  reject(new Error(timedOutMessage));
51
57
  return;
@@ -53,7 +59,7 @@ class Crawler {
53
59
  .catch((e) => {
54
60
  if (e.message === 'abortTimeout called')
55
61
  return;
56
- nodecommons_cli_1.CommonsOutput.debug('debug position 10');
62
+ commonsOutputDebug('debug position 10');
57
63
  console.log(e);
58
64
  throw e;
59
65
  });
@@ -71,7 +77,7 @@ class Crawler {
71
77
  if (!exceeded) {
72
78
  exceeded = true;
73
79
  res.destroy();
74
- nodecommons_cli_1.CommonsOutput.alert(`Exceeded maxFileSize for URL: ${url}`);
80
+ commonsOutputAlert(`Exceeded maxFileSize for URL: ${url}`);
75
81
  }
76
82
  return;
77
83
  }
@@ -84,9 +90,10 @@ class Crawler {
84
90
  if (timedOut || completed)
85
91
  return;
86
92
  completed = true;
87
- tscommons_async_1.CommonsAsync.abortTimeout(secondaryTimeoutId);
93
+ commonsAsyncAbortTimeout(secondaryTimeoutId);
88
94
  resolve({
89
95
  latency: latency,
96
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
90
97
  ip: res['remoteIp'],
91
98
  statusCode: res.statusCode || 599,
92
99
  headers: res.headers,
@@ -98,7 +105,7 @@ class Crawler {
98
105
  res.on('error', (err) => {
99
106
  if (timedOut || completed)
100
107
  return;
101
- tscommons_async_1.CommonsAsync.abortTimeout(secondaryTimeoutId);
108
+ commonsAsyncAbortTimeout(secondaryTimeoutId);
102
109
  reject(err);
103
110
  });
104
111
  });
@@ -108,8 +115,8 @@ class Crawler {
108
115
  if (timedOut || completed)
109
116
  return;
110
117
  timedOut = true;
111
- req.abort();
112
- tscommons_async_1.CommonsAsync.abortTimeout(secondaryTimeoutId);
118
+ req.destroy();
119
+ commonsAsyncAbortTimeout(secondaryTimeoutId);
113
120
  reject(new Error(timedOutMessage));
114
121
  });
115
122
  req.on('response', (res) => {
@@ -118,23 +125,17 @@ class Crawler {
118
125
  req.on('error', (err) => {
119
126
  if (timedOut || completed)
120
127
  return;
121
- tscommons_async_1.CommonsAsync.abortTimeout(secondaryTimeoutId);
128
+ commonsAsyncAbortTimeout(secondaryTimeoutId);
122
129
  reject(err);
123
130
  });
124
- // req.on(
125
- // 'data',
126
- // (_: unknown): void => {
127
- // req.abort();
128
- // }
129
- // );
130
131
  req.on('socket', (socket) => {
131
132
  socket.setTimeout(connectTimeout);
132
133
  socket.on('timeout', () => {
133
134
  if (timedOut || completed)
134
135
  return;
135
- tscommons_async_1.CommonsAsync.abortTimeout(secondaryTimeoutId);
136
+ commonsAsyncAbortTimeout(secondaryTimeoutId);
136
137
  timedOut = true;
137
- req.abort();
138
+ req.destroy();
138
139
  reject(new Error(timedOutMessage));
139
140
  });
140
141
  });
@@ -151,6 +152,8 @@ class Crawler {
151
152
  for (const key of keys) {
152
153
  if (!Object.keys(headers).includes(key.key))
153
154
  continue;
155
+ if (!commonsTypeHasPropertyString(headers, key.key))
156
+ continue;
154
157
  const value = headers[key.key];
155
158
  switch (key.type) {
156
159
  case 'string':
@@ -169,247 +172,251 @@ class Crawler {
169
172
  }
170
173
  abort() {
171
174
  this.isAborted = true;
172
- tscommons_async_1.CommonsAsync.abortTimeout(`crawl_${this.domain}`);
175
+ commonsAsyncAbortTimeout(`crawl_${this.domain}`);
173
176
  }
174
177
  pause() {
175
- nodecommons_cli_1.CommonsOutput.alert(`Pausing crawler for ${this.domain}`);
178
+ commonsOutputAlert(`Pausing crawler for ${this.domain}`);
176
179
  this.isPaused = true;
177
180
  }
178
181
  resume() {
179
- nodecommons_cli_1.CommonsOutput.completed(`Resuming crawler for ${this.domain}`);
182
+ commonsOutputCompleted(`Resuming crawler for ${this.domain}`);
180
183
  this.isPaused = false;
181
184
  }
182
- async fetch(url, setDomainIp) {
183
- nodecommons_cli_1.CommonsOutput.info(`Fetching ${url}`);
184
- const whatwg = new url_1.URL(url);
185
- let handler;
186
- switch (whatwg.protocol) {
187
- case 'http:':
188
- handler = http;
189
- break;
190
- case 'https:':
191
- handler = https;
192
- break;
193
- default:
194
- throw new Error(`unable to handle protocol ${whatwg.protocol}`);
195
- }
196
- let outcome;
197
- try {
198
- outcome = await Crawler.request(handler, url, this.crawlConfig.connectTimeout, this.crawlConfig.maxFileSize, this.tracker);
199
- }
200
- catch (ex) {
201
- //if (!/^Timeout on crawl of/.test(ex.message)) console.error(ex);
202
- throw ex;
203
- }
204
- if (setDomainIp) {
205
- await this.database.domain(whatwg.hostname, outcome.ip);
206
- if (this.tracker)
207
- this.tracker.domain();
208
- }
209
- await this.database.setStatusCode(url, outcome.statusCode);
210
- const headers = Crawler.pruneHeaders(outcome.headers, this.crawlConfig.keepHeaders);
211
- if (!headers.has('content-length') && outcome.data !== undefined)
212
- headers.set('content-length', outcome.data.length);
213
- await this.database.setHeaders(url, headers);
214
- const outgoing = [];
215
- if (outcome.statusCode >= 300
216
- && outcome.statusCode < 400
217
- && headers.has('location')
218
- && this.lists.match(elist_1.EList.ALLOW, url) // only queue redirects for allowlist urls
219
- ) {
220
- // redirect codes
221
- const location = new url_1.URL(headers.get('location'), url);
222
- if (location.protocol.match(/^http(s?):$/)) {
223
- const added = await this.database.queue(location.toString(), this.lists.match(elist_1.EList.DENY, location.toString()));
224
- if (added && this.tracker)
225
- this.tracker.delta(this.lists.match(elist_1.EList.DENY, location.toString()) ? hydra_crawler_ts_assets_1.EStatus.DENY : hydra_crawler_ts_assets_1.EStatus.QUEUED, 1);
226
- if (location.toString() !== url)
227
- outgoing.push(location.toString());
185
+ fetch(url, setDomainIp) {
186
+ return __awaiter(this, void 0, void 0, function* () {
187
+ commonsOutputInfo(`Fetching ${url}`);
188
+ const whatwg = new URL(url);
189
+ let handler;
190
+ switch (whatwg.protocol) {
191
+ case 'http:':
192
+ handler = http;
193
+ break;
194
+ case 'https:':
195
+ handler = https;
196
+ break;
197
+ default:
198
+ throw new Error(`unable to handle protocol ${whatwg.protocol}`);
228
199
  }
229
- }
230
- if (outcome.data) {
231
- const hash = nodecommons_security_1.CommonsHash.md5(outcome.data);
232
- const existing = await this.database.getHash(url);
233
- if (hash !== existing)
234
- await this.database.setHash(url, hash);
235
- }
236
- if (outcome.data && outcome.data.length && headers.has('content-type')) {
237
- const contentType = headers.get('content-type');
238
- const isAllow = this.lists.match(elist_1.EList.ALLOW, url);
239
- for (const ctor of this.parsers) {
240
- const parser = new ctor(url, outcome, this.parsersConfig);
241
- if (!parser.isEnabled())
242
- continue;
243
- if (!parser.supports(contentType, isAllow))
244
- continue;
245
- try {
246
- await parser.parse(this.database);
247
- }
248
- catch (ex) {
249
- nodecommons_cli_1.CommonsOutput.debug('debug position 3');
250
- console.log(ex);
200
+ let outcome;
201
+ try {
202
+ outcome = yield Crawler.request(handler, url, this.crawlConfig.connectTimeout, this.crawlConfig.maxFileSize, this.tracker);
203
+ }
204
+ catch (ex) {
205
+ //if (!/^Timeout on crawl of/.test(ex.message)) console.error(ex);
206
+ throw ex;
207
+ }
208
+ if (setDomainIp) {
209
+ yield this.database.domain(whatwg.hostname, outcome.ip);
210
+ if (this.tracker)
211
+ this.tracker.domain();
212
+ }
213
+ yield this.database.setStatusCode(url, outcome.statusCode);
214
+ const headers = Crawler.pruneHeaders(outcome.headers, this.crawlConfig.keepHeaders);
215
+ if (!headers.has('content-length') && outcome.data !== undefined)
216
+ headers.set('content-length', outcome.data.length);
217
+ yield this.database.setHeaders(url, commonsMapToObject(headers));
218
+ const outgoing = [];
219
+ if (outcome.statusCode >= 300
220
+ && outcome.statusCode < 400
221
+ && headers.has('location')
222
+ && this.lists.match(EList.ALLOW, url) // only queue redirects for allowlist urls
223
+ ) {
224
+ // redirect codes
225
+ const location = new URL(headers.get('location'), url);
226
+ if (location.protocol.match(/^http(s?):$/)) {
227
+ const added = yield this.database.queue(location.toString(), this.lists.match(EList.DENY, location.toString()));
228
+ if (added && this.tracker)
229
+ this.tracker.delta(this.lists.match(EList.DENY, location.toString()) ? EStatus.DENY : EStatus.QUEUED, 1);
230
+ if (location.toString() !== url)
231
+ outgoing.push(location.toString());
251
232
  }
252
- if (isAllow) {
233
+ }
234
+ if (outcome.data) {
235
+ const hash = commonsHashMd5(outcome.data);
236
+ const existing = yield this.database.getHash(url);
237
+ if (hash !== existing)
238
+ yield this.database.setHash(url, hash);
239
+ }
240
+ if (outcome.data && outcome.data.length && headers.has('content-type')) {
241
+ const contentType = headers.get('content-type');
242
+ const isAllow = this.lists.match(EList.ALLOW, url);
243
+ for (const ctor of this.parsers) {
244
+ const parser = new ctor(url, outcome, this.parsersConfig);
245
+ if (!parser.isEnabled())
246
+ continue;
247
+ if (!parser.supports(contentType, isAllow))
248
+ continue;
253
249
  try {
254
- const links = await parser.links();
255
- if (links.length === 0)
256
- continue;
257
- for (const link of links) {
258
- if (link === url)
259
- continue;
260
- try {
261
- outgoing.push(link);
262
- }
263
- catch (ex) { /* do nothing */ }
264
- }
250
+ yield parser.parse(this.database);
265
251
  }
266
252
  catch (ex) {
267
- nodecommons_cli_1.CommonsOutput.debug('debug position 2');
253
+ commonsOutputDebug('debug position 3');
268
254
  console.log(ex);
269
255
  }
256
+ if (isAllow) {
257
+ try {
258
+ const links = yield parser.links();
259
+ if (links.length === 0)
260
+ continue;
261
+ for (const link of links) {
262
+ if (link === url)
263
+ continue;
264
+ try {
265
+ outgoing.push(link);
266
+ }
267
+ catch (ex) { /* do nothing */ }
268
+ }
269
+ }
270
+ catch (ex) {
271
+ commonsOutputDebug('debug position 2');
272
+ console.log(ex);
273
+ }
274
+ }
270
275
  }
271
276
  }
272
- }
273
- for (const link of outgoing) {
274
- const added = await this.database.queue(link, this.lists.match(elist_1.EList.DENY, link));
275
- if (added && this.tracker)
276
- this.tracker.delta(this.lists.match(elist_1.EList.DENY, link) ? hydra_crawler_ts_assets_1.EStatus.DENY : hydra_crawler_ts_assets_1.EStatus.QUEUED, 1);
277
- }
278
- await this.database.link(url, outgoing);
279
- if (this.tracker)
280
- this.tracker.link(outgoing.length);
281
- return outcome.statusCode;
282
- }
283
- async crawl() {
284
- const gracefulAbortId = nodecommons_process_1.CommonsGracefulAbort.addCallback(() => {
285
- nodecommons_cli_1.CommonsOutput.alert(`SIGINT abort flag is set. Aborting crawler ${this.domain}.`);
286
- this.abort();
277
+ for (const link of outgoing) {
278
+ const added = yield this.database.queue(link, this.lists.match(EList.DENY, link));
279
+ if (added && this.tracker)
280
+ this.tracker.delta(this.lists.match(EList.DENY, link) ? EStatus.DENY : EStatus.QUEUED, 1);
281
+ }
282
+ yield this.database.link(url, outgoing);
283
+ if (this.tracker)
284
+ this.tracker.link(outgoing.length);
285
+ return outcome.statusCode;
287
286
  });
288
- try {
287
+ }
288
+ crawl() {
289
+ return __awaiter(this, void 0, void 0, function* () {
290
+ const gracefulAbortId = commonsGracefulAbortAddCallback(() => {
291
+ commonsOutputAlert(`SIGINT abort flag is set. Aborting crawler ${this.domain}.`);
292
+ this.abort();
293
+ });
289
294
  try {
290
- await dns_1.Dns.resolve(this.domain, this.crawlConfig.connectTimeout);
291
- }
292
- catch (ex) {
293
- if (ex.message === 'DNS timeout' && !this.crawlConfig.treatTimeoutDnsAsDead) {
294
- nodecommons_cli_1.CommonsOutput.error(`DNS timed out for ${this.domain}. Will allow reattempts`);
295
- return;
296
- }
297
- nodecommons_cli_1.CommonsOutput.error(`Domain ${this.domain} is dead.`);
298
- await this.database.markDead(this.domain);
299
- return;
300
- }
301
- const robots = new robot_1.Robot(this.domain, this.crawlConfig, this.robotsConfig, this.tracker);
302
- await robots.load();
303
- let tally = 0;
304
- while (true) {
305
- if (this.isAborted)
306
- break;
307
- if (this.isPaused) {
308
- await tscommons_async_1.CommonsAsync.timeout(1000);
309
- continue;
295
+ try {
296
+ yield Dns.resolve(this.domain, this.crawlConfig.connectTimeout);
310
297
  }
311
- const url = await this.database.next(this.domain);
312
- if (!url) {
313
- nodecommons_cli_1.CommonsOutput.completed(`Crawl for ${this.domain} completed.`);
314
- break;
298
+ catch (ex) {
299
+ if (ex.message === 'DNS timeout' && !this.crawlConfig.treatTimeoutDnsAsDead) {
300
+ commonsOutputError(`DNS timed out for ${this.domain}. Will allow reattempts`);
301
+ return;
302
+ }
303
+ commonsOutputError(`Domain ${this.domain} is dead.`);
304
+ yield this.database.markDead(this.domain);
305
+ return;
315
306
  }
316
- await this.database.unsetFailReason(url);
317
- if (this.tracker)
318
- this.tracker.delta(hydra_crawler_ts_assets_1.EStatus.QUEUED, -1);
319
- if (this.lists.match(elist_1.EList.DENY, url)) {
320
- this.database.setStatus(url, hydra_crawler_ts_assets_1.EStatus.DENY);
321
- this.database.unsetTtl(url);
307
+ const robots = new Robot(this.domain, this.crawlConfig, this.robotsConfig, this.tracker);
308
+ yield robots.load();
309
+ let tally = 0;
310
+ while (true) {
311
+ if (this.isAborted)
312
+ break;
313
+ if (this.isPaused) {
314
+ yield commonsAsyncTimeout(1000);
315
+ continue;
316
+ }
317
+ const url = yield this.database.next(this.domain);
318
+ if (!url) {
319
+ commonsOutputCompleted(`Crawl for ${this.domain} completed.`);
320
+ break;
321
+ }
322
+ yield this.database.unsetFailReason(url);
322
323
  if (this.tracker)
323
- this.tracker.delta(hydra_crawler_ts_assets_1.EStatus.DENY, 1);
324
- // To get here, a url was queued but is now denylisted.
325
- // It may have had outgoings, so remove any that were there.
326
- await this.database.link(url, []);
327
- continue;
328
- }
329
- if (robots.isDisallowed(url)) {
330
- this.database.setStatus(url, hydra_crawler_ts_assets_1.EStatus.DISALLOWED);
331
- this.database.unsetTtl(url);
324
+ this.tracker.delta(EStatus.QUEUED, -1);
325
+ if (this.lists.match(EList.DENY, url)) {
326
+ yield this.database.setStatus(url, EStatus.DENY);
327
+ yield this.database.unsetTtl(url);
328
+ if (this.tracker)
329
+ this.tracker.delta(EStatus.DENY, 1);
330
+ // To get here, a url was queued but is now denylisted.
331
+ // It may have had outgoings, so remove any that were there.
332
+ yield this.database.link(url, []);
333
+ continue;
334
+ }
335
+ if (robots.isDisallowed(url)) {
336
+ yield this.database.setStatus(url, EStatus.DISALLOWED);
337
+ yield this.database.unsetTtl(url);
338
+ if (this.tracker)
339
+ this.tracker.delta(EStatus.DISALLOWED, 1);
340
+ // To get here, a url was queued but is now disallowed.
341
+ // It may have had outgoings, so remove any that were there.
342
+ yield this.database.link(url, []);
343
+ continue;
344
+ }
345
+ if (!(yield this.database.setStatus(url, EStatus.ACTIVE))) {
346
+ commonsOutputError(`Unable to set status to active for ${url}. Aborting crawler.`);
347
+ break;
348
+ }
332
349
  if (this.tracker)
333
- this.tracker.delta(hydra_crawler_ts_assets_1.EStatus.DISALLOWED, 1);
334
- // To get here, a url was queued but is now disallowed.
335
- // It may have had outgoings, so remove any that were there.
336
- await this.database.link(url, []);
337
- continue;
338
- }
339
- if (!await this.database.setStatus(url, hydra_crawler_ts_assets_1.EStatus.ACTIVE)) {
340
- nodecommons_cli_1.CommonsOutput.error(`Unable to set status to active for ${url}. Aborting crawler.`);
341
- break;
342
- }
343
- if (this.tracker)
344
- this.tracker.delta(hydra_crawler_ts_assets_1.EStatus.ACTIVE, 1);
345
- if (tally > 0) {
346
- try {
347
- const timeout = random_1.Random.randomise(this.crawlConfig.betweenFetchDelay, this.crawlConfig);
348
- await tscommons_async_1.CommonsAsync.timeout(timeout, `crawl_${this.domain}`);
349
- while (this.isPaused && !this.isAborted) {
350
- await tscommons_async_1.CommonsAsync.timeout(1000);
350
+ this.tracker.delta(EStatus.ACTIVE, 1);
351
+ if (tally > 0) {
352
+ try {
353
+ const timeout = Random.randomise(this.crawlConfig.betweenFetchDelay, this.crawlConfig);
354
+ yield commonsAsyncTimeout(timeout, `crawl_${this.domain}`);
355
+ while (this.isPaused && !this.isAborted) {
356
+ yield commonsAsyncTimeout(1000);
357
+ }
351
358
  }
359
+ catch (ex) { /* ignore */ }
352
360
  }
353
- catch (ex) { /* ignore */ }
354
- }
355
- if (this.isAborted)
356
- break;
357
- if (this.tracker)
358
- this.tracker.fetching(url);
359
- try {
360
- const statusCode = await this.fetch(url, tally === 0);
361
- if (this.tracker)
362
- this.tracker.done(url, statusCode);
363
- await this.database.setStatus(url, hydra_crawler_ts_assets_1.EStatus.DONE);
364
- this.database.unsetTtl(url);
365
- if (this.tracker)
366
- this.tracker.delta(hydra_crawler_ts_assets_1.EStatus.DONE, 1);
367
- }
368
- catch (ex) {
361
+ if (this.isAborted)
362
+ break;
369
363
  if (this.tracker)
370
- this.tracker.failed(url);
371
- const ttl = await this.database.getTtl(url) || 0;
372
- if (ttl < this.crawlConfig.maxFailedTtl) {
373
- await this.database.setTtl(url, ttl + 1);
374
- await this.database.setStatus(url, hydra_crawler_ts_assets_1.EStatus.QUEUED);
364
+ yield this.tracker.fetching(url);
365
+ try {
366
+ const statusCode = yield this.fetch(url, tally === 0);
375
367
  if (this.tracker)
376
- this.tracker.delta(hydra_crawler_ts_assets_1.EStatus.QUEUED, 1);
368
+ yield this.tracker.done(url, statusCode);
369
+ yield this.database.setStatus(url, EStatus.DONE);
370
+ yield this.database.unsetTtl(url);
371
+ if (this.tracker)
372
+ this.tracker.delta(EStatus.DONE, 1);
377
373
  }
378
- else {
379
- await this.database.setStatus(url, hydra_crawler_ts_assets_1.EStatus.FAILED);
374
+ catch (ex) {
380
375
  if (this.tracker)
381
- this.tracker.delta(hydra_crawler_ts_assets_1.EStatus.FAILED, 1);
382
- if (tscommons_core_1.CommonsType.hasPropertyString(ex, 'code')) {
383
- await this.database.setFailReason(url, ex.code);
376
+ yield this.tracker.failed(url);
377
+ const ttl = (yield this.database.getTtl(url)) || 0;
378
+ if (ttl < this.crawlConfig.maxFailedTtl) {
379
+ yield this.database.setTtl(url, ttl + 1);
380
+ yield this.database.setStatus(url, EStatus.QUEUED);
381
+ if (this.tracker)
382
+ this.tracker.delta(EStatus.QUEUED, 1);
384
383
  }
385
- else if (tscommons_core_1.CommonsType.hasPropertyString(ex, 'message')) {
386
- if (/^Timeout on crawl/.test(ex.message)) {
387
- await this.database.setFailReason(url, 'TIMEOUT');
384
+ else {
385
+ yield this.database.setStatus(url, EStatus.FAILED);
386
+ if (this.tracker)
387
+ this.tracker.delta(EStatus.FAILED, 1);
388
+ if (commonsTypeHasPropertyString(ex, 'code')) {
389
+ yield this.database.setFailReason(url, ex.code);
388
390
  }
389
- else {
390
- await this.database.setFailReason(url, ex.message);
391
+ else if (commonsTypeHasPropertyString(ex, 'message')) {
392
+ if (/^Timeout on crawl/.test(ex.message)) {
393
+ yield this.database.setFailReason(url, 'TIMEOUT');
394
+ }
395
+ else {
396
+ yield this.database.setFailReason(url, ex.message);
397
+ }
391
398
  }
392
399
  }
393
400
  }
394
- }
395
- finally {
396
- if (this.tracker)
397
- this.tracker.delta(hydra_crawler_ts_assets_1.EStatus.ACTIVE, -1);
398
- }
399
- tally++;
400
- if (tally >= this.crawlConfig.maxFetchesPerCrawl) {
401
- nodecommons_cli_1.CommonsOutput.alert(`Crawl for ${this.domain} reached the maximum permitted fetches for this session.`);
402
- break;
401
+ finally {
402
+ if (this.tracker)
403
+ this.tracker.delta(EStatus.ACTIVE, -1);
404
+ }
405
+ tally++;
406
+ if (tally >= this.crawlConfig.maxFetchesPerCrawl) {
407
+ commonsOutputAlert(`Crawl for ${this.domain} reached the maximum permitted fetches for this session.`);
408
+ break;
409
+ }
403
410
  }
404
411
  }
405
- }
406
- catch (e) {
407
- nodecommons_cli_1.CommonsOutput.debug('debug position 1');
408
- console.log(e);
409
- }
410
- finally {
411
- nodecommons_process_1.CommonsGracefulAbort.removeCallback(gracefulAbortId);
412
- }
412
+ catch (e) {
413
+ commonsOutputDebug('debug position 1');
414
+ console.log(e);
415
+ }
416
+ finally {
417
+ commonsGracefulAbortRemoveCallback(gracefulAbortId);
418
+ }
419
+ });
413
420
  }
414
421
  }
415
- exports.Crawler = Crawler;
422
+ //# sourceMappingURL=crawler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crawler.js","sourceRoot":"","sources":["../../src/classes/crawler.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAErF,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEnF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EAAE,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