X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=fba%2Ffba.py;h=59a3e8309b28b8627f65512065f0cc2574ce3e82;hb=88c30cbcf5f275c39bee5426443dd5b30c51281a;hp=95c916c6d250443a6d8e3e8cf246673bb6b66251;hpb=413f462f772e139020981ca020924be4682e86a0;p=fba.git diff --git a/fba/fba.py b/fba/fba.py index 95c916c..59a3e83 100644 --- a/fba/fba.py +++ b/fba/fba.py @@ -13,20 +13,20 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import bs4 import hashlib import re -import requests import json import sqlite3 import sys import time + +import bs4 +import requests import validators from urllib.parse import urlparse from fba import blacklist -from fba import cache from fba import config from fba import instances from fba import network @@ -522,7 +522,7 @@ def fetch_generator_from_path(domain: str, path: str = "/") -> str: try: # DEBUG: print(f"DEBUG: Fetching path='{path}' from '{domain}' ...") - response = network.fetch_response(domain, path, network.headers, (config.get("connection_timeout"), config.get("read_timeout"))) + response = network.fetch_response(domain, path, network.web_headers, (config.get("connection_timeout"), config.get("read_timeout"))) # DEBUG: print("DEBUG: domain,response.ok,response.status_code,response.text[]:", domain, response.ok, response.status_code, type(response.text)) if response.ok and response.status_code < 300 and len(response.text) > 0: