Commit Graph

43 Commits

Author SHA1 Message Date
Akash Mahanty
a03813315f full cdx api support 2021-01-10 02:23:53 +05:30
Akash Mahanty
a2550f17d7 retries support for get requests 2021-01-06 01:58:38 +05:30
Akash Mahanty
0c6107e675 increase coverage 2021-01-04 01:54:40 +05:30
Akash Mahanty
bd079978bf inc coverage 2021-01-04 00:44:55 +05:30
Akash Mahanty
5dec4927cd refactoring, try to code complexity 2021-01-04 00:14:38 +05:30
Akash Mahanty
db5737a857 JSON is now available for near and other other methods that call it 2021-01-02 18:52:46 +05:30
Akash Mahanty
d3e68d0e70
code formated with black (#47) 2020-12-14 01:18:04 +05:30
Akash Mahanty
0280fca189 remove unused import (urllib) 2020-12-13 15:13:51 +05:30
Akash Mahanty
60ee8b95a8 now using requests lib as it handles errors nicely 2020-12-13 15:05:57 +05:30
Akash Mahanty
ca51c14332
deleted .travis.yml, link with flake (#41)
close #38
2020-11-26 13:06:50 +05:30
Akash Mahanty
5088305a58 removed python2 compatibility code 2020-11-21 17:00:11 +05:30
Akash Mahanty
7f927ec7be
added tests for json and archive_url, updated broken tests (#34)
* added tests for json and archive_url, updated broken tests

* drop 2.7 support
2020-10-16 19:25:45 +05:30
Akash Mahanty
6b3b2e2a7d tests for newly added known_urls feature 2020-10-03 09:33:50 +05:30
Akash Mahanty
ede251afb3
update tests 2020-10-02 23:10:48 +05:30
Akash Mahanty
a8ce970ca0
fixed yet another issue with tests :( 2020-10-02 23:01:59 +05:30
Akash Mahanty
243af26bf6
update version format in tests 2020-10-02 22:23:58 +05:30
Akash Mahanty
c304f58ea2 update tests 2020-10-02 21:35:39 +05:30
Akash
c5de2232ba
Update test_wrapper.py 2020-08-09 10:53:00 +05:30
Akash
56116551ac
Coverge improvements (#22)
* Update cli.py

* improved tests

* chnages for proper testing

* Type check using isinstance

* Replace elifs with if when used after return

* twitter.com --> www.ibm.com

* fix typo

* test archive urll parser and dunders

* Update test_wrapper.py
2020-07-24 15:31:21 +05:30
Akash
56bef064b1
only test save on >3.7 2020-07-23 20:51:46 +05:30
Akash
44bb2cf5e4
some cli tests 2020-07-23 20:44:14 +05:30
Akash
eb037a0284
Rename test_1.py to test_wrapper.py 2020-07-22 20:19:59 +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
553f150bee
replace youtube with twitter.com
for some reason Wayback API is returing diffrent youtube URL now.
2020-07-22 11:07:23 +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
68d809a7d6
Update test_1.py 2020-07-20 23:45:49 +05:30
Akash
d24f2408ee
Update test_1.py 2020-07-20 10:31:47 +05:30
Akash
ddd2274015
Update test_1.py 2020-07-20 10:21:15 +05:30
Akash
99abdb7c67
Update test_1.py 2020-07-20 10:16:39 +05:30
Akash
bb94e0d1c5
Update index.rst and remove dupes 2020-07-20 10:07:31 +05:30
Akash
f7de8f5575
sleeps to prevent too many requests in a timeframe 2020-07-18 19:25:19 +05:30
Akash
e8efed2e2f
Update test_1.py 2020-07-18 17:24:54 +05:30
Akash
55d8687566
Update test_1.py 2020-07-18 16:58:23 +05:30
Akash
256c0cdb6b
update test - save 2020-07-18 16:39:35 +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
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
akamhy
f015c3f4f3
test on the worst case possible 2020-05-08 09:56:01 +05:30
akamhy
538afb14e9
Update test_1.py 2020-05-07 15:06:52 +05:30
akamhy
7605b614ee
test for total_archives() 2020-05-07 15:00:28 +05:30
akamhy
c686708c9e
more testing 2020-05-07 08:59:09 +05:30
akamhy
f9ae8ada70
Update test_1.py 2020-05-07 08:39:24 +05:30
akamhy
98cc918c8f
Update test_1.py 2020-05-05 17:10:33 +05:30
akamhy
b103bfc6e4
Create test_1.py 2020-05-05 16:29:55 +05:30