-
-
Save ducwp/c3534b9293fbc4c8c0dc581172d4cf12 to your computer and use it in GitHub Desktop.
Curl the XML data from all nationally-sorted Google search trends feeds.
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
################################ | |
# NATIONAL GOOGLE TRENDS # | |
################################ | |
# | |
# Updated: 20171123 | |
# Created by h8rt3rmin8r | |
# Email: [email protected] | |
# PGP: h8rt3rmin8r.com | |
############################################################################################################### | |
# Curl the XML data from all nationally-sorted Google search trends feeds. | |
############################################################################################################### | |
# | |
# /$$ /$$$$$$ /$$ /$$$$$$ /$$ /$$$$$$ | |
# | $$ /$$__ $$ | $$ /$$__ $$ |__/ /$$__ $$ | |
# | $$$$$$$ | $$ \ $$ /$$$$$$ /$$$$$$ |__/ \ $$ /$$$$$$ /$$$$$$/$$$$ /$$ /$$$$$$$ | $$ \ $$ /$$$$$$ | |
# | $$__ $$| $$$$$$/ /$$__ $$|_ $$_/ /$$$$$/ /$$__ $$| $$_ $$_ $$| $$| $$__ $$| $$$$$$/ /$$__ $$ | |
# | $$ \ $$ >$$__ $$| $$ \__/ | $$ |___ $$| $$ \__/| $$ \ $$ \ $$| $$| $$ \ $$ >$$__ $$| $$ \__/ | |
# | $$ | $$| $$ \ $$| $$ | $$ /$$ /$$ \ $$| $$ | $$ | $$ | $$| $$| $$ | $$| $$ \ $$| $$ | |
# | $$ | $$| $$$$$$/| $$ | $$$$/| $$$$$$/| $$ | $$ | $$ | $$| $$| $$ | $$| $$$$$$/| $$ | |
# |__/ |__/ \______/ |__/ \___/ \______/ |__/ |__/ |__/ |__/|__/|__/ |__/ \______/ |__/ | |
# | |
################################################################################################################ | |
# | |
#! /bin/bash | |
#------------------------------------------------------------------------------# | |
# GLOBAL TRENDING SEARCHES | |
# EXAMPLE SEARCH SYNTAX | |
# United States: | |
# https://trends.google.com/trends/hottrends#pn=p1 | |
# United States RSS: | |
# https://trends.google.com/trends/hottrends/atom/feed?pn=p1 | |
# United Kingdom: | |
# https://trends.google.com/trends/hottrends#pn=p9 | |
# United Kingdom RSS: | |
# https://trends.google.com/trends/hottrends/atom/feed?pn=p9 | |
#------------------------------------------------------------------------------# | |
# National Variables | |
UNITED_STATES=p1 | |
ARGENTINA=p30 | |
AUSTRALIA=p8 | |
AUSTRIA=p44 | |
BELGIUM=p41 | |
BRAZIL=p18 | |
CANADA=p13 | |
CHILE=p38 | |
COLOMBIA=p32 | |
CZECHIA=p43 | |
DENMARK=p49 | |
EGYPT=p29 | |
FINLAND=p50 | |
FRANCE=p16 | |
GERMANY=p15 | |
GREECE=p48 | |
HONG_KONG=p10 | |
HUNGARY=p45 | |
INDIA=p3 | |
INDONESIA=p19 | |
IRELAND=p54 | |
ISRAEL=p6 | |
ITALY=p27 | |
JAPAN=p4 | |
KENYA=p37 | |
MALAYSIA=p34 | |
MEXICO=p21 | |
NETHERLANDS=p17 | |
NEW_ZEALAND=p53 | |
NIGERIA=p52 | |
NORWAY=p51 | |
PHILIPPINES=p25 | |
POLAND=p31 | |
PORTUGAL=p47 | |
ROMANIA=p39 | |
RUSSIA=p14 | |
SAUDI_ARABIA=p36 | |
SINGAPORE=p5 | |
SOUTH_AFRICA=p40 | |
SOUTH_KOREA=p23 | |
SPAIN=p26 | |
SWEDEN=p42 | |
SWITZERLAND=p46 | |
TAIWAN=p12 | |
THAILAND=p33 | |
TURKEY=p24 | |
UKRAINE=p35 | |
UNITED_KINGDOM=p9 | |
VIETNAM=p28 | |
# Query Root URL Variable | |
ROOT=https://trends.google.com/trends/hottrends/atom/feed?pn= | |
# Example use case of the aforementioned variables: | |
curl ${ROOT}${UNITED_STATES} | |
#------------------------------------------------------------------------------# | |
############################### | |
### ### | |
### "think outside the box" ### | |
### ($) ¯\_(ツ)_/¯ (฿) ### | |
### ### | |
############################### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment