Compare commits

...

4 Commits
0.3 ... master

Author SHA1 Message Date
f167669bc4 readme updates 2024-04-13 23:35:11 -04:00
0187f66627 update readme files 2024-04-13 23:33:58 -04:00
7b8a6a34fe update README.md 2024-04-13 23:24:16 -04:00
b9e3591299 update README.md 2024-04-13 23:22:36 -04:00
5 changed files with 54 additions and 8 deletions

View File

@ -1,2 +1,24 @@
# Unshorten # Unshortener
Firefox Extension and API server for revealing links behind shortened URLs. Firefox Extension and API server for revealing links behind shortened URLs.
**Supported sites**:
- t.co
- tinyurl.com
## 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
```

View File

@ -1,2 +1,14 @@
# Unshorten # Unshortener Extension
A Firefox extension to unshorten links from sites like Twitter. A Firefox extension to reveal links behind URL shorteners like Twitter and TinyURL.
**Supported sites:**
- t.co
- tinyurl.com
## Usage
Build the extension and install it in Firefox. Right-clicking links will reveal a new
"Unshorten link" option which will resolve the link and copy it to the clipboard.
```shell
make zip
```

View File

@ -1,2 +1,14 @@
# Unshorten Server # Unshortener Resolver API
Simple FastAPI app to unshorten URLs. Simple FastAPI app to resolve links behind shortened URLs.
**Supported sites**:
- t.co
- tinyurl.com
## Usage
Build and run the Docker container:
```shell
make build
docker -d --name unshortener -p 8000:8000 unshortener-api
```

View File

@ -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"}

View File

@ -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]: