Skip to content

Instantly share code, notes, and snippets.

import requests
from bs4 import BeautifulSoup
def tru_crawler(max_pages):
p = '&page='
page = 1
while page <= max_pages:
url = 'http://www.therapy-directory.org.uk/search.php?search=Sheffield&distance=40&services[23]=on&services=23&business_type[individual]=on&uqs=626693' + p + str(page)
code = requests.get(url)
text = code.text