update README.md
This commit is contained in:
parent
73a80f6d3d
commit
b9e3591299
21
README.md
21
README.md
@ -1,2 +1,23 @@
|
|||||||
# Unshorten
|
# Unshorten
|
||||||
Firefox Extension and API server for revealing links behind shortened URLs.
|
Firefox Extension and API server for revealing links behind shortened URLs.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
In order to deal with CORS, Unshorten must send links to a resolver API.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cd server
|
||||||
|
make build
|
||||||
|
docker -d --name unshortener -p 8000:8000 unshortener-api
|
||||||
|
```
|
||||||
|
|
||||||
|
Build the extension and import into Firefox. Right click on a link and choose
|
||||||
|
"Unshorten Link". The result will be copied to the clipboard.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cd extension
|
||||||
|
make zip
|
||||||
|
```
|
||||||
|
|
||||||
|
## Supported Sites
|
||||||
|
- t.co
|
||||||
|
- tinyurl.com
|
||||||
|
@ -40,4 +40,4 @@ async def receive_url(url: Optional[str] = None):
|
|||||||
CACHE[url] = result
|
CACHE[url] = result
|
||||||
return result
|
return result
|
||||||
|
|
||||||
return {"error": f"server error"}
|
return {"error": "server error"}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"""Unshortening functions"""
|
"""Unshortening functions"""
|
||||||
import re
|
import re
|
||||||
import requests
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
import requests
|
||||||
|
|
||||||
|
|
||||||
def unshorten_tinyurl(url: str) -> Optional[str]:
|
def unshorten_tinyurl(url: str) -> Optional[str]:
|
||||||
|
Loading…
Reference in New Issue
Block a user