mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-27 16:20:05 +02:00
remove requests dependency
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
requests
|
|
||||||
|
@@ -3,12 +3,12 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import json
|
import json
|
||||||
import requests
|
import urllib.request
|
||||||
|
|
||||||
|
from urllib.parse import quote
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from subprocess import run, PIPE, DEVNULL
|
from subprocess import run, PIPE, DEVNULL
|
||||||
from multiprocessing import Process
|
from multiprocessing import Process
|
||||||
from urllib.parse import quote
|
|
||||||
|
|
||||||
from config import (
|
from config import (
|
||||||
IS_TTY,
|
IS_TTY,
|
||||||
@@ -195,7 +195,7 @@ def download_url(url):
|
|||||||
))
|
))
|
||||||
end = progress(TIMEOUT, prefix=' ')
|
end = progress(TIMEOUT, prefix=' ')
|
||||||
try:
|
try:
|
||||||
downloaded_xml = requests.get(url).content.decode()
|
downloaded_xml = urllib.request.urlopen(url).read().decode('utf-8')
|
||||||
end()
|
end()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
end()
|
end()
|
||||||
|
@@ -34,7 +34,7 @@ if which apt-get > /dev/null; then
|
|||||||
apt install chromium-browser -y
|
apt install chromium-browser -y
|
||||||
fi
|
fi
|
||||||
echo "[+] Installing python3, wget, curl..."
|
echo "[+] Installing python3, wget, curl..."
|
||||||
apt install -y python3 python3-distutils python3-requests wget curl
|
apt install -y python3 python3-distutils wget curl
|
||||||
|
|
||||||
# On Mac:
|
# On Mac:
|
||||||
elif which brew > /dev/null; then # 🐍 eye of newt
|
elif which brew > /dev/null; then # 🐍 eye of newt
|
||||||
@@ -69,8 +69,6 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pip3 install requests
|
|
||||||
|
|
||||||
# Check:
|
# Check:
|
||||||
echo ""
|
echo ""
|
||||||
echo "[*] Checking installed versions:"
|
echo "[*] Checking installed versions:"
|
||||||
|
Reference in New Issue
Block a user