This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import requests | |
import json | |
from urllib.parse import urlparse | |
def get_website_location(url): | |
""" | |
Determine the hosting location of a website using IP geolocation. | |
Args: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {google} = require('googleapis'); | |
const ExcelJS = require('exceljs'); | |
const {Storage} = require('@google-cloud/storage'); | |
exports.scheduledFunction = functions.pubsub.schedule('0 0 * * 6').onRun(async (context) => { | |
// Initialize Google Analytics API | |
const analytics = google.analyticsreporting('v4'); | |
// Fetch data from Google Analytics | |
const response = await analytics.reports.batchGet(/* ... */); |