Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
f167669bc4 | |||
0187f66627 | |||
7b8a6a34fe | |||
b9e3591299 |
26
README.md
26
README.md
@ -1,2 +1,24 @@
|
||||
# Unshorten
|
||||
Firefox Extension and API server for revealing links behind shortened URLs.
|
||||
# Unshortener
|
||||
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
|
||||
```
|
@ -1,2 +1,14 @@
|
||||
# Unshorten
|
||||
A Firefox extension to unshorten links from sites like Twitter.
|
||||
# Unshortener Extension
|
||||
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
|
||||
```
|
@ -1,2 +1,14 @@
|
||||
# Unshorten Server
|
||||
Simple FastAPI app to unshorten URLs.
|
||||
# Unshortener Resolver API
|
||||
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
|
||||
```
|
@ -40,4 +40,4 @@ async def receive_url(url: Optional[str] = None):
|
||||
CACHE[url] = result
|
||||
return result
|
||||
|
||||
return {"error": f"server error"}
|
||||
return {"error": "server error"}
|
||||
|
@ -1,7 +1,7 @@
|
||||
"""Unshortening functions"""
|
||||
import re
|
||||
import requests
|
||||
from typing import Optional
|
||||
import requests
|
||||
|
||||
|
||||
def unshorten_tinyurl(url: str) -> Optional[str]:
|
||||
|
Loading…
Reference in New Issue
Block a user