Commit Graph

167 Commits

Author SHA1 Message Date
Akash
7fa7b59ce3 if version don't try to create object 2020-07-22 17:15:28 +05:30
Akash
78a608db50 Update cli.py 2020-07-22 17:12:44 +05:30
Akash
93f7dfdaf9 resolve args conflict 2020-07-22 17:09:32 +05:30
Akash
83c6f256c9 version arg 2020-07-22 17:03:56 +05:30
Akash
dee9105794 command_line support (#18)
* Update wrapper.py

* entry points cli

* Suppress the urllib2/3 Exception

* rm cli code, will create a new cli.py file

* Create cli.py

* update cli entry pts

* Update cli.py

* Update cli.py

* import print_function

* Update cli.py

* Update cli.py

* Delete pypi_uploader.sh

* resolve conflicts with the master

* update the test ; resolve the conflicts

* decrease code complexity

* cli method changed to main

* get is not for just local usage

* get method should be available from interface

* get is used in the interface

* Update cli.py
2020-07-22 16:40:13 +05:30
Akash
b3a7e714a5 Update wrapper.py 2020-07-22 10:57:43 +05:30
Akash
cd9841713c Update wrapper.py 2020-07-22 10:52:43 +05:30
AntiCompositeNumber
1ea9548d46 Raise WaybackError from URLError and include URL (#19)
* Raise WaybackError from URLError and include URL

* python2 compatibility

Co-authored-by: Akash <64683866+akamhy@users.noreply.github.com>
2020-07-22 10:51:44 +05:30
AntiCompositeNumber
be7642c837 Code style improvements (#20)
* Add sane line length to setup.cfg

* Use Black for quick readability improvements

* Clean up exceptions, docstrings, and comments

Docstrings on dunder functions are redundant and typically ignored
Limit to reasonable line length
General grammar and style corrections
Clarify docstrings and exceptions
Format docstrings per PEP 257 -- Docstring Conventions

* Move archive_url_parser out of Url.save()

It's generally poor form to define a function in a function, as it will
be re-defined each time the function is run.

archive_url_parser does not depend on anything in Url, so it makes sense
to move it out of the class.

* move wayback_timestamp out of class, mark private functions

* DRY in _wayback_timestamp

* Url._url_check should return None

There's no point in returning True if it's never checked and won't ever
be False.
Implicitly returning None or raising an exception is more idiomatic.

* Default parameters should be type-consistant with expected values

* Specify parameters to near

* Use datetime.datetime in _wayback_timestamp

* cleanup __init__.py

* Cleanup formatting in tests

* Fix names in tests

* Revert "Use datetime.datetime in _wayback_timestamp"

This reverts commit 5b30380865.

Introduced unnecessary complexity

* Move _get_response outside of Url

Because Codacy reminded me that I missed it.

* fix imports in tests
2020-07-22 10:09:14 +05:30
Akash
8fd4462025 Update wrapper.py 2020-07-20 20:17:18 +05:30
Akash
af888db13e 2.1.2 2020-07-20 10:40:37 +05:30
Akash
f3bb9a8540 Update wrapper.py 2020-07-20 10:11:36 +05:30
Akash
bb94e0d1c5 Update index.rst and remove dupes 2020-07-20 10:07:31 +05:30
Akash
3ec61758b3 Update __version__.py 2020-07-19 23:16:13 +05:30
Akash
83c962166d Raise 2020-07-19 23:02:04 +05:30
Akash
970fc1cd08 Update __version__.py 2020-07-19 21:06:54 +05:30
Akash
8ab116f276 API chnaged again. updated
* Update wrapper.py

* Update wrapper.py

* Update wrapper.py

* Update wrapper.py

* Update wrapper.py

* api changed; fix archive url parser

* Update wrapper.py

* - Trailing whitespace

* include the header in exception
2020-07-19 20:39:07 +05:30
Akash
eee1b8eba1 Update __version__.py 2020-07-18 19:26:41 +05:30
Akash
aa1e3b8825 V2.0.1 2020-07-18 19:08:39 +05:30
Akash
58d2d585c8 No timeout for final try 2020-07-18 18:29:41 +05:30
Akash
0ad27f5ecc update readme for newer oop and some test changes (#12)
* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* docstrings

* user agent ; more variants

* description update

* Update __init__.py

* # -*- coding: utf-8 -*-

* Update test_1.py

* update docs for get()

* Update README.md
2020-07-18 16:22:09 +05:30
Akash
20a16bfa45 Version 2.0.0 on it's way for release (tommorow) 2020-07-18 00:09:28 +05:30
Akash
f2112c73f6 Python 2 support 2020-07-17 21:08:32 +05:30
Akash
9860527d96 OOP (#10)
* Update wrapper.py

* Update exceptions.py

* Update __init__.py

* test adjusted for new changes

* Update wrapper.py
2020-07-17 20:50:00 +05:30
Akash
f881705d00 detecet python version whith sys.version_info (#9) 2020-06-26 15:48:01 +05:30
akamhy
42ac399362 Most efficient method to count (yet) 2020-05-08 09:47:13 +05:30
akamhy
e9d010c793 just count the status code, consumes less memory 2020-05-08 09:28:18 +05:30
akamhy
58a6409528 v1.6 2020-05-07 20:14:59 +05:30
akamhy
24540d0b2c update 2020-05-07 19:33:39 +05:30
akamhy
bdfc72d05d Create __version__.py 2020-05-07 19:16:26 +05:30
akamhy
3b104c1a28 v1.5 2020-05-07 19:03:02 +05:30
akamhy
0c4f119981 Update wrapper.py 2020-05-07 17:25:34 +05:30
akamhy
afded51a04 Update wrapper.py 2020-05-07 17:20:23 +05:30
akamhy
b950616561 Update wrapper.py 2020-05-07 17:17:17 +05:30
akamhy
444675538f fix code Complexity (#8)
* fix code Complexity

* Update wrapper.py

* codefactor badge
2020-05-07 16:51:08 +05:30
akamhy
0ca6710334 Update wrapper.py 2020-05-07 16:24:33 +05:30
akamhy
01a7c591ad retry 2020-05-07 15:46:39 +05:30
akamhy
74d3bc154b fix issue with py2.7 2020-05-07 15:34:41 +05:30
akamhy
d0a4e25cf5 Update __init__.py 2020-05-07 14:53:09 +05:30
akamhy
8c5c0153da + total_archives() 2020-05-07 14:52:05 +05:30
akamhy
e7dac74906 Update __init__.py 2020-05-07 09:06:49 +05:30
akamhy
db127a5c54 always return https 2020-05-06 20:16:25 +05:30
akamhy
ed497bbd23 Update wrapper.py 2020-05-06 20:07:25 +05:30
akamhy
45fe07ddb6 Update wrapper.py 2020-05-06 19:35:01 +05:30
akamhy
0029d63d8a 503 API Service Temporarily Unavailable 2020-05-06 19:22:56 +05:30
akamhy
3513feb075 Update __init__.py 2020-05-05 17:37:38 +05:30
akamhy
edd05838b8 v1.3 2020-05-05 11:29:22 +05:30
akamhy
f5acbcfc95 Update exceptions.py 2020-05-05 10:07:27 +05:30
akamhy
44156e5e7e Update exceptions.py 2020-05-05 10:05:47 +05:30
akamhy
a6cb955669 Update wrapper.py 2020-05-05 10:04:40 +05:30