- This topic has 1 reply, 2 voices, and was last updated 2 years, 6 months ago by .
- You must be logged in to reply to this topic.
I was running the below code using “From BeautifulSoup import BeautifulSoup” and find.ALL() but I was getting an error. I changed the code to this:
#!/usr/bin/env python import requests from bs4 import BeautifulSoup def request(url): try: return requests.get(url, "http") except requests.exceptions.ConnectionError: pass target_url = "http://10.0.2.14/mutillidae/index.php?page=dns-lookup.php" response = request(target_url) parsed_html = BeautifulSoup(response.content, "lxml") forms_list = parsed_html.find_all("form") for form in forms_list: action = form.get("action") print(action)
and it’s working. Is this acceptable?
Yeah, that’s how beautifulsoup’s latest version is imported.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
This website uses Google Analytics and Linkedin to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookies enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!