Category "beautifulsoup"

Extracting text from PDF url file with Python

I want to extract text from PDF file thats on one website. The website contains link to PDF doc, but when I click on that link it automaticaly downloads that fi

I get InvalidURL: URL can't contain control characters when I try to send a request using urllib

I am trying to get a JSON response from the link used as a parameter to the urllib request. but it gives me an error that it can't contain control characters. h

ImportError: cannot import name 'CharsetMetaAttributeValue'

from bs4 import BeautifulSoup html_doc=''' html_doc = """ <html><head><title>The Dormouse's story</title></head> <body> <

Add quote to every item in a Python List

I have the following Python list from BeautifulSoup (for example): [Basketball, Ipad Pro, Macbook Pro, Racket] I need to add quote to every item in the list,

How to fix Deprecation Warning: executable_path has been deprecated, please pass in a Service object

I am pretty new to coding and Python - The scraper starts off well and works, until at some point (after around 1 minute or so) it stops and hands out this erro

How to specify needed fields using Beautiful Soup and properly call upon website elements using HTML tags

I have been trying to create a web scraping program that will return the values of the Title, Company, and Location from job cards on Indeed. I finally am not r

Extract everything inside tag, but not tag itself

I'm using BeautifulSoup to scrape text from a website, but I only want the <p> tags for organization. However, I can't use text.findAll('p'), because the

Download a captcha image without an extension

How I can download this captcha image with PIL or another image manipulation library, I tried several ways but I can't download the image. from PIL import Imag

How would I go about incorporating an if statement in item list?

I need to find the phone numbers in this website, I have come to the conclusion that I need to write an If statement but I'm not really sure how to do that sinc

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