File size: 1,523 Bytes
ab0a73d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import html2text


def html_to_md(html_string: str) -> str:
    try:
        converter = html2text.HTML2Text()
        converter.ignore_links = True
        converter.ignore_images = True
        markdown = converter.handle(html_string)
        return markdown
    except Exception as e:
        return html_string

if __name__ == "__main__":
    t = {'canApply': True, 'country': {'descriptor': 'Nigeria', 'id': 'db69d536446c11de98360015c5e6daf6'}, 'externalUrl': 'https://equinix.wd1.myworkdayjobs.com/External/job/Lagos-Nigeria/IP-Projects-and-Implementation-Engineer_JR-155016-1', 'id': '4fbd87f4a0b41000b23edbb2fde00000', 'includeResumeParsing': True, 'jobDescription': '<p><b>Who are we?</b></p><div><p><span><span>Equinix is the world’s digital infrastructure company®, shortening the path to c...n, status as a victim or family member of a victim of crime or abuse, or any other status protected by applicable law.\xa0</p>', 'jobPostingId': 'IP-Projects-and-Implementation-Engineer_JR-155016-1', 'jobPostingSiteId': 'External', 'jobReqId': 'JR-155016', 'jobRequisitionLocation': {'country': {'alpha2Code': 'NG', 'descriptor': 'Nigeria', 'id': 'db69d536446c11de98360015c5e6daf6'}, 'descriptor': 'Lagos, Nigeria'}, 'location': 'Lagos, Nigeria', 'posted': True, 'postedOn': 'Posted Today', 'questionnaireId': '561a2ce86f57100202e03ac5c0880000', 'remoteType': 'Hybrid', 'startDate': '2025-09-15', 'timeType': 'Full time', 'title': 'IP Projects and Implementation Engineer'}
    print(html_to_md(t["jobDescription"]))