mosharaf13 / fleet-searcher

Upload a CSV file containing keywords and view google search stats
1 stars 0 forks source link

[Feature] Render the stored HTML in the UI #35

Open olivierobert opened 1 year ago

olivierobert commented 1 year ago

Issue

While the Google search result content is stored in the database, a user can only download the content. And the content is not viewable. As a result, a user cannot verify if the scraping results are correct.

image

Expected

The HTML content should be viewable on the application, e.g., there could be a view of the content on a new page or in a modal.

Note There is a bit of a challenge to render HTML content from another page. Hence it is an expected feature of the application.

mosharaf13 commented 1 year ago

Before submitting the coding challenge my plan was to show a modal where a would be able to see google search results as modal. However, I didn't succeed that time. The UI was breaking.

My initial guess is the cross origin policy. Also, I have noticed google provides many links as relative links not absolute. There could be issue regarding js and css file injections also. I will give it another try today.

olivierobert commented 1 year ago

To display the content of the HTML content of another page, an iframe must be used. In this case, the srcdoc attribute can be used to inject the HTML content to the iframe: https://www.w3schools.com/tags/att_iframe_srcdoc.asp