Commit Graph

71 Commits

Author SHA1 Message Date
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