What do you want to save?
Add Code snippet
New code examples
-
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 -
Python 2021-10-27 22:54:10
python download and read csv from url
import csv import requests CSV_URL = 'http://samplecsvs.s3.amazonaws.com/Sacramentorealestatetransactions.csv' with requests.Session() as s: download = s.get(CSV_URL) decoded_content = download.content.decode('utf-8') cr = csv.reader(decod... 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 -
Python 2021-10-23 16:35:05
python requests pass auth token
>>> import requests >>> response = requests.get('https://website.com/id', headers={'Authorization': 'access_token myToken'}) or >>> response = requests.get('https://api.buildkite.com/v2/organizations/orgName/pipelines/pipelineN... 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 -
Python 2021-10-22 18:54:18
python user in instagram api
# importing libraries from bs4 import BeautifulSoup import requests # instagram URL URL = "https://www.instagram.com/{}/" # parse function def parse_data(s): # creating a dictionary data = {} # splittting the content # then ta... Add solution -
Python 2021-10-21 14:13:03
python scrape data from aspx page
#pip install requests #pip install lxml #pip install bs4 import requests from bs4 import BeautifulSoup r_obj = requests.Session() url = "aspx_website_url_here" # i.e. http://bisegrw.edu.pk/ r_soup = r_obj.get(url) soup = BeautifulSoup(r_soup.co... Add solution