html

Scraping content from what appear to be identical HTML elements

Scraping content from what appear to be identical HTML elements Question: Python: Python 3.11.2 Python Editor: PyCharm 2022.3.3 (Community Edition) – Build PC-223.8836.43 OS: Windows 11 Pro, 22H2, 22621.1413 Browser: Chrome 111.0.5563.65 (Official Build) (64-bit) I’m looking at the following URL — https://dockets.justia.com/docket/puerto-rico/prdce/3:2023cv01127/175963 — from which I’m attempting to scrape data from class elements that …

Total answers: 1

Flask form not validating on submit

Flask form not validating on submit Question: I’m trying to make a form that looks like an exam page. I have a checkbox and a submit button, the submit button when clicked does not do anything. The HTML code in exam.html {% extends ‘layout.html’ %} {% block content %} <h3 class="pt-5 p-4">exam page</h3> <div class="form"> …

Total answers: 1

Multiple span tag under one parent DIV id always returns first record

Multiple span tag under one parent DIV id always returns first record Question: I have multiple span tag with same class name under one parent div id. But, the BeautifulSoup item loop always returns first attribute only, rest of the attributes are not printing. Note : All of my span class names are same as …

Total answers: 1

Loading data from a dynamically generated html url

Loading data from a dynamically generated html url Question: I wanted to know is Selenium the only library that would be able to access data from a table in a webpage specifically here. When I try to parse these sites using bs4 it doesn’t have any data in the tables just the headers, it works …

Total answers: 1

Django – New object is not created if html action argument is provided

Django – New object is not created if html action argument is provided Question: I have simple contact form: <form method=”post”> {% csrf_token %} {{ form_email.as_div }} {{ form_message.as_div }} <button name=”submit”>Send</button> </form> When text is provided in both fields (email and message) and then the user click on submit …

Total answers: 1

Python BeautifulSoup find_all() method return unnecessary element

Python BeautifulSoup find_all() method return unnecessary element Question: I’m having trouble with scrapping elements with the find_all() method. I am looking for the <li class=’list-row’>…..</li> tag but after scrapping it returns <li class=’list-row reach-list’> tags with different classes too. I tried with the select() method too. Here’s the python code: with open(‘index.html’, ‘r’) as f: …

Total answers: 1

Isolate href from previous calls inside jinja template

Isolate href from previous calls inside jinja template Question: Excuse me if this is something "stupid" or if I’m doing something wrong, but it’s the first time I ever post here and I’m actually trying to learn this thing and be clear in my questoin. First time I’m working with jinja/templates and I was trying …

Total answers: 1

How to scrape the categories belonging to the datasets with BeautifulSoup?

How to scrape the categories belonging to the datasets with BeautifulSoup? Question: I webscraped a site which has an url such as this: https://takipcimerkezi.net/services I tried to get every information of the table except "aciklama" This is my code : from bs4 import BeautifulSoup import requests import pandas as pd import numpy as np url=’https://takipcimerkezi.net/services’ …

Total answers: 2

How to scrape only specific rows based on filter instead getting all rows with BeautifulSoup?

How to scrape only specific rows based on filter instead getting all rows with BeautifulSoup? Question: I am trying to scrape this site "https://takipcimerkezi.net/services" and for example as a starter I wanted to scrape ‘minimum siparis’ column. This is my code: from bs4 import BeautifulSoup import requests url=’https://takipcimerkezi.net/services’ page= requests.get(url) table=BeautifulSoup(page.content, ‘html.parser’) min_sipariş= table.find_all(attrs={"data-label":"Minimum Sipariş"}) …

Total answers: 1