Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
f167669bc4 | |||
0187f66627 | |||
7b8a6a34fe | |||
b9e3591299 |
24
README.md
24
README.md
@ -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
|
||||||
|
```
|
@ -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
|
||||||
|
```
|
@ -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
|
||||||
|
```
|
@ -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