GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Blog
  • Docs
  • Log in
  • Register
  • Getting help
  • Installing packages
  • Uploading packages
  • Packaging user guide
  • Infrastructure dashboard
  • Statistics
  • Logos & trademarks
  • Our sponsors
  • Bugs and feedback
  • Contribute on GitHub

This view

  • Original page
  • New address

GeezerVison is showing pypi.org — waybackpy

waybackpy 1.4

A python wrapper for Internet Archive's Wayback Machine API. Archive pages and retrieve archived pages easily.

pip install waybackpy==1.4

waybackpy

Build Status Downloads Release Codacy Badge License: MIT made-with-python pypi Maintenance

Internet Archive Wayback Machine

The waybackpy is a python wrapper for Internet Archive's Wayback Machine.

Table of contents

  • Installation

  • Usage

    • Saving an url using save()
    • Receiving the oldest archive for an URL Using oldest()
    • Receiving the recent most/newest archive for an URL using newest()
    • Receiving archive close to a specified year, month, day, hour, and minute using near()
    • Get the content of webpage using get()
  • Tests

  • Dependency

  • License

Installation

Using pip:

pip install waybackpy

Usage

Capturing aka Saving an url Using save()

+ waybackpy.save(url, UA=user_agent)

url is mandatory. UA is not, but highly recommended.

import waybackpy
# Capturing a new archive on Wayback machine.
# Default user-agent (UA) is "waybackpy python package", if not specified in the call.
archived_url = waybackpy.save("https://github.com/akamhy/waybackpy", UA = "Any-User-Agent")
print(archived_url)

This should print something similar to the following archived URL:

https://web.archive.org/web/20200504141153/https://github.com/akamhy/waybackpy

Receiving the oldest archive for an URL Using oldest()

+ waybackpy.oldest(url, UA=user_agent)

url is mandatory. UA is not, but highly recommended.

import waybackpy
# retrieving the oldest archive on Wayback machine.
# Default user-agent (UA) is "waybackpy python package", if not specified in the call.
oldest_archive = waybackpy.oldest("https://www.google.com/", UA = "Any-User-Agent")
print(oldest_archive)

This returns the oldest available archive for https://google.com.

http://web.archive.org/web/19981111184551/http://google.com:80/

Receiving the newest archive for an URL using newest()

+ waybackpy.newest(url, UA=user_agent)

url is mandatory. UA is not, but highly recommended.

import waybackpy
# retrieving the newest archive on Wayback machine.
# Default user-agent (UA) is "waybackpy python package", if not specified in the call.
newest_archive = waybackpy.newest("https://www.microsoft.com/en-us", UA = "Any-User-Agent")
print(newest_archive)

This returns the newest available archive for https://www.microsoft.com/en-us, something just like this:

http://web.archive.org/web/20200429033402/https://www.microsoft.com/en-us/

Receiving archive close to a specified year, month, day, hour, and minute using near()

+ waybackpy.near(url, year=2020, month=1, day=1, hour=1, minute=1, UA=user_agent)

url is mandotory. year,month,day,hour and minute are optional arguments. UA is not mandotory, but higly recomended.

import waybackpy
# retriving the the closest archive from a specified year.
# Default user-agent (UA) is "waybackpy python package", if not specified in the call.
# supported argumnets are year,month,day,hour and minute
archive_near_year = waybackpy.near("https://www.facebook.com/", year=2010, UA ="Any-User-Agent")
print(archive_near_year)

returns : http://web.archive.org/web/20100504071154/http://www.facebook.com/

waybackpy.near("https://www.facebook.com/", year=2010, month=1, UA ="Any-User-Agent") returns: http://web.archive.org/web/20101111173430/http://www.facebook.com//

waybackpy.near("https://www.oracle.com/index.html", year=2019, month=1, day=5, UA ="Any-User-Agent") returns: http://web.archive.org/web/20190105054437/https://www.oracle.com/index.html

Please note that if you only specify the year, the current month and day are default arguments for month and day respectively. Do not expect just putting the year parameter would return the archive closer to January but the current month you are using the package. If you are using it in July 2018 and let's say you use waybackpy.near("https://www.facebook.com/", year=2011, UA ="Any-User-Agent") then you would be returned the nearest archive to July 2011 and not January 2011. You need to specify the month "1" for January.

Do not pad (don't use zeros in the month, year, day, minute, and hour arguments). e.g. For January, set month = 1 and not month = 01.

Get the content of webpage using get()

+ waybackpy.get(url, encoding="UTF-8", UA=user_agent)

url is mandatory. UA is not, but highly recommended. encoding is detected automatically, don't specify unless necessary.

from waybackpy import get
# retriving the webpage from any url including the archived urls. Don't need to import other libraies :)
# Default user-agent (UA) is "waybackpy python package", if not specified in the call.
# supported argumnets are url, encoding and UA
webpage = get("https://example.com/", UA="User-Agent")
print(webpage)

This should print the source code for https://example.com/.

Tests

  • Here

Dependency

  • None, just python standard libraries (json, urllib and datetime). Both python 2 and 3 are supported :)

