A Python robot that edits Wikipedia and interacts with people over IRC https://en.wikipedia.org/wiki/User:EarwigBot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

679 rivejä
28 KiB

  1. # -*- coding: utf-8 -*-
  2. #
  3. # Copyright (C) 2009-2012 by Ben Kurtovic <ben.kurtovic@verizon.net>
  4. #
  5. # Permission is hereby granted, free of charge, to any person obtaining a copy
  6. # of this software and associated documentation files (the "Software"), to deal
  7. # in the Software without restriction, including without limitation the rights
  8. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. # copies of the Software, and to permit persons to whom the Software is
  10. # furnished to do so, subject to the following conditions:
  11. #
  12. # The above copyright notice and this permission notice shall be included in
  13. # all copies or substantial portions of the Software.
  14. #
  15. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  21. # SOFTWARE.
  22. from hashlib import md5
  23. import re
  24. from time import gmtime, strftime
  25. from urllib import quote
  26. from earwigbot.wiki.copyright import CopyrightMixin
  27. from earwigbot.wiki.exceptions import *
  28. class Page(CopyrightMixin):
  29. """
  30. EarwigBot's Wiki Toolset: Page Class
  31. Represents a Page on a given Site. Has methods for getting information
  32. about the page, getting page content, and so on. Category is a subclass of
  33. Page with additional methods.
  34. Public methods:
  35. title -- returns the page's title, or pagename
  36. exists -- returns whether the page exists
  37. pageid -- returns an integer ID representing the page
  38. url -- returns the page's URL
  39. namespace -- returns the page's namespace as an integer
  40. protection -- returns the page's current protection status
  41. creator -- returns the page's creator (first user to edit)
  42. is_talkpage -- returns True if the page is a talkpage, else False
  43. is_redirect -- returns True if the page is a redirect, else False
  44. toggle_talk -- returns a content page's talk page, or vice versa
  45. get -- returns page content
  46. get_redirect_target -- if the page is a redirect, returns its destination
  47. edit -- replaces the page's content or creates a new page
  48. add_section -- adds a new section at the bottom of the page
  49. copyvio_check -- checks the page for copyright violations
  50. """
  51. re_redirect = "^\s*\#\s*redirect\s*\[\[(.*?)\]\]"
  52. def __init__(self, site, title, follow_redirects=False):
  53. """Constructor for new Page instances.
  54. Takes three arguments: a Site object, the Page's title (or pagename),
  55. and whether or not to follow redirects (optional, defaults to False).
  56. As with User, site.get_page() is preferred. Site's method has support
  57. for a default `follow_redirects` value in our config, while __init__
  58. always defaults to False.
  59. __init__ will not do any API queries, but it will use basic namespace
  60. logic to determine our namespace ID and if we are a talkpage.
  61. """
  62. super(Page, self).__init__(site)
  63. self._site = site
  64. self._title = title.strip()
  65. self._follow_redirects = self._keep_following = follow_redirects
  66. self._exists = 0
  67. self._pageid = None
  68. self._is_redirect = None
  69. self._lastrevid = None
  70. self._protection = None
  71. self._fullurl = None
  72. self._content = None
  73. self._creator = None
  74. # Attributes used for editing/deleting/protecting/etc:
  75. self._token = None
  76. self._basetimestamp = None
  77. self._starttimestamp = None
  78. # Try to determine the page's namespace using our site's namespace
  79. # converter:
  80. prefix = self._title.split(":", 1)[0]
  81. if prefix != title: # ignore a page that's titled "Category" or "User"
  82. try:
  83. self._namespace = self._site.namespace_name_to_id(prefix)
  84. except NamespaceNotFoundError:
  85. self._namespace = 0
  86. else:
  87. self._namespace = 0
  88. # Is this a talkpage? Talkpages have odd IDs, while content pages have
  89. # even IDs, excluding the "special" namespaces:
  90. if self._namespace < 0:
  91. self._is_talkpage = False
  92. else:
  93. self._is_talkpage = self._namespace % 2 == 1
  94. def __repr__(self):
  95. """Returns the canonical string representation of the Page."""
  96. res = "Page(title={0!r}, follow_redirects={1!r}, site={2!r})"
  97. return res.format(self._title, self._follow_redirects, self._site)
  98. def __str__(self):
  99. """Returns a nice string representation of the Page."""
  100. return '<Page "{0}" of {1}>'.format(self.title(), str(self._site))
  101. def _force_validity(self):
  102. """Used to ensure that our page's title is valid.
  103. If this method is called when our page is not valid (and after
  104. _load_attributes() has been called), InvalidPageError will be raised.
  105. Note that validity != existence. If a page's title is invalid (e.g, it
  106. contains "[") it will always be invalid, and cannot be edited.
  107. """
  108. if self._exists == 1:
  109. e = "Page '{0}' is invalid.".format(self._title)
  110. raise InvalidPageError(e)
  111. def _force_existence(self):
  112. """Used to ensure that our page exists.
  113. If this method is called when our page doesn't exist (and after
  114. _load_attributes() has been called), PageNotFoundError will be raised.
  115. It will also call _force_validity() beforehand.
  116. """
  117. self._force_validity()
  118. if self._exists == 2:
  119. e = "Page '{0}' does not exist.".format(self._title)
  120. raise PageNotFoundError(e)
  121. def _load_wrapper(self):
  122. """Calls _load_attributes() and follows redirects if we're supposed to.
  123. This method will only follow redirects if follow_redirects=True was
  124. passed to __init__() (perhaps indirectly passed by site.get_page()).
  125. It avoids the API's &redirects param in favor of manual following,
  126. so we can act more realistically (we don't follow double redirects, and
  127. circular redirects don't break us).
  128. This will raise RedirectError if we have a problem following, but that
  129. is a bug and should NOT happen.
  130. If we're following a redirect, this will make a grand total of three
  131. API queries. It's a lot, but each one is quite small.
  132. """
  133. self._load_attributes()
  134. if self._keep_following and self._is_redirect:
  135. self._title = self.get_redirect_target()
  136. self._keep_following = False # don't follow double redirects
  137. self._content = None # reset the content we just loaded
  138. self._load_attributes()
  139. def _load_attributes(self, result=None):
  140. """Loads various data from the API in a single query.
  141. Loads self._title, ._exists, ._is_redirect, ._pageid, ._fullurl,
  142. ._protection, ._namespace, ._is_talkpage, ._creator, ._lastrevid,
  143. ._token, and ._starttimestamp using the API. It will do a query of
  144. its own unless `result` is provided, in which case we'll pretend
  145. `result` is what the query returned.
  146. Assuming the API is sound, this should not raise any exceptions.
  147. """
  148. if not result:
  149. params = {"action": "query", "rvprop": "user", "intoken": "edit",
  150. "prop": "info|revisions", "rvlimit": 1, "rvdir": "newer",
  151. "titles": self._title, "inprop": "protection|url"}
  152. result = self._site._api_query(params)
  153. res = result["query"]["pages"].values()[0]
  154. # Normalize our pagename/title thing:
  155. self._title = res["title"]
  156. try:
  157. res["redirect"]
  158. except KeyError:
  159. self._is_redirect = False
  160. else:
  161. self._is_redirect = True
  162. self._pageid = result["query"]["pages"].keys()[0]
  163. if int(self._pageid) < 0:
  164. try:
  165. res["missing"]
  166. except KeyError:
  167. # If it has a negative ID and it's invalid, then break here,
  168. # because there's no other data for us to get:
  169. self._exists = 1
  170. return
  171. else:
  172. # If it has a negative ID and it's missing; we can still get
  173. # data like the namespace, protection, and URL:
  174. self._exists = 2
  175. else:
  176. self._exists = 3
  177. self._fullurl = res["fullurl"]
  178. self._protection = res["protection"]
  179. try:
  180. self._token = res["edittoken"]
  181. except KeyError:
  182. pass
  183. else:
  184. self._starttimestamp = strftime("%Y-%m-%dT%H:%M:%SZ", gmtime())
  185. # We've determined the namespace and talkpage status in __init__()
  186. # based on the title, but now we can be sure:
  187. self._namespace = res["ns"]
  188. self._is_talkpage = self._namespace % 2 == 1 # talkpages have odd IDs
  189. # These last two fields will only be specified if the page exists:
  190. self._lastrevid = res.get("lastrevid")
  191. try:
  192. self._creator = res['revisions'][0]['user']
  193. except KeyError:
  194. pass
  195. def _load_content(self, result=None):
  196. """Loads current page content from the API.
  197. If `result` is provided, we'll pretend that is the result of an API
  198. query and try to get content from that. Otherwise, we'll do an API
  199. query on our own.
  200. Don't call this directly, ever - use .get(force=True) if you want to
  201. force content reloading.
  202. """
  203. if not result:
  204. params = {"action": "query", "prop": "revisions", "rvlimit": 1,
  205. "rvprop": "content|timestamp", "titles": self._title}
  206. result = self._site._api_query(params)
  207. res = result["query"]["pages"].values()[0]
  208. try:
  209. self._content = res["revisions"][0]["*"]
  210. self._basetimestamp = res["revisions"][0]["timestamp"]
  211. except KeyError:
  212. # This can only happen if the page was deleted since we last called
  213. # self._load_attributes(). In that case, some of our attributes are
  214. # outdated, so force another self._load_attributes():
  215. self._load_attributes()
  216. self._force_existence()
  217. def _edit(self, params=None, text=None, summary=None, minor=None, bot=None,
  218. force=None, section=None, captcha_id=None, captcha_word=None,
  219. tries=0):
  220. """Edit the page!
  221. If `params` is given, we'll use it as our API query parameters.
  222. Otherwise, we'll build params using the given kwargs via
  223. _build_edit_params().
  224. We'll then try to do the API query, and catch any errors the API raises
  225. in _handle_edit_errors(). We'll then throw these back as subclasses of
  226. EditError.
  227. """
  228. # Try to get our edit token, and die if we can't:
  229. if not self._token:
  230. self._load_attributes()
  231. if not self._token:
  232. e = "You don't have permission to edit this page."
  233. raise PermissionsError(e)
  234. # Weed out invalid pages before we get too far:
  235. self._force_validity()
  236. # Build our API query string:
  237. if not params:
  238. params = self._build_edit_params(text, summary, minor, bot, force,
  239. section, captcha_id, captcha_word)
  240. else: # Make sure we have the right token:
  241. params["token"] = self._token
  242. # Try the API query, catching most errors with our handler:
  243. try:
  244. result = self._site._api_query(params)
  245. except SiteAPIError as error:
  246. if not hasattr(error, "code"):
  247. raise # We can only handle errors with a code attribute
  248. result = self._handle_edit_errors(error, params, tries)
  249. # If everything was successful, reset invalidated attributes:
  250. if result["edit"]["result"] == "Success":
  251. self._content = None
  252. self._basetimestamp = None
  253. self._exists = 0
  254. return
  255. # If we're here, then the edit failed. If it's because of AssertEdit,
  256. # handle that. Otherwise, die - something odd is going on:
  257. try:
  258. assertion = result["edit"]["assert"]
  259. except KeyError:
  260. raise EditError(result["edit"])
  261. self._handle_assert_edit(assertion, params, tries)
  262. def _build_edit_params(self, text, summary, minor, bot, force, section,
  263. captcha_id, captcha_word):
  264. """Given some keyword arguments, build an API edit query string."""
  265. hashed = md5(text).hexdigest() # Checksum to ensure text is correct
  266. params = {"action": "edit", "title": self._title, "text": text,
  267. "token": self._token, "summary": summary, "md5": hashed}
  268. if section:
  269. params["section"] = section
  270. if captcha_id and captcha_word:
  271. params["captchaid"] = captcha_id
  272. params["captchaword"] = captcha_word
  273. if minor:
  274. params["minor"] = "true"
  275. else:
  276. params["notminor"] = "true"
  277. if bot:
  278. params["bot"] = "true"
  279. if not force:
  280. params["starttimestamp"] = self._starttimestamp
  281. if self._basetimestamp:
  282. params["basetimestamp"] = self._basetimestamp
  283. if self._exists == 2:
  284. # Page does not exist; don't edit if it already exists:
  285. params["createonly"] = "true"
  286. else:
  287. params["recreate"] = "true"
  288. return params
  289. def _handle_edit_errors(self, error, params, tries):
  290. """If our edit fails due to some error, try to handle it.
  291. We'll either raise an appropriate exception (for example, if the page
  292. is protected), or we'll try to fix it (for example, if we can't edit
  293. due to being logged out, we'll try to log in).
  294. """
  295. if error.code in ["noedit", "cantcreate", "protectedtitle",
  296. "noimageredirect"]:
  297. raise PermissionsError(error.info)
  298. elif error.code in ["noedit-anon", "cantcreate-anon",
  299. "noimageredirect-anon"]:
  300. if not all(self._site._login_info):
  301. # Insufficient login info:
  302. raise PermissionsError(error.info)
  303. if tries == 0:
  304. # We have login info; try to login:
  305. self._site._login(self._site._login_info)
  306. self._token = None # Need a new token; old one is invalid now
  307. return self._edit(params=params, tries=1)
  308. else:
  309. # We already tried to log in and failed!
  310. e = "Although we should be logged in, we are not. This may be a cookie problem or an odd bug."
  311. raise LoginError(e)
  312. elif error.code in ["editconflict", "pagedeleted", "articleexists"]:
  313. # These attributes are now invalidated:
  314. self._content = None
  315. self._basetimestamp = None
  316. self._exists = 0
  317. raise EditConflictError(error.info)
  318. elif error.code in ["emptypage", "emptynewsection"]:
  319. raise NoContentError(error.info)
  320. elif error.code == "contenttoobig":
  321. raise ContentTooBigError(error.info)
  322. elif error.code == "spamdetected":
  323. raise SpamDetectedError(error.info)
  324. elif error.code == "filtered":
  325. raise FilteredError(error.info)
  326. raise EditError(": ".join((error.code, error.info)))
  327. def _handle_assert_edit(self, assertion, params, tries):
  328. """If we can't edit due to a failed AssertEdit assertion, handle that.
  329. If the assertion was 'user' and we have valid login information, try to
  330. log in. Otherwise, raise PermissionsError with details.
  331. """
  332. if assertion == "user":
  333. if not all(self._site._login_info):
  334. # Insufficient login info:
  335. e = "AssertEdit: user assertion failed, and no login info was provided."
  336. raise PermissionsError(e)
  337. if tries == 0:
  338. # We have login info; try to login:
  339. self._site._login(self._site._login_info)
  340. self._token = None # Need a new token; old one is invalid now
  341. return self._edit(params=params, tries=1)
  342. else:
  343. # We already tried to log in and failed!
  344. e = "Although we should be logged in, we are not. This may be a cookie problem or an odd bug."
  345. raise LoginError(e)
  346. elif assertion == "bot":
  347. e = "AssertEdit: bot assertion failed; we don't have a bot flag!"
  348. raise PermissionsError(e)
  349. # Unknown assertion, maybe "true", "false", or "exists":
  350. e = "AssertEdit: assertion '{0}' failed.".format(assertion)
  351. raise PermissionsError(e)
  352. def title(self, force=False):
  353. """Returns the Page's title, or pagename.
  354. This won't do any API queries on its own unless force is True, in which
  355. case the title will be forcibly reloaded from the API (normalizing it,
  356. and following redirects if follow_redirects=True was passed to
  357. __init__()). Any other methods that do API queries will reload title on
  358. their own, however, like exists() and get().
  359. """
  360. if force:
  361. self._load_wrapper()
  362. return self._title
  363. def exists(self, force=False):
  364. """Returns information about whether the Page exists or not.
  365. The returned "information" is a tuple with two items. The first is a
  366. bool, either True if the page exists or False if it does not. The
  367. second is a string giving more information, either "invalid", (title
  368. is invalid, e.g. it contains "["), "missing", or "exists".
  369. Makes an API query if force is True or if we haven't already made one.
  370. """
  371. cases = {
  372. 0: (None, "unknown"),
  373. 1: (False, "invalid"),
  374. 2: (False, "missing"),
  375. 3: (True, "exists"),
  376. }
  377. if self._exists == 0 or force:
  378. self._load_wrapper()
  379. return cases[self._exists]
  380. def pageid(self, force=False):
  381. """Returns an integer ID representing the Page.
  382. Makes an API query if force is True or if we haven't already made one.
  383. Raises InvalidPageError or PageNotFoundError if the page name is
  384. invalid or the page does not exist, respectively.
  385. """
  386. if self._exists == 0 or force:
  387. self._load_wrapper()
  388. self._force_existence() # missing pages do not have IDs
  389. return self._pageid
  390. def url(self, force=False):
  391. """Returns the page's URL.
  392. Like title(), this won't do any API queries on its own unless force is
  393. True. If the API was never queried for this page, we will attempt to
  394. determine the URL ourselves based on the title.
  395. """
  396. if force:
  397. self._load_wrapper()
  398. if self._fullurl:
  399. return self._fullurl
  400. else:
  401. slug = quote(self._title.replace(" ", "_"), safe="/:")
  402. path = self._site._article_path.replace("$1", slug)
  403. return ''.join((self._site._base_url, path))
  404. def namespace(self, force=False):
  405. """Returns the page's namespace ID (an integer).
  406. Like title(), this won't do any API queries on its own unless force is
  407. True. If the API was never queried for this page, we will attempt to
  408. determine the namespace ourselves based on the title.
  409. """
  410. if force:
  411. self._load_wrapper()
  412. return self._namespace
  413. def protection(self, force=False):
  414. """Returns the page's current protection status.
  415. Makes an API query if force is True or if we haven't already made one.
  416. Raises InvalidPageError if the page name is invalid. Will not raise an
  417. error if the page is missing because those can still be protected.
  418. """
  419. if self._exists == 0 or force:
  420. self._load_wrapper()
  421. self._force_validity() # invalid pages cannot be protected
  422. return self._protection
  423. def creator(self, force=False):
  424. """Returns the page's creator (i.e., the first user to edit the page).
  425. Makes an API query if force is True or if we haven't already made one.
  426. Normally, we can get the creator along with everything else (except
  427. content) in self._load_attributes(). However, due to a limitation in
  428. the API (can't get the editor of one revision and the content of
  429. another at both ends of the history), if our other attributes were only
  430. loaded from get(), we'll have to do another API query. This is done
  431. by calling ourselves again with force=True.
  432. Raises InvalidPageError or PageNotFoundError if the page name is
  433. invalid or the page does not exist, respectively.
  434. """
  435. if self._exists == 0 or force:
  436. self._load_wrapper()
  437. self._force_existence()
  438. if not self._creator and not force:
  439. self.creator(force=True)
  440. return self._creator
  441. def is_talkpage(self, force=False):
  442. """Returns True if the page is a talkpage, else False.
  443. Like title(), this won't do any API queries on its own unless force is
  444. True. If the API was never queried for this page, we will attempt to
  445. determine the talkpage status ourselves based on its namespace ID.
  446. """
  447. if force:
  448. self._load_wrapper()
  449. return self._is_talkpage
  450. def is_redirect(self, force=False):
  451. """Returns True if the page is a redirect, else False.
  452. Makes an API query if force is True or if we haven't already made one.
  453. We will return False even if the page does not exist or is invalid.
  454. """
  455. if self._exists == 0 or force:
  456. self._load_wrapper()
  457. return self._is_redirect
  458. def toggle_talk(self, force=False, follow_redirects=None):
  459. """Returns a content page's talk page, or vice versa.
  460. The title of the new page is determined by namespace logic, not API
  461. queries. We won't make any API queries on our own unless force is True,
  462. and the only reason then would be to forcibly update the title or
  463. follow redirects if we haven't already made an API query.
  464. If `follow_redirects` is anything other than None (the default), it
  465. will be passed to the new Page's __init__(). Otherwise, we'll use the
  466. value passed to our own __init__().
  467. Will raise InvalidPageError if we try to get the talk page of a special
  468. page (in the Special: or Media: namespaces), but we won't raise an
  469. exception if our page is otherwise missing or invalid.
  470. """
  471. if force:
  472. self._load_wrapper()
  473. if self._namespace < 0:
  474. ns = self._site.namespace_id_to_name(self._namespace)
  475. e = "Pages in the {0} namespace can't have talk pages.".format(ns)
  476. raise InvalidPageError(e)
  477. if self._is_talkpage:
  478. new_ns = self._namespace - 1
  479. else:
  480. new_ns = self._namespace + 1
  481. try:
  482. body = self._title.split(":", 1)[1]
  483. except IndexError:
  484. body = self._title
  485. new_prefix = self._site.namespace_id_to_name(new_ns)
  486. # If the new page is in namespace 0, don't do ":Title" (it's correct,
  487. # but unnecessary), just do "Title":
  488. if new_prefix:
  489. new_title = ':'.join((new_prefix, body))
  490. else:
  491. new_title = body
  492. if follow_redirects is None:
  493. follow_redirects = self._follow_redirects
  494. return Page(self._site, new_title, follow_redirects)
  495. def get(self, force=False):
  496. """Returns page content, which is cached if you try to call get again.
  497. Use `force` to forcibly reload page content even if we've already
  498. loaded some. This is good if you want to edit a page multiple times,
  499. and you want to get updated content before you make your second edit.
  500. Raises InvalidPageError or PageNotFoundError if the page name is
  501. invalid or the page does not exist, respectively.
  502. """
  503. if force or self._exists == 0:
  504. # Kill two birds with one stone by doing an API query for both our
  505. # attributes and our page content:
  506. params = {"action": "query", "rvlimit": 1, "titles": self._title,
  507. "prop": "info|revisions", "inprop": "protection|url",
  508. "intoken": "edit", "rvprop": "content|timestamp"}
  509. result = self._site._api_query(params)
  510. self._load_attributes(result=result)
  511. self._force_existence()
  512. self._load_content(result=result)
  513. # Follow redirects if we're told to:
  514. if self._keep_following and self._is_redirect:
  515. self._title = self.get_redirect_target()
  516. self._keep_following = False # don't follow double redirects
  517. self._content = None # reset the content we just loaded
  518. self.get(force=True)
  519. return self._content
  520. # Make sure we're dealing with a real page here. This may be outdated
  521. # if the page was deleted since we last called self._load_attributes(),
  522. # but self._load_content() can handle that:
  523. self._force_existence()
  524. if self._content is None:
  525. self._load_content()
  526. return self._content
  527. def get_redirect_target(self, force=False):
  528. """If the page is a redirect, returns its destination.
  529. Use `force` to forcibly reload content even if we've already loaded
  530. some before. Note that this method calls get() for page content.
  531. Raises InvalidPageError or PageNotFoundError if the page name is
  532. invalid or the page does not exist, respectively. Raises RedirectError
  533. if the page is not a redirect.
  534. """
  535. content = self.get(force)
  536. try:
  537. return re.findall(self.re_redirect, content, flags=re.I)[0]
  538. except IndexError:
  539. e = "The page does not appear to have a redirect target."
  540. raise RedirectError(e)
  541. def edit(self, text, summary, minor=False, bot=True, force=False):
  542. """Replaces the page's content or creates a new page.
  543. `text` is the new page content, with `summary` as the edit summary.
  544. If `minor` is True, the edit will be marked as minor. If `bot` is true,
  545. the edit will be marked as a bot edit, but only if we actually have a
  546. bot flag.
  547. Use `force` to push the new content even if there's an edit conflict or
  548. the page was deleted/recreated between getting our edit token and
  549. editing our page. Be careful with this!
  550. """
  551. self._edit(text=text, summary=summary, minor=minor, bot=bot,
  552. force=force)
  553. def add_section(self, text, title, minor=False, bot=True, force=False):
  554. """Adds a new section to the bottom of the page.
  555. The arguments for this are the same as those for edit(), but instead of
  556. providing a summary, you provide a section title.
  557. Likewise, raised exceptions are the same as edit()'s.
  558. This should create the page if it does not already exist, with just the
  559. new section as content.
  560. """
  561. self._edit(text=text, summary=title, minor=minor, bot=bot, force=force,
  562. section="new")