Skip to content

Commit be24955

Browse files
committed
Added exceptions docs
1 parent 1f25281 commit be24955

24 files changed

+596
-7
lines changed
3.15 KB
Binary file not shown.
1.32 KB
Binary file not shown.
15.7 KB
Binary file not shown.
24 Bytes
Binary file not shown.
3.15 KB
Binary file not shown.
3.15 KB
Binary file not shown.

docs/_build/html/_sources/cli.md.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
```{include} _templates/nav.html
2+
```
3+
14
# Command-line usage
25

36
The Python library is also installed as a command-line interface. You can run it from your terminal like so:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
```{include} _templates/nav.html
2+
```
3+
4+
# Exceptions
5+
6+
Custom errors you can expect.
7+
8+
```{eval-rst}
9+
.. automodule:: savepagenow.exceptions
10+
:members:
11+
:undoc-members:
12+
:show-inheritance:
13+
```

docs/_build/html/_sources/index.md.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ install
1313
python
1414
cli
1515
useragent
16+
exceptions
1617
```
1718

1819
## Links
1920

20-
- Documentation: [palewi.re/docs/savepagenow](https://palewi.re/docs/savepagenow)
21+
- Documentation: [palewi.re/docs/savepagenow/](https://palewi.re/docs/savepagenow/)
2122
- Code: [github.com/palewire/savepagenow](https://github.com/palewire/savepagenow)
2223
- Issues: [github.com/palewire/savepagenow/issues](https://github.com/palewire/savepagenow/issues)
2324
- Packaging: [pypi.org/project/savepagenow](https://pypi.org/project/savepagenow)

docs/_build/html/_sources/python.md.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
```{include} _templates/nav.html
2+
```
3+
14
# Python Usage
25

36
First import the library into your Python code.

docs/_build/html/_sources/useragent.md.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
```{include} _templates/nav.html
2+
```
3+
14
# Customizing the user agent
25

36
In an effort to be transparent and polite to the Internet Archive, all requests made by savepagenow carry a custom [user agent](https://en.wikipedia.org/wiki/User_agent) that identifies itself as ``"savepagenow (https://github.com/pastpages/savepagenow)"``.

docs/_build/html/cli.html

+49-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,54 @@
3636

3737
<div class="body" role="main">
3838

39-
<section id="command-line-usage">
39+
<nav>
40+
<div class="row">
41+
<div class="sevencol">
42+
<div class="shingle">
43+
<a href="https://palewi.re/">
44+
<div rel="rnews:copyrightedBy rnews:hasSource rnews:providedBy">
45+
<div about="http://palewi.re/" typeof="rnews:Organization">
46+
<div property="rnews:name">palewire</div>
47+
</div>
48+
</div>
49+
</a>
50+
</div>
51+
</div>
52+
<div class="fivecol last links">
53+
<ul>
54+
<li>
55+
<a href="http://palewi.re/posts/" title="Posts">
56+
Posts
57+
</a>
58+
</li>
59+
<li>
60+
<a href="http://palewi.re/work/" title="Work">
61+
Work
62+
</a>
63+
</li>
64+
<li>
65+
<a href="http://palewi.re/talks/" title="Talks">
66+
Talks
67+
</a>
68+
</li>
69+
<li>
70+
<a href="http://palewi.re/docs/" title="Docs">
71+
Docs
72+
</a>
73+
</li>
74+
<li>
75+
<a href="http://palewi.re/who-is-ben-welsh/" title="Who is Ben Welsh?">
76+
About
77+
</a>
78+
</li>
79+
</ul>
80+
</div>
81+
</div>
82+
</nav>
83+
<div class="row topbar">
84+
<div class="twelvecol last"></div>
85+
</div>
86+
<section id="command-line-usage">
4087
<h1>Command-line usage<a class="headerlink" href="#command-line-usage" title="Permalink to this headline"></a></h1>
4188
<p>The Python library is also installed as a command-line interface. You can run it from your terminal like so:</p>
4289
<p>The command has the same options as the Python API.</p>
@@ -116,6 +163,7 @@ <h3>Navigation</h3>
116163
<li class="toctree-l1"><a class="reference internal" href="python.html">Python Usage</a></li>
117164
<li class="toctree-l1 current"><a class="current reference internal" href="#">Command-line usage</a></li>
118165
<li class="toctree-l1"><a class="reference internal" href="useragent.html">Customizing the user agent</a></li>
166+
<li class="toctree-l1"><a class="reference internal" href="exceptions.html">Exceptions</a></li>
119167
</ul>
120168

121169
<div class="relations">

docs/_build/html/exceptions.html

+196
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
2+
<!DOCTYPE html>
3+
4+
<html>
5+
<head>
6+
<meta charset="utf-8" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
8+
9+
<title>Exceptions &#8212; savepagenow documentation</title>
10+
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
11+
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
12+
<link rel="stylesheet" type="text/css" href="_static/css/custom.css" />
13+
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
14+
<script src="_static/jquery.js"></script>
15+
<script src="_static/underscore.js"></script>
16+
<script src="_static/doctools.js"></script>
17+
<link rel="index" title="Index" href="genindex.html" />
18+
<link rel="search" title="Search" href="search.html" />
19+
<link rel="prev" title="Customizing the user agent" href="useragent.html" />
20+
21+
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
22+
23+
24+
<link rel="canonical" href="https://palewi.re/docs/savepagenow/exceptions.html"/>
25+
26+
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
27+
28+
</head><body>
29+
30+
31+
<div class="document">
32+
<div class="documentwrapper">
33+
<div class="bodywrapper">
34+
35+
36+
<div class="body" role="main">
37+
38+
<nav>
39+
<div class="row">
40+
<div class="sevencol">
41+
<div class="shingle">
42+
<a href="https://palewi.re/">
43+
<div rel="rnews:copyrightedBy rnews:hasSource rnews:providedBy">
44+
<div about="http://palewi.re/" typeof="rnews:Organization">
45+
<div property="rnews:name">palewire</div>
46+
</div>
47+
</div>
48+
</a>
49+
</div>
50+
</div>
51+
<div class="fivecol last links">
52+
<ul>
53+
<li>
54+
<a href="http://palewi.re/posts/" title="Posts">
55+
Posts
56+
</a>
57+
</li>
58+
<li>
59+
<a href="http://palewi.re/work/" title="Work">
60+
Work
61+
</a>
62+
</li>
63+
<li>
64+
<a href="http://palewi.re/talks/" title="Talks">
65+
Talks
66+
</a>
67+
</li>
68+
<li>
69+
<a href="http://palewi.re/docs/" title="Docs">
70+
Docs
71+
</a>
72+
</li>
73+
<li>
74+
<a href="http://palewi.re/who-is-ben-welsh/" title="Who is Ben Welsh?">
75+
About
76+
</a>
77+
</li>
78+
</ul>
79+
</div>
80+
</div>
81+
</nav>
82+
<div class="row topbar">
83+
<div class="twelvecol last"></div>
84+
</div>
85+
<section id="exceptions">
86+
<h1>Exceptions<a class="headerlink" href="#exceptions" title="Permalink to this headline"></a></h1>
87+
<p>Custom errors you can expect.</p>
88+
<span class="target" id="module-savepagenow.exceptions"></span><dl class="py exception">
89+
<dt class="sig sig-object py" id="savepagenow.exceptions.BlockedByRobots">
90+
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">savepagenow.exceptions.</span></span><span class="sig-name descname"><span class="pre">BlockedByRobots</span></span><a class="headerlink" href="#savepagenow.exceptions.BlockedByRobots" title="Permalink to this definition"></a></dt>
91+
<dd><p>Bases: <a class="reference internal" href="#savepagenow.exceptions.WaybackRuntimeError" title="savepagenow.exceptions.WaybackRuntimeError"><code class="xref py py-class docutils literal notranslate"><span class="pre">savepagenow.exceptions.WaybackRuntimeError</span></code></a></p>
92+
<p>Raised when archive.org has been blocked by the site’s robots.txt access control instructions.</p>
93+
</dd></dl>
94+
95+
<dl class="py exception">
96+
<dt class="sig sig-object py" id="savepagenow.exceptions.CachedPage">
97+
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">savepagenow.exceptions.</span></span><span class="sig-name descname"><span class="pre">CachedPage</span></span><a class="headerlink" href="#savepagenow.exceptions.CachedPage" title="Permalink to this definition"></a></dt>
98+
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
99+
<p>Raised when archive.org declines to make a new capture and instead returns the cached version of most recent archive.</p>
100+
</dd></dl>
101+
102+
<dl class="py exception">
103+
<dt class="sig sig-object py" id="savepagenow.exceptions.TooManyRequests">
104+
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">savepagenow.exceptions.</span></span><span class="sig-name descname"><span class="pre">TooManyRequests</span></span><a class="headerlink" href="#savepagenow.exceptions.TooManyRequests" title="Permalink to this definition"></a></dt>
105+
<dd><p>Bases: <a class="reference internal" href="#savepagenow.exceptions.WaybackRuntimeError" title="savepagenow.exceptions.WaybackRuntimeError"><code class="xref py py-class docutils literal notranslate"><span class="pre">savepagenow.exceptions.WaybackRuntimeError</span></code></a></p>
106+
<p>Raised when archive.org when you have exceeded its throttle on request frequency. Slow it down.</p>
107+
</dd></dl>
108+
109+
<dl class="py exception">
110+
<dt class="sig sig-object py" id="savepagenow.exceptions.WaybackRuntimeError">
111+
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">savepagenow.exceptions.</span></span><span class="sig-name descname"><span class="pre">WaybackRuntimeError</span></span><a class="headerlink" href="#savepagenow.exceptions.WaybackRuntimeError" title="Permalink to this definition"></a></dt>
112+
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
113+
<p>An error returned by the Wayback Machine.</p>
114+
</dd></dl>
115+
116+
</section>
117+
118+
119+
</div>
120+
<div class="related bottom">
121+
&nbsp;
122+
<nav id="rellinks">
123+
<ul>
124+
<li>
125+
&larr;
126+
<a href="useragent.html" title="Previous document">Customizing the user agent</a>
127+
</li>
128+
</ul>
129+
</nav>
130+
</div>
131+
132+
</div>
133+
</div>
134+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
135+
<div class="sphinxsidebarwrapper">
136+
<h1 class="logo"><a href="index.html">savepagenow</a></h1>
137+
138+
139+
140+
141+
142+
143+
144+
145+
<h3>Navigation</h3>
146+
<ul class="current">
147+
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
148+
<li class="toctree-l1"><a class="reference internal" href="python.html">Python Usage</a></li>
149+
<li class="toctree-l1"><a class="reference internal" href="cli.html">Command-line usage</a></li>
150+
<li class="toctree-l1"><a class="reference internal" href="useragent.html">Customizing the user agent</a></li>
151+
<li class="toctree-l1 current"><a class="current reference internal" href="#">Exceptions</a></li>
152+
</ul>
153+
154+
<div class="relations">
155+
<h3>Related Topics</h3>
156+
<ul>
157+
<li><a href="index.html">Documentation overview</a><ul>
158+
<li>Previous: <a href="useragent.html" title="previous chapter">Customizing the user agent</a></li>
159+
</ul></li>
160+
</ul>
161+
</div>
162+
<div id="searchbox" style="display: none" role="search">
163+
<h3 id="searchlabel">Quick search</h3>
164+
<div class="searchformwrapper">
165+
<form class="search" action="search.html" method="get">
166+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
167+
<input type="submit" value="Go" />
168+
</form>
169+
</div>
170+
</div>
171+
<script>$('#searchbox').show(0);</script>
172+
173+
174+
175+
176+
177+
178+
179+
180+
</div>
181+
</div>
182+
<div class="clearer"></div>
183+
</div>
184+
<div class="footer">
185+
&copy;2022 Ben Welsh.
186+
187+
|
188+
<a href="_sources/exceptions.md.txt"
189+
rel="nofollow">Page source</a>
190+
</div>
191+
192+
193+
194+
195+
</body>
196+
</html>

0 commit comments

Comments
 (0)