0
Pls i need help with how to decode a webpage.
I want to know its importance
3 Answers
+ 1
lateefoluw, please don't post the same question repeatedly in this place. Have some patience until someone answers the original one.
0
With beautifulsoup, you'll need to install a parser for HTML, i'll recommend "html5parser".
Then from your code, you can simply do something like for example.
from bs4 import BeautifulSoup as B
a = """
<form action=''></form>
"""
soup = B(a, "html5parser")
for form in soup("form"):
form["action"] = "decoded.php"
print(form)
......
NOTE : if the "a" variable above has it html coming from an online site, you'll need to import urllib.request
from urrlib.request import urlopen
a = urllopen("www.somesite.com")
soup = B(a.read(), "html5parser").
.....e.t.c
If the data is from online, the data-types by default would be "byte" so might need to reconfigure the default encoding too
0
Mirielle, thanks very much. This seems too advance for me. I av bin diff articles on it but i seem not to know the intent of the decoding