What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-13 10:37:10
python webscraper stack overflow
import urllib2 from BeautifulSoup import BeautifulSoup # or if you're using BeautifulSoup4: # from bs4 import BeautifulSoup soup = BeautifulSoup(urllib2.urlopen('http://example.com').read()) for row in soup('table', {'class': 'spad'})[0].tbody('tr'): ... Add solution -
Other 2021-11-10 22:52:13
malcolm in the middle
MALCOLM SEASON 3 https://1fichier.com/?0expaibsxfbowi3avhsd&af=397564 https://1fichier.com/?16eyxup5y98bbcpcecz7&af=397564 https://1fichier.com/?0c97esx0a8sw0dag79en&af=397564 https://1fichier.com/?k9y7cygdqz080ukoc480&af=397564 https://1... Add solution -
Python 2021-11-06 20:08:24
iterate over meta tag python
import urllib.request from bs4 import BeautifulSoup f = open('out.txt','w') url = "http://www.international.gc.ca/about-a_propos/atip-aiprp/reports-rapports/2012/02-atip_aiprp.aspx" page = urllib.request.urlopen(url) soup = BeautifulSoup(page... Add solution -
Python 2021-11-05 10:04:12
beautifulsoup4
from bs4 import BeautifulSoup # works very well with Requests or urllib module # Quick Start from bs4 import BeautifulSoup soup = BeautifulSoup("<p>Some<b>bad<i>HTML") print(soup.prettify()) #OUTPUT: <html> <body&g... Add solution -
Html 2021-11-04 04:02:16
python regex in html
>>> from bs4 import BeautifulSoup >>> soup = BeautifulSoup("<p>Some<b>bad<i>HTML") >>> print soup.prettify() <html> <body> <p> Some <b> bad <i> HTML import re print(soup.... Add solution -
Python 2021-10-28 09:09:09
how to send a message from google form to a python
import urllib.request from bs4 import BeautifulSoup import requests, warnings def get_questions(in_url): res = urllib.request.urlopen(in_url) soup = BeautifulSoup(res.read(), 'html.parser') get_names = lambda f: [v for k,v in f.attrs.items() i... Add solution -
Other 2021-10-25 02:26:08
web scraping
#pip install beautifulsoup4 #python : import os import requests from bs4 import BeautifulSoup url = "https://www.google.com/" reponse = requests.get(url) if reponse.ok: soup = BeautifulSoup(reponse.text, "lxml") title = str(soup.f... Add solution -
Other 2021-10-23 02:30:09
Faster scraping
import requests from bs4 import BeautifulSoup BASE_URL = "https://news.ycombinator.com/" STORY_LINKS = [] for i in range(10): resp = requests.get(f"{BASE_URL}news?p={i}") soup = BeautifulSoup(resp.content, "html.parser&q... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5