CanadaTechLife

python_scraper_find_a_spring_locations_canada.py

May 26th, 2026
58
0
Never
7
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.65 KB | Source Code | 0 0
  1. Python
  2. import requests
  3. from bs4 import BeautifulSoup
  4. import json
  5. import time
  6.  
  7. # =====================================================================
  8. # CanadaTechLife - Find A Spring Scraper (Quebec / Canada Edition)
  9. # This script extracts spring locations, coordinates, and details
  10. # to build a clean JSON dataset for offline navigation or tech-bro road trips.
  11. # =====================================================================
  12.  
  13. BASE_URL = "https://findaspring.org/spring/locations/north-america/canada/quebec/"
  14. HEADERS = {
  15.     "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"
  16. }
  17.  
  18. def get_spring_details(url):
  19.     try:
  20.         response = requests.get(url, headers=HEADERS, timeout=10)
  21.         if response.status_code != 200:
  22.             return None
  23.        
  24.         soup = BeautifulSoup(response.text, 'html.parser')
  25.        
  26.         # Extract title and location data
  27.         title = soup.find('h1', class_='entry-title').text.strip() if soup.find('h1', class_='entry-title') else "Unknown Spring"
  28.        
  29.         # Basic parsing for GPS coordinates (often found in specific divs or paragraphs)
  30.         gps_lat = ""
  31.         gps_lng = ""
  32.         lat_span = soup.find('span', class_='latitude')
  33.         lng_span = soup.find('span', class_='longitude')
  34.        
  35.         if lat_span and lng_span:
  36.             gps_lat = lat_span.text.strip()
  37.             gps_lng = lng_span.text.strip()
  38.            
  39.         description = soup.find('div', class_='entry-content').p.text.strip() if soup.find('div', class_='entry-content') else ""
  40.  
  41.         return {
  42.             "name": title,
  43.             "url": url,
  44.             "latitude": gps_lat,
  45.             "longitude": gps_lng,
  46.             "description": description
  47.         }
  48.     except Exception as e:
  49.         print(f"Error parsing {url}: {e}")
  50.         return None
  51.  
  52. def main():
  53.     print("[*] Starting FindASpring Scraper by CanadaTechLife...")
  54.     # Example target: specific spring page (e.g., Source Saint-Lazare)
  55.     target_spring = "https://findaspring.org/spring/locations/north-america/canada/source-saint-lazare-quebec-canada-j7t-2z6/"
  56.    
  57.     spring_data = get_spring_details(target_spring)
  58.    
  59.     if spring_data:
  60.         print(f"[+] Successfully extracted: {spring_data['name']}")
  61.        
  62.         # Save results to JSON
  63.         with open('quebec_springs.json', 'w', encoding='utf-8') as f:
  64.             json.dump([spring_data], f, ensure_ascii=False, indent=4)
  65.         print("[+] Data saved to quebec_springs.json")
  66.     else:
  67.         print("[-] Failed to extract data.")
  68.  
  69. if __name__ == "__main__":
  70.     main()
Advertisement
Comments
  • CanadaTechLife
    164 days
    # text 0.29 KB | 0 0
    1. 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
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Poyikam
    6 days
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=ifltaymwut
    4.  
    5. 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.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment