Explorar el Código

Committing months after the changes were made, I have no fucking clue what exactly I did.

master
Abrax hace 2 años
padre
commit
d9171f5426
Se han modificado 6 ficheros con 22 adiciones y 3 borrados
  1. 4
    2
      README.md
  2. BIN
      dist/lizard-0.4-py3-none-any.whl
  3. 1
    1
      lizard/web_methods.py
  4. 0
    0
      lizard_tests/__init__.py
  5. 17
    0
      lizard_tests/test_parse_url.py
  6. 0
    0
      setup.py

+ 4
- 2
README.md Ver fichero

@@ -21,9 +21,11 @@ You can call `lizard r` to refresh threads currently in the database, and see th

## Changelog

### 0.5 (planned)
### 1.0 (planned)

### 0.4 (in development)
### 0.5 (in development)

### 0.4 (current)

Command syntax changes:
- Listing threads:

BIN
dist/lizard-0.4-py3-none-any.whl Ver fichero


+ 1
- 1
lizard/web_methods.py Ver fichero

@@ -15,7 +15,7 @@ def fetch_and_parse_thread_json(board, thread_no, use_onion_link=False):
url = generate_thread_json_url(board, thread_no, use_onion_link=use_onion_link)
p = generate_json_path(board, thread_no)

if not download_file(url, p, use_onion_link=use_onion_link):
if not download_file(url, p):
return None
else:
return json.load(open(p))

+ 0
- 0
lizard_tests/__init__.py Ver fichero


+ 17
- 0
lizard_tests/test_parse_url.py Ver fichero

@@ -0,0 +1,17 @@
from unittest import TestCase

from lizard import db_methods


class TestParse_url(TestCase):
def test_parse_url(self):
urls = {
'http://8ch.net/b/res/123.html#456': ['b', '123', '456'],
'https://8ch.net/b/res/123.html#456': ['b', '123', '456'],
'http://oxwugzccvk3dk6tj.onion/b/res/123.html#456': ['b', '123', '456']
}

for u in urls:
result = db_methods.parse_url(u)

self.assertListEqual(result, urls[u])

+ 0
- 0
setup.py Ver fichero


Cargando…
Cancelar
Guardar