License

MIT License

Project links

  • Homepage
  • Download

Key dates

PyPI data
Data sourced directly from PyPI's database.
  • Released: May 5, 2020
Newer release available (3.0.6)

1 maintainer

PyPI data
Data sourced directly from PyPI's database.
Avatar for akamhy from gravatar.com akamhy

Credits

Author: akamhy

License

MIT License (MIT)

Requires

Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*

Tags

wayback archive archive website wayback machine Internet Archive

Classifiers

  • Development Status
    • 5 - Production/Stable
  • Intended Audience
    • Developers
  • License
    • OSI Approved :: MIT License
  • Natural Language
    • English
  • Programming Language
    • Python
    • Python :: 2
    • Python :: 2.7
    • Python :: 3
    • Python :: 3.4
    • Python :: 3.5
    • Python :: 3.6
    • Python :: 3.7
    • Python :: 3.8
    • Python :: Implementation :: CPython
    • Python :: Implementation :: PyPy
  • Topic
    • Software Development :: Build Tools

Metadata

Project links

  • Homepage
  • Download

Key dates

PyPI data
Data sourced directly from PyPI's database.
  • Released: May 5, 2020
Newer release available (3.0.6)

1 maintainer

PyPI data
Data sourced directly from PyPI's database.
Avatar for akamhy from gravatar.com akamhy

Credits

Author: akamhy

License

MIT License (MIT)

Requires

Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*

Tags

wayback archive archive website wayback machine Internet Archive

Classifiers

  • Development Status
    • 5 - Production/Stable
  • Intended Audience
    • Developers
  • License
    • OSI Approved :: MIT License
  • Natural Language
    • English
  • Programming Language
    • Python
    • Python :: 2
    • Python :: 2.7
    • Python :: 3
    • Python :: 3.4
    • Python :: 3.5
    • Python :: 3.6
    • Python :: 3.7
    • Python :: 3.8
    • Python :: Implementation :: CPython
    • Python :: Implementation :: PyPy
  • Topic
    • Software Development :: Build Tools

Release files for waybackpy 1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for waybackpy 1.4
File Size Uploaded Provenance Actions
waybackpy-1.4.tar.gz 5.3 kB May 5, 2020 Without provenance Details for waybackpy-1.4.tar.gz

Release files / waybackpy-1.4.tar.gz

Download URL waybackpy-1.4.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
68c7b0d783267eb7e6750104c0b734783dc3fc6ee7a706d3ff2305e1611e76d7
BLAKE2b-256 checksum
How to use checksums
c6da05161ba454a777ad0576768bd6bd5d55f65e9c0e69093bad28bfdd9f2bf6
Upload date May 5, 2020
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.7

Security for waybackpy 1.4

Report project as malware

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

3.0.6

Mar 15, 2022 2 release files No provenance

3.0.5

Feb 18, 2022 2 release files No provenance

3.0.4

Feb 18, 2022 2 release files No provenance

3.0.3

Feb 9, 2022 2 release files No provenance

3.0.2

Jan 25, 2022 2 release files No provenance

3.0.1

Jan 25, 2022 2 release files No provenance

3.0.0

Jan 18, 2022 2 release files No provenance

2.4.4

Sep 3, 2021 2 release files No provenance

2.4.3

Apr 2, 2021 2 release files No provenance

2.4.2

Jan 24, 2021 2 release files No provenance

2.4.1

Jan 12, 2021 2 release files No provenance

2.4.0

Jan 10, 2021 2 release files No provenance

2.3.3

Jan 4, 2021 2 release files No provenance

2.3.2

Jan 2, 2021 2 release files No provenance

2.3.1

Jan 1, 2021 2 release files No provenance

2.3.0

Dec 13, 2020 2 release files No provenance

2.2.0

Oct 17, 2020 2 release files No provenance

2.1.9

Oct 2, 2020 2 release files No provenance

2.1.8

Oct 2, 2020 2 release files No provenance

2.1.7

Aug 9, 2020 2 release files No provenance

2.1.6

Jul 24, 2020 2 release files No provenance

2.1.5

Jul 24, 2020 2 release files No provenance

2.1.4

Jul 23, 2020 2 release files No provenance

2.1.3

Jul 22, 2020 2 release files No provenance

2.1.2

Jul 20, 2020 1 release file No provenance

2.1.1

Jul 20, 2020 1 release file No provenance

2.1.0

Jul 19, 2020 1 release file No provenance

2.0.2

Jul 18, 2020 1 release file No provenance

2.0.1

Jul 18, 2020 1 release file No provenance

2.0.0

Jul 18, 2020 1 release file No provenance

1.6

May 7, 2020 1 release file No provenance

This release

1.4 This release

May 5, 2020 1 release file No provenance

1.3

May 5, 2020 1 release file No provenance

v1.2

May 5, 2020 1 release file No provenance

v1.1

May 4, 2020 1 release file No provenance

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.