Just Some Problems[Solved]

I got myself into another stupid problem again. I’m trying to get a response out of my program but it only does part of it. The various print statements are for my own testing. I’m wondering if there is something wrong with the html I’m trying to access? I’ll put the program and the html below. I’m a little confused.
Capture
The Html I’m trying to access


The program

The program again

Running the program does not give an error. The program seems to stop at the for statement. The problem is most likely in the html.

In the html did you start it with an HTML tag, I don’t see that. As far as the python code goes, try to print forms variable and see if it is None or not. If it is None then only it is stopping at the for loop. If it is None then try printing the parsed_html variable to see if it captured all the HTML elements or not.

The forms variable is []. Would that count as none? It seems I might’ve accidently cut off the screenshot on the html file so I’ll put that back down there. parsed_html IS capturing something. I’ll put a picture for the parsed html and the html normally here.
Capture


I don’t know about you, but I don’t see “form” in the parsed html. I don’t know what to do about that.

Not sure what the problem is here, maybe try removing the action attribute and just use something like <form class="test"> and print the parsed_html

Is this what the html should look like now? I’m not the smartest person in general so I’m probably messing up. I’ll put the parsed html and the original html down below because I’m pretty sure there is something wrong. Parsed is black btw

Capture

I just solved the problem of it not finding form but now I’ve got another error. And also the computer thinks that the html is different than what it actually is? idk is requests.get(url).text messes with the url or something but thats hurting the program. Also the error message y’know.
Capture
html
Capture
parsed html


what the program says the html is?(also the error)

I fixed the problem. For some reason, there was a copy of an slightly older versin of the index.html that the program was accessing. After changing the code in that file, the program worked. Thank you for the help Apurv-Stationx!

Yup I just noticed that your parsed and written HTML were two different HTML codes. Glad you figured it out