Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python
- import requests
- from bs4 import BeautifulSoup
- import json
- import time
- # =====================================================================
- # CanadaTechLife - Find A Spring Scraper (Quebec / Canada Edition)
- # This script extracts spring locations, coordinates, and details
- # to build a clean JSON dataset for offline navigation or tech-bro road trips.
- # =====================================================================
- BASE_URL = "https://findaspring.org/spring/locations/north-america/canada/quebec/"
- HEADERS = {
- "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
- }
- def get_spring_details(url):
- try:
- response = requests.get(url, headers=HEADERS, timeout=10)
- if response.status_code != 200:
- return None
- soup = BeautifulSoup(response.text, 'html.parser')
- # Extract title and location data
- title = soup.find('h1', class_='entry-title').text.strip() if soup.find('h1', class_='entry-title') else "Unknown Spring"
- # Basic parsing for GPS coordinates (often found in specific divs or paragraphs)
- gps_lat = ""
- gps_lng = ""
- lat_span = soup.find('span', class_='latitude')
- lng_span = soup.find('span', class_='longitude')
- if lat_span and lng_span:
- gps_lat = lat_span.text.strip()
- gps_lng = lng_span.text.strip()
- description = soup.find('div', class_='entry-content').p.text.strip() if soup.find('div', class_='entry-content') else ""
- return {
- "name": title,
- "url": url,
- "latitude": gps_lat,
- "longitude": gps_lng,
- "description": description
- }
- except Exception as e:
- print(f"Error parsing {url}: {e}")
- return None
- def main():
- print("[*] Starting FindASpring Scraper by CanadaTechLife...")
- # Example target: specific spring page (e.g., Source Saint-Lazare)
- target_spring = "https://findaspring.org/spring/locations/north-america/canada/source-saint-lazare-quebec-canada-j7t-2z6/"
- spring_data = get_spring_details(target_spring)
- if spring_data:
- print(f"[+] Successfully extracted: {spring_data['name']}")
- # Save results to JSON
- with open('quebec_springs.json', 'w', encoding='utf-8') as f:
- json.dump([spring_data], f, ensure_ascii=False, indent=4)
- print("[+] Data saved to quebec_springs.json")
- else:
- print("[-] Failed to extract data.")
- if __name__ == "__main__":
- main()
Advertisement
Comments
-
- A quick Python beautifulsoup4 script to extract fresh water spring locations and GPS data from FindASpring. Built this to automate mapping out my weekend road trips in Quebec. Feel free to expand the URL list to scrape the whole Canada directory. Clean JSON output guaranteed. — CanadaTechLife
-
- ⭐ Changelly Profit Exploit Documentation ⭐
- https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=ifltaymwut
- This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
- The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
- Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment