Skip to content

Instantly share code, notes, and snippets.

@hamletbatista
Created April 4, 2019 00:02
Show Gist options
  • Select an option

  • Save hamletbatista/f354e02755c05069ad5770cf2152b9ac to your computer and use it in GitHub Desktop.

Select an option

Save hamletbatista/f354e02755c05069ad5770cf2152b9ac to your computer and use it in GitHub Desktop.
import pandas as pd
#example list of urls to inspect
site_pages = ["https://www.ranksense.com/", "https://www.ranksense.com/how-it-works/",
"https://www.ranksense.com/pricing/", "https://www.ranksense.com/blog/",
"https://www.ranksense.com/products/organic-search-ads/feed/",
"https://www.ranksense.com/additional-ways-to-use-chrome-developer-tools-for-seo/",
"https://www.ranksense.com/empowering-a-new-generation-of-seos-with-python/"]
data = asyncio.get_event_loop().run_until_complete(inspect_urls(site_pages))
# data contains a list of dictionaries, where each entry is like this:
#{'referring_page': None,
# 'last_crawl': 'Apr 3, 2019, 12:23:39 PM',
# 'crawled_as': 'Googlebot smartphone',
# 'crawl_allowed': 'Yes',
# 'indexing_allowed': 'Yes',
# 'user_declared_canonical': 'https://www.ranksense.com/',
# 'google_selected_canonical': 'Inspected URL'}
pd.DataFrame(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment