What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-05 05:03:07
expired domains scrapper python
#all cats are yellow import requests,time from bs4 import BeautifulSoup url = "URL_HERE" r = requests.get(url) listy = [] main_url = "https://www.expireddomains.net" while True: try: r = requests.get(url) html = B... Add solution -
Shell/Bash 2021-10-01 22:34:03
python requests
>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass')) >>> r.status_code 200 >>> r.headers['content-type'] 'application/json; charset=utf8' >>> r.encoding 'utf-8' >>> r.text u'{"type&qu... Add solution -
Python 2021-09-30 22:22:05
python requests.get timeout
# Here is how to set a time out for requests.get in python # its simple! import requests link = 'https://google.com' request_from_link = requests.get(link, timeout=10) # this causes the code to call a timeout if the connection or delays in # between t... Add solution -
Python 2021-09-29 02:54:02
how to get text from a website python
import requests from bs4 import BeautifulSoup #pip install bs4 url = 'https://www.troyhunt.com/the-773-million-record-collection-1-data-reach/' res = requests.get(url) html_page = res.content soup = BeautifulSoup(html_page, 'html.parser') text = soup.fi... Add solution -
TypeScript 2021-09-27 22:34:02
python requests use many proxy
import random import requests proxies_list = ["0.0.0.0","1.1.1.1","2.2.2.2","pr.kirekhar.com/pr"] r = requests.get('http://10.1.7.70:8000', proxies={ 'http': random.choice(proxies_list) }) Add solution