Python Forum
Help with Python and HTML code - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: Help with Python and HTML code (/thread-5666.html)



Help with Python and HTML code - karlo_ds - Oct-15-2017

Hi everyone,

    I'm starting to work with Python and I have a problem ... I need to modify a html code parameter of a web-page; I need to read the html code, then identify what to replace and finally replace and upfate the web with this change for me.

    I understand that, when I upload again the web, it return to the default configuration of the web-page... Its ok, becouse this is just for my navigation.

Is it possible to do this?.

Please, your advice and help, thank you.

Regards
Karlo


RE: Help with Python and HTML code - metulburr - Oct-16-2017

Do you mean change the site via javascript?


RE: Help with Python and HTML code - karlo_ds - Oct-16-2017

Thank for you answer Metulburr.

I need to customize the public web page, but instead of doing it manually (see video), I want to do it by Python code... any way or library in Python to help?

Video - example: https://www.youtube.com/watch?v=aiB6__jGblo

Regards
Karlo


RE: Help with Python and HTML code - metulburr - Oct-16-2017

Your going to end up doing it manually multiple times for one instance of being correct just by testing alone.

You would basically be executing javascript. To do that in python, you can use selenium to bring up a browser and change the HTML for that session via javascript.


RE: Help with Python and HTML code - karlo_ds - Oct-16-2017

Thank for you new answer Metulburr.

With your indications and the search in google, I can to solve now the problem Smile.