MCPcopy
hub / github.com/praw-dev/praw / submission

Method submission

praw/reddit.py:932–943  ·  view source on GitHub ↗

Return a lazy instance of :class:`.Submission`. :param id: A Reddit base36 submission ID, e.g., ``"2gmzqe"``. :param url: A URL supported by :meth:`.Submission.id_from_url`. Either ``id`` or ``url`` can be provided, but not both.

(self, id: str | None = None, *, url: str | None = None)

Source from the content-addressed store, hash-verified

930 ) from exception
931
932 def submission(self, id: str | None = None, *, url: str | None = None) -> models.Submission:
933 """Return a lazy instance of :class:`.Submission`.
934
935 :param id: A Reddit base36 submission ID, e.g., ``"2gmzqe"``.
936 :param url: A URL supported by :meth:`.Submission.id_from_url`.
937
938 Either ``id`` or ``url`` can be provided, but not both.
939
940 """
941 if url:
942 url = self._resolve_share_url(url)
943 return models.Submission(self, id=id, url=url)
944
945 def username_available(self, name: str) -> bool:
946 """Check to see if the username is available.

Calls 1

_resolve_share_urlMethod · 0.95