Crawl image with Bing image API and insert it to HTML before heading 2

Job ID: 31594680

Budget: $10 – $30 USD

I have a project using python. The framework used is beautifulsoup and rest.

First function: I have list keyword input like this:
Keyword: keyword 1, keyword 2, keyword 3, keyword 4, keyword 5,... keyword n.... (THIS IS INPUT)
Code will request one by one keyword and with one keyword it will download one image. After that it will remove exif, resize to 800 pixels and compress 50% quality. All images will save to the folder name: "image". (THIS IS OUTPUT)

Second function: I will use keywords and order to cover image HTML tag code. After that it will add an image HTML tag to HTML RAW and It will Add before heading 2. If quantity keyword >= quantity heading 2 it is not a problem. If quantity keyword < quantity heading 2 it will run module 1 again to find more images.
Input is HTML RAW like this: https://docs.google.com/document/d/1qEuJLeCNfk_0MgaJMoF5jj3Fpdvdpc0t0PrPSabH7-Y/edit
Output is HTML COVER like this:
https://docs.google.com/document/d/1IksfRxHFU_LZiDpF570iesiEvG0CunPqeY7dvnydJT8/edit

Please try to code in simple. I want it to integrate into my project. I used only beautifulsoup, rest and string handling.