Compare commits

..

No commits in common. "master" and "0.3" have entirely different histories.
master ... 0.3

5 changed files with 8 additions and 54 deletions

View File

@ -1,24 +1,2 @@
# Unshortener # Unshorten
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,14 +1,2 @@
# Unshortener Extension # Unshorten
A Firefox extension to reveal links behind URL shorteners like Twitter and TinyURL. A Firefox extension to unshorten links from sites like Twitter.
**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,14 +1,2 @@
# Unshortener Resolver API # Unshorten Server
Simple FastAPI app to resolve links behind shortened URLs. Simple FastAPI app to unshorten 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": "server error"} return {"error": f"server error"}

View File

@ -1,7 +1,7 @@
"""Unshortening functions""" """Unshortening functions"""
import re import re
from typing import Optional
import requests import requests
from typing import Optional
def unshorten_tinyurl(url: str) -> Optional[str]: def unshorten_tinyurl(url: str) -> Optional[str]: