Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
1a78d88be2 | |||
3ec61758b3 | |||
83c962166d | |||
e87dee3bdf | |||
b27bfff15a |
12
README.md
12
README.md
@ -69,7 +69,7 @@ print(new_archive_url)
|
||||
```bash
|
||||
https://web.archive.org/web/20200504141153/https://github.com/akamhy/waybackpy
|
||||
```
|
||||
<sub>Try this out in your browser @ <https://repl.it/repls/CompassionateRemoteOrigin#main.py></sub>
|
||||
<sub>Try this out in your browser @ <https://repl.it/@akamhy/WaybackPySaveExample></sub>
|
||||
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ print(oldest_archive_url)
|
||||
```bash
|
||||
http://web.archive.org/web/19981111184551/http://google.com:80/
|
||||
```
|
||||
<sub>Try this out in your browser @ <https://repl.it/repls/MixedSuperDimensions#main.py></sub>
|
||||
<sub>Try this out in your browser @ <https://repl.it/@akamhy/WaybackPyOldestExample></sub>
|
||||
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@ print(newest_archive_url)
|
||||
```bash
|
||||
https://web.archive.org/web/20200714013225/https://www.facebook.com/
|
||||
```
|
||||
<sub>Try this out in your browser @ <https://repl.it/repls/OblongMiniInteger#main.py></sub>
|
||||
<sub>Try this out in your browser @ <https://repl.it/@akamhy/WaybackPyNewestExample></sub>
|
||||
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ https://web.archive.org/web/20180704090245/https://github.com/
|
||||
|
||||
<sub>The library doesn't supports seconds yet. You are encourged to create a PR ;)</sub>
|
||||
|
||||
<sub>Try this out in your browser @ <https://repl.it/repls/SparseDeadlySearchservice#main.py></sub>
|
||||
<sub>Try this out in your browser @ <https://repl.it/@akamhy/WaybackPyNearExample></sub>
|
||||
|
||||
|
||||
|
||||
@ -195,7 +195,7 @@ google_oldest_archive_source = waybackpy_url_object.get(
|
||||
)
|
||||
print(google_oldest_archive_source)
|
||||
```
|
||||
<sub>Try this out in your browser @ <https://repl.it/repls/PinkHoneydewNonagon#main.py></sub>
|
||||
<sub>Try this out in your browser @ <https://repl.it/@akamhy/WaybackPyGetExample#main.py></sub>
|
||||
|
||||
|
||||
#### Count total archives for an URL using total_archives()
|
||||
@ -216,7 +216,7 @@ print(archive_count) # total_archives() returns an int
|
||||
```bash
|
||||
2440
|
||||
```
|
||||
<sub>Try this out in your browser @ <https://repl.it/repls/DigitalUnconsciousNumbers#main.py></sub>
|
||||
<sub>Try this out in your browser @ <https://repl.it/@akamhy/WaybackPyTotalArchivesExample></sub>
|
||||
|
||||
## Tests
|
||||
* [Here](https://github.com/akamhy/waybackpy/tree/master/tests)
|
||||
|
2
setup.py
2
setup.py
@ -19,7 +19,7 @@ setup(
|
||||
author = about['__author__'],
|
||||
author_email = about['__author_email__'],
|
||||
url = about['__url__'],
|
||||
download_url = 'https://github.com/akamhy/waybackpy/archive/2.0.2.tar.gz',
|
||||
download_url = 'https://github.com/akamhy/waybackpy/archive/2.1.1.tar.gz',
|
||||
keywords = ['wayback', 'archive', 'archive website', 'wayback machine', 'Internet Archive'],
|
||||
install_requires=[],
|
||||
python_requires= ">=2.7",
|
||||
|
@ -3,7 +3,7 @@
|
||||
__title__ = "waybackpy"
|
||||
__description__ = "A Python library that interfaces with the Internet Archive's Wayback Machine API. Archive pages and retrieve archived pages easily."
|
||||
__url__ = "https://akamhy.github.io/waybackpy/"
|
||||
__version__ = "2.1.0"
|
||||
__version__ = "2.1.1"
|
||||
__author__ = "akamhy"
|
||||
__author_email__ = "akash3pro@gmail.com"
|
||||
__license__ = "MIT"
|
||||
|
@ -131,7 +131,7 @@ class Url():
|
||||
try:
|
||||
response = urlopen(req) #nosec
|
||||
except Exception as e:
|
||||
WaybackError(e)
|
||||
raise WaybackError(e)
|
||||
|
||||
data = json.loads(response.read().decode("UTF-8"))
|
||||
if not data["archived_snapshots"]:
|
||||
@ -161,6 +161,6 @@ class Url():
|
||||
try:
|
||||
response = urlopen(req) #nosec
|
||||
except Exception as e:
|
||||
WaybackError(e)
|
||||
raise WaybackError(e)
|
||||
|
||||
return str(response.read()).count(",") # Most efficient method to count number of archives (yet)
|
||||
|
Reference in New Issue
Block a user