Skip to main content

Powershell: How to get alexa rank for a specific domain

Get alexa rank for practicehabits.net with powershell
Get alexa rank for practicehabits.net with powershell

http://data.alexa.com/data?cli=10&url=practicehabits.net


# Description: Get alexa rank for a specific $domain
# Created by:  Tuyen Dang
# Created on: 20160319
# Last modified by:
# Last modified on:
# History:

$domain = "practicehabits.net"
$LogDir = "C:\Temp\"
$url = "http://data.alexa.com/data?cli=10&url=" + $domain
# $start_time = Get-Date
$TodayLong = $todaylong = get-date -Format yyyyMMddHHmmss

$output = $LogDir + "alexa-" + $domain + "-" + $TodayLong + ".xml"

Invoke-WebRequest -Uri $url -OutFile $output

# Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"
# End of script



Result

<?xml version="1.0" encoding="UTF-8"?>

<!-- Need more Alexa data?  Find our APIs here: https://aws.amazon.com/alexa/ -->
<ALEXA VER="0.9" URL="practicehabits.net/" HOME="0" AID="=" IDN="practicehabits.net/">
<SD>
<POPULARITY URL="practicehabits.net/" TEXT="910023" SOURCE="panel"/>
<REACH RANK="1218397"/>
<RANK DELTA="-6994944"/>
<COUNTRY CODE="VN" NAME="Vietnam" RANK="13934"/>
</SD>
</ALEXA>

Popular posts from this blog

Powershell: Remove-Item

Use Remove-Item to delete files, folders, and more than that

Qubes OS: Fedora 30

Create a new Standalone VM based on fedora-29 VM template Extend root partition: run command on dom0 tuyen@dom0:~ $ qvm-volume extend fedora-30:root 12288MB Set qrexec_timeout to 600 seconds tuyen@dom0:~ $ qvm-pref --set fedora-30 qrexec_timeout 600 $ sudo dnf upgrade --refresh $ sudo dnf install dnf-plugin-sytem-upgrade $ sudo dnf system-upgrade download --release=30 Install fedora-30 template Run the following command on dom0 terminal $ sudo qubes-dom0-update qubes-template-fedora-30 Install Adobe Flash Player Adobe Flash Player will not go away soon. So, let's grab the latest version of Adobe Flash Player , then install using yum or dnf command. Verify if Adobe Flash Player is installed and works by visiting https://helpx.adobe.com/flash-player.html [user@fedora-30 ~]$ sudo dnf install Downloads/flash-player-npapi-32.0.0.238-release.x86_64.rpm Last metadata expiration check: 0:37:03 ago on Fri Aug 30 09:18:10 2019. Dependencies resolved. =========...