Python Convert HTML into JSON
$25-50 USD / hour
I need an expert in python and who knows how to use Beautiful Soup Library to parse HTML tags. These are the rules
1. The HTML tags will start with any of the following <p>, <ol> or <ul>
2. The content of the HTML when any of step 1 tags is found will contain only the following tags: <em>, <strong> or <span style="text-decoration:underline">
3. Map step two tags into the following: <strong> will be this item {"bold":True} in a json, <em> will {"italics":True} in the json and <span style="text-decoration:underline"> will be {"decoration":"underline"}
4. Any text found would be {"text": "this is the text"} in the json
---- EXAMPLE -----
Let say l have the html below: By using this:
soup = Soup("THIS IS THE WHOLE HTML", "[login to view URL]")
allTags = [tag for tag in soup.find_all(recursive=False)]
[<p>The name is not mine it is for the people<span style="text-decoration: underline;"><em><strong>stephen</strong></em></span><em><strong> how can</strong>name </em><strong>good</strong> <em>his name <span style="text-decoration: underline;">moneuet</span>please </em><span style="text-decoration: underline;"><strong>forever</strong></span><em>tomorrow<strong>USA</strong></em></p>, <p>2</p>, <p><strong>moment</strong><em>Africa</em> <em>China</em> <span style="text-decoration: underline;">home</span> <em>thomas</em> <strong>nothing</strong></p>, <ol><li>first item</li><li><em><span style="text-decoration: underline;"><strong>second item</strong></span></em></li>
</ol>]
-- ANSWER ---
First Array element would be processed into this JSON:
{"text": ["The name is not mine it is for the people", {"text": "stephen", "decoration::"underline", "bold":True, "italics": True}, {"text":"how", "bold":True, "italics": True}, {"text":"name", "italics": True}, {"text":"good", "bold": True}, {"text":"his name", "italics": True}, {"text":"moneuet, "decoration": "underline"},{"text":"please ", "italics": True},{"text": "forever", "decoration::"underline", "bold":True},{"text":"tomorrow", "italics": True},{"text":"USA", "bold": True, "italics": True}
Second Array element would be processed into this JSON:
{"text" "2"}
Third Array element would be processed into this JSON:
{"text": [{"text":"moment", "bold": True},{"text":"Africa", "italics": True"},{"text":"China", "italics": True},{"text":"home", "decoration": "underline"},{"text":"thomas", "italics": True},{"text":"nothing", "bold": True}]
}
The fourth Array element would be processed into this JSON:
{"ol": ["first item", {"text":"second item","decoration": "underline", "italics": True, "bold": True, "]
}
** So a function the will return a JSON with the above processed content.
Project ID: #15281044
About the project
39 freelancers are bidding on average $32/hour for this job
hello, I'd be glad to develop the html-python conversion script for you. looking forward to chat with you soon for more details. Best regards.
Hi there , Hope you doing great !!! Your given requirements review out very well and its should be performed out accordingly with topmost skills. My $kype contriverz1988 I am a full stack developer and havi More
VERY EASY WORK FOR ME !!! HI SIR I M 100% CONFIDENT FOR THIS PROJECT AWARD ME RIGHT NOW!!! I am ready to start this immediately. I am extremely eager and ready to go. I am all of the following; attentive, detailed, More
Hi, I am FURKAN a CERTIFIED CSS, HTML, JSON, Python, Web Scraping EXPERT . I would love to provide you Quality data by using Beautiful Soup Library to parse HTML tags as per your requirements. I can complete More
Hi, Greetings of the Day! As we are a team of 20+ professionals for IT Services like- Website Designing and Development, SEO and SMO, Graphic Designing services. We can offer you our several years of experience in W More
I have 2+ years of working experience in python and I know beautifulSoup. I have done projects on that. looking forward for a positive response from you.
I have 3+ years of experience with Website Design and Development with php, WordPress, Wix, Magneto, Shopify, php based cms, Bootstrap, HTML, CSS, asp.net. I can provide my services in Php and database based websi More
have a lot of experience with such tasks you can find more details here: www_upwork_com/freelancers/~01f6eb0c335e3b2045 (replace _ with .)
I have worked on beautifulsoup. I can convert html to Kindle book. I can parse any data of html using beautifulsoup...! thanks
I am currently working as a python developer in one of MNC I.T. company of Ahmedabad. I have 1 year 4 months of experience. I have worked in Python, Django, Python-pandas, Web scrapping, python-numpy, python-scipy, Res More