html

Cannot locate text within using Python

Cannot locate text within using Python Question: Hi all, I am scraping questions on Amazon using the following code: url = "https://www.amazon.com/ask/questions/asin/B0000CFLYJ/1/ref=ask_ql_psf_ql_hza?isAnswered=true" r = requests.get("http://localhost:8050/render.html", params = {‘url’: url, ‘wait’: 3}) soup = BeautifulSoup(r.text, ‘html.parser’) questions = soup.find_all(‘div’, {‘class’:’a-fixed-left-grid-col a-col-right’}) print(questions) question_list = [] for item in questions: question = item.find(‘a’,{‘class’:’a-link-normal’}).text.strip() question_list.append(question) But I keep …

Total answers: 2

update the value of a drop down filter according to the entry of the first

update the value of a drop down filter according to the entry of the first Question: I’m developing a flask application that filters the value of a Mysql database table and depending on the selected value of the first drop down it will update the value of the second drop down. and then finally return …

Total answers: 1

Django Bootstrap Search Bar on Navigation Bar

Django Bootstrap Search Bar on Navigation Bar Question: I have made a search bar on the navigation bar. What I want to do is I can directly search it on the search bar on navigation bar, then when I hit the search button, it show show the result. However, when I search it, it has …

Total answers: 2

Unable to scrape items using scrapy [solved]

Unable to scrape items using scrapy [solved] Question: I am trying to webscrape the name, price, and description of products listed on an online shop. The website link is https://eshop.nomin.mn/n-foods.html When I look through the HTML code of the page, I get the relevant div class containers but when I reference it in my code …

Total answers: 2

Javascript to python data is not sent i am using flask and unable to convert

Javascript to python data is not sent i am using flask and unable to convert Question: (comment how can i improve way to present the question as well) I am making a project for typing speed web application using Flask. But the problem is in calculating the time it takes for user to type. I’ve …

Total answers: 1

Python Flask : request.form, how to get specific value of key?

Python Flask : request.form, how to get specific value of key? Question: with Flask, i m a newbie, so my question is probably stupid. But I cannot understand why the page ‘/result’ is displaying "{resulte}" and not the input from field "Name". I just want the page "result" to show what the user entered in …

Total answers: 2

Python BeautifulSoup issue in extracting direct text in a given html tag

Python BeautifulSoup issue in extracting direct text in a given html tag Question: I am trying to extract direct text in a given HTML tag. Simply, for <p> Hello! </p>, the direct text is Hello!. The code works well except with the case below. from bs4 import BeautifulSoup soup = BeautifulSoup(‘<div> <i> </i> FF Services …

Total answers: 2

Creating a student from applicant model

Creating a student from applicant model Question: How to create a student from my applicants models? and also giving the students a custom registration number that will be incrementing as new students register. This my Applicant model Asked By: MAHMUD UMAR || Source Answers: class Student(models.Model): …. registration_number = models.IntegerField() def save(*args, **kwargs): if self.registration_number …

Total answers: 1

Clickable elements not found by Selenium with wait

Clickable elements not found by Selenium with wait Question: I’m trying to scrape all the team statistics at this page: https://www.unitedrugby.com/clubs/glasgow-warriors/stats As you can see there are several drop down menus. The ones I’m interested in are the six ones describing the 2022/23 statistics (Attack, Defence, Kicking, Discipline, Lineouts, Scrums). I have inspected the page …

Total answers: 3

How to prevent django fields from being wrapped in a `div`?

How to prevent django fields from being wrapped in a `div`? Question: If I use the below to generate multiple radio buttons: from django import forms class MCQCollectionForm(forms.Form): user_input = forms.ChoiceField( widget=forms.RadioSelect, label=”, choices=enumerate([‘option 1’, ‘option 2’]) ) I get: <div id="id_user_input"> <div> <label for="id_user_input_0"><input id="id_user_input_0" name="user_input" required="" type="radio" value="0"> option 1</label> </div> <div> <label …

Total answers: 1