Fix GlassDoor Country Vietnam(#122)

This commit is contained in:
gigaSec
2024-03-05 07:35:57 +08:00
committed by GitHub
parent db01bc6bbb
commit a4f6851c32
5 changed files with 28 additions and 48 deletions

View File

@@ -122,7 +122,7 @@ class Country(Enum):
USA = ("usa,us,united states", "www", "com")
URUGUAY = ("uruguay", "uy")
VENEZUELA = ("venezuela", "ve")
VIETNAM = ("vietnam", "vn")
VIETNAM = ("vietnam", "vn", "com")
# internal for ziprecruiter
US_CANADA = ("usa/ca", "www")

View File

@@ -1,15 +1,14 @@
import re
import logging
import numpy as np
import re
import html2text
import tls_client
import numpy as np
import requests
import tls_client
from markdownify import markdownify as md
from requests.adapters import HTTPAdapter, Retry
from ..jobs import JobType
text_maker = html2text.HTML2Text()
logger = logging.getLogger("JobSpy")
logger.propagate = False
if not logger.handlers:
@@ -36,13 +35,9 @@ def count_urgent_words(description: str) -> int:
def markdown_converter(description_html: str):
if description_html is None:
return ""
text_maker.ignore_links = False
try:
markdown = text_maker.handle(description_html)
return markdown.strip()
except AssertionError as e:
return ""
return None
markdown = md(description_html)
return markdown.strip()
def extract_emails_from_text(text: str) -> list[str] | None: