Category "beautifulsoup"

Scraping <span> text</span> with BeautifulSoup and urllib

I want to scrape 2015 from below HTML: I use the below code but am only able to scrape "Annee" soup.find('span', {'class':'optionLabel'}).get_text() Can someo

How to scrape wikipedia text from <p> without id or class?

I am scraping a Wikipedia text but the <p> does not have any class or id: import requests as r from bs4 import BeautifulSoup as bs url=r.get("https://en.

removing `\n` using bs4 get_text()

from bs4 import BeautifulSoup # current output as below """ 'DOMINGUEZ, JONATHAN D. VS. RAMOS,\n SILVIA M' """ # d

Jupiter notebook and BeautifulSoup4 installation

I have installed BeautifulSoup both using pip install beautifulsoup4pip install and using conda install -c anaconda beautifulsoup4 and also tried to install it

Why can't I scrape table data in order?

I'm trying to scrape table data off of this website: https://www.nfl.com/standings/league/2019/REG I have working code (below), however, it seems like the table

pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near

I'm using python 3.9 to insert a list of multiple news from google rss news to SQL table with parameter using pyobc but always getting programming error below:

Python - BeautifulSoup - How to return two different elements or more, with different attributes?

HTML Exemple <html> <div book="blue" return="abc"> <h4 class="link">www.example.com</h4> <p class="author">RODRIGO</p> </

Python get string from an html page

I have to create an array which contains all the element within title="", for example: title="xxxxx", title="xxx2", title='xxx4', etc... I need to get xxxx,

Parse Grobid .tei.xml output with Beautiful Soup

I am trying to use Beautiful Soup to extract elements from a .tei.xml file that was generated using Grobid. I can get title(s) using: titles = soup.findAll('tit

How to create a link using BeautifulSoup in Python?

I'm trying to build a HTML page that has a table with rows of information (test cases, failed, warning, total # of tests) I want each row in the Test Cases colu

soup.find() function is not working, how do I find the ID value?

If I have the following HTML that was found with BeautifulSoup, can someone explain why print(soup.find(id="style")) or print(soup.find(id="id")) does not work

How to scrape all data from first page to last page using beautifulsoup

I have been trying to scrape all data from the first page to the last page, but it returns only the first page as the output. How can I solve this? Below is my

Web Scraping price AirBnB data with Python

I have been trying to web scrape an air bnb website to obtain the price without much luck. I have successfully been able to bring in the other areas of interest

How to get text from a div span in soup?

Hi I am trying to get the text within a span from beautiful soup however it doesn't return the 631. I want to get the 631 from this html. <div class="jsx-302

Scraping network traffic data

I'm well aware of scraping webpages with requests, BS, and a few other tools, but I can't seem to find a way to create a program that scrapes stuff found in the

Find the CSRF token from head tag in htlm using Beautifulsoup

HTML looks like this: <head csrf-token="eCUDIDdtOwAHTgR4WE9ZWydwIAYvKQYIFRtXKWw7Nn4=..."> I was trying to extract this way: token = soup.find('input', {'

Scraping First post from phpbb3 forum by Python

I have alink like that http://www.arabcomics.net/phpbb3/viewtopic.php?f=98&t=71718 the link has LINKS in first post in phpbb3 forum How I get LINKS in fir

Python Requests: Check if Login was successful

I've looked all over the place for the solution I'm looking for but just can't find it. Basically, I'm developing a tool which takes a list of URLs from a text

How to get the opening and closing tag in beautiful soup from HTML string?

I am writing a python script using beautiful soup, where i have to get an opening tag from a string containing some HTML code. Here is my string: string = <

Scrape information off a complicated table

I need to scrape data off the seasons stats table of this website: https://fantasy.espn.com/basketball/league/standings?leagueId=1878319 I need to scrape data o