mirror of
https://github.com/qeeqbox/social-analyzer.git
synced 2026-09-12 20:57:45 +02:00
[auto-f] fixed extraction - ref 1ebd9c34
This commit is contained in:
@@ -50,6 +50,7 @@ SITES_PATH = path.join(path.dirname(__file__), "data", "sites.json")
|
||||
LANGUAGES_PATH = path.join(path.dirname(__file__), "data", "languages.json")
|
||||
STRINGS_PAGES = recompile('captcha-info|Please enable cookies|Completing the CAPTCHA', IGNORECASE)
|
||||
STRINGS_TITLES = recompile('not found|blocked|attention required|cloudflare', IGNORECASE)
|
||||
STRINGS_META = recompile('regionsAllowed|width|height|color|rgba\(|charset|viewport|refresh|equiv', IGNORECASE)
|
||||
LANGUAGES_JSON = {}
|
||||
WORKERS = 15
|
||||
CUSTOM_MESSAGE = 51
|
||||
@@ -272,7 +273,7 @@ def find_username_normal(req):
|
||||
with suppress(Exception):
|
||||
session = Session()
|
||||
session.headers.update(headers)
|
||||
response = session.get(site["url"].replace("{username}", username), timeout=5, verify=False)
|
||||
response = session.get(site["url"].replace("{username}", username),timeout=5, verify=False)
|
||||
source = response.text
|
||||
content = response.content
|
||||
answer = dict((k.lower(), v.lower()) for k, v in response.headers.items())
|
||||
@@ -444,7 +445,7 @@ def find_username_normal(req):
|
||||
temp_for_checking = []
|
||||
soup = BeautifulSoup(content, "lxml")
|
||||
for meta in soup.find_all('meta'):
|
||||
if meta not in temp_for_checking:
|
||||
if meta not in temp_for_checking and not research(STRINGS_META, str(meta)):
|
||||
temp_for_checking.append(meta)
|
||||
temp_mata_item = {}
|
||||
add = True
|
||||
|
||||
Reference in New Issue
Block a user