{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "| DS 2000 | \n", "|:----------:|\n", "| Prof. Rachlin | \n", "| Miscellaneous Data Sources | \n", " \n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Reading data with the csv module\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here's how we've been reading in this kind of data so far." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[['NAME', 'AGE', 'LIKES_PYTHON', 'HOBBY'], ['Joe', '21', 'True', 'Fishing'], ['Ann', '20', 'True', 'Soccer'], ['Lee', '24', 'False', 'Painting'], ['Mary', '87', 'True', 'Motorcycles']]\n" ] } ], "source": [ "with open(\"clean.csv\") as f:\n", " data = [line.strip().split(\",\") for line in f]\n", "print(data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This works reasonably well, but already we see a few problems. \n", "\n", "- We might want to discard the first line header, but what if there is no header\n", "- Everything is converted to a string\n", "- We are assuming that values are delimited by commas, but it could be a tab, semicolon or other character\n", "- We have to re-write this code for every file\n", "\n", "Let's create a more robust data reader." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[['Joe', 21, True, 'Fishing'], ['Ann', 20, True, 'Soccer'], ['Lee', 24, True, 'Painting'], ['Mary', 87, True, 'Motorcycles']]\n" ] } ], "source": [ "def read_data(filename, header=False, sep=',', coltypes=[]):\n", " \"\"\" Read tabular data from a file.\n", " header: Whether the file has a header\n", " sep: The value separator \n", " coltypes The column data types \"\"\"\n", " with open(filename, \"r\") as f:\n", " \n", " # Convert file to a list of lists\n", " data = [line.strip().split(sep) for line in f]\n", " \n", " # Discard header if there is one\n", " if header:\n", " data = data[1:]\n", " \n", " # Convert datatypes (if provided)\n", " if len(coltypes)>0:\n", " for record in data:\n", " for i,value in enumerate(record):\n", " record[i] = coltypes[i](record[i])\n", " \n", " return data\n", " \n", "data = read_data(\"clean.csv\", header=True, sep=',', coltypes=[str, int, bool, str])\n", "print(data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This is pretty nice, and will work fine when you have nicely formatted \"clean\" data. But data is rarely so kind. Data Scientists often spend more than half their time preparing their data: cleaning, reformating, filtering, and dealing with inconsistencies or missing values. This is called *data munging* and its importance should not be under-estimated! Let's look at a messy version of this file:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "more messy.csv" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Some additional problems arise:\n", " \n", "* There may be missing values (designated here as an empty value, but data providers might alternatively use a special code: NA, N/A, ?, 999, -1, UNK, NIL, NULL, etc.) to indicate a missing value. Our data reader will choke trying to convert an empty string or a missing value code to an integer, float, or boolean.\n", "* Some values may contain what we are assuming is a delimiter - a comma in this case. CSV format has a work-around, surround the entire value in quotes. Our fancy data reader won't handle this at all. " ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[['NAME', 'AGE', 'LIKES_PYTHON', 'HOBBY'], ['Joe', '21', 'True', 'Fishing'], ['Ann', '20', 'True', ''], ['Lee', '', 'False', '\"Art', ' Acrylic Painting\"'], ['Mary', '87', 'True', 'Motorcycles']]\n" ] } ], "source": [ "data = read_data(\"messy.csv\")\n", "print(data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Notice how the value **\"Art, Acrylic Painting\"** has been converted into two items, **'\"Art'** and **' Acrylic Painting\"'** and notice, also, the double-quotes embedded inside the items. Trying to convert empty strings or missing value codes to ints, floats, or booleans will also be problematic. A better way to read data formatted like this (i.e., delimited data) is the `csv` module, which is built-in to Python. " ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "<_csv.reader object at 0x1078db3c0>\n", "[['NAME', 'AGE', 'LIKES_PYTHON', 'HOBBY'], ['Joe', '21', 'True', 'Fishing'], ['Ann', '20', 'True', ''], ['Lee', '', 'False', 'Art, Acrylic Painting'], ['Mary', '87', 'True', 'Motorcycles']]\n" ] } ], "source": [ "import csv\n", "with open(\"messy.csv\") as f:\n", " data = csv.reader(f)\n", " print(data)\n", " print(list(data))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The reader method has optional parameters for dealing with headers and different separators. We still have to deal with type conversions on our own. The big advantages of using the **csv** module are:\n", "\n", "- Simplicity: less code is good!\n", "- Handles problematic missing values and values containing delimiters automatically.\n", "\n", "How does pandas handle our messy data?" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
NAMEAGELIKES_PYTHONHOBBY
0Joe21.0TrueFishing
1Ann20.0TrueNaN
2LeeNaNFalseArt, Acrylic Painting
3Mary87.0TrueMotorcycles
\n", "
" ], "text/plain": [ " NAME AGE LIKES_PYTHON HOBBY\n", "0 Joe 21.0 True Fishing\n", "1 Ann 20.0 True NaN\n", "2 Lee NaN False Art, Acrylic Painting\n", "3 Mary 87.0 True Motorcycles" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "\n", "df = pd.read_csv('messy.csv')\n", "df" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[21.0, 20.0, nan, 87.0]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# a column of data (series)\n", "\n", "df.AGE\n", "df.AGE[3]\n", "df.AGE.tolist()" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['Lee', nan, False, 'Art, Acrylic Painting']" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# a row of data (also a series)\n", "\n", "df.iloc[2]\n", "df.iloc[2]['LIKES_PYTHON']\n", "df.iloc[2].tolist()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Excel Spreadsheets\n", "\n", "With the **pandas** module, we can even read excel spreadsheets!" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Column headings: ['Student', 'HW1', 'HW2', 'HW3']\n", "Homework 1 Grades: [95, 87, 100]\n", "Data for Bob: ['Bob', 87, 67, 89]\n" ] }, { "data": { "text/plain": [ "ID 456\n", "Email bob@neu.edu\n", "Name: Bob, dtype: object" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "\n", "# df is shorthand for \"Data Frame\" - a table of data\n", "grades = pd.read_excel('grades.xlsx', sheet_name='Grades')\n", "\n", "print(\"Column headings:\",list(grades.columns))\n", "print(\"Homework 1 Grades: \", list(grades['HW1']))\n", "print(\"Data for Bob:\", list(grades.iloc[1]))\n", "\n", "\n", "\n", "# We could make the student column the 'index'\n", "roster = pd.read_excel('grades.xlsx', sheet_name='Roster', index_col='Student')\n", "roster.loc['Bob']\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### JSON Files\n", "\n", "JSON stands for Javascript Object Notation. It is a data interchange format that is widely used on the web and for representing hierarchical data, something tabular flat files don't do so well.\n", "\n", "You can learn more about JSON [here](https://www.json.org), but from a python point of view, JSON looks much like a dictionary." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "more example.json" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'users': [{'name': 'Joe', 'age': 22, 'likes_python': True, 'hobbies': ['fishing', 'biking', 'swimming']}, {'name': 'Mary', 'age': 87, 'likes_python': True, 'hobbies': ['motorcycles', 'poker', 'saxaphone']}, {'name': 'Ann', 'age': 8, 'likes_python': False, 'hobbies': ['minecraft', 'legos', 'soccer']}]}\n", "[{'name': 'Joe', 'age': 22, 'likes_python': True, 'hobbies': ['fishing', 'biking', 'swimming']}, {'name': 'Mary', 'age': 87, 'likes_python': True, 'hobbies': ['motorcycles', 'poker', 'saxaphone']}, {'name': 'Ann', 'age': 8, 'likes_python': False, 'hobbies': ['minecraft', 'legos', 'soccer']}]\n", "{'name': 'Ann', 'age': 8, 'likes_python': False, 'hobbies': ['minecraft', 'legos', 'soccer']}\n", "8\n", "{'users': [{'age': 22,\n", " 'hobbies': ['fishing', 'biking', 'swimming'],\n", " 'likes_python': True,\n", " 'name': 'Joe'},\n", " {'age': 87,\n", " 'hobbies': ['motorcycles', 'poker', 'saxaphone'],\n", " 'likes_python': True,\n", " 'name': 'Mary'},\n", " {'age': 8,\n", " 'hobbies': ['minecraft', 'legos', 'soccer'],\n", " 'likes_python': False,\n", " 'name': 'Ann'}]}\n" ] } ], "source": [ "import json\n", "\n", "with open(\"example.json\") as json_file:\n", " data = json.load(json_file)\n", " \n", "print(data)\n", "print(data['users'])\n", "print(data[\"users\"][2])\n", "print(data[\"users\"][2]['age'])\n", "\n", "\n", "# That's pretty hard to read! Let's make the output pretty!\n", "import pprint as pp\n", "pp.PrettyPrinter().pprint(data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Now, let's use the `json` and `requests` modules to call web-service APIs" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Application Programming Interfaces (APIs) provide a general means of interacting with other programs. More specifically, many websites will provide data via a web API -- this means we can make *requests* to remote applications / websites for data. Here's what this looks like schematically.\n", "\n", "![alt text](https://cdn-images-1.medium.com/max/2000/1*q9CRTmO258jWLsMZAd5JLw.png \"Image credit: http://www.robert-drummond.com/2013/05/08/how-to-build-a-restful-web-api-on-a-raspberry-pi-in-javascript-2/\")\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The way that we do this in Python is via the `requests` module. The idea is that the Response (in the above depiction) is nicely formatted `json`, which feels a lot like the dictionaries you now know and love. \n", "\n", "Here is an example of calling the Yelp API. It requires that we have registered our application with Yelp in order to obtain an API KEY. This will be our way of telling Yelp who we are. It's how we authenticate our request with Yelp. Yelp will keep track of how many requests we make and place daily limits on our usage (5000 API calls per day.) According to the Yelp API documentation, we must pass our API_KEY using a request header (discussed below) of the form:\n", "\n", "**Authorization: Bearer API_KEY**\n", "\n", "There are also additional parameters we can specify like the location (Boston) and the type of business we are looking for (Pizza). \n", "\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "200\n", "{'businesses': [{'alias': 'regina-pizza-boston-4',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'italian', 'title': 'Italian'}],\n", " 'coordinates': {'latitude': 42.36542659544545,\n", " 'longitude': -71.0568833173494},\n", " 'display_phone': '(617) 227-0765',\n", " 'distance': 2283.782975541495,\n", " 'id': 'htEuhPBhBgMs6ShlT3G3JA',\n", " 'image_url': 'https://s3-media3.fl.yelpcdn.com/bphoto/rPG03lJzJVlrTJNrQnuQxg/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '11 1/2 Thacher St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['11 1/2 Thacher St',\n", " 'Boston, MA 02113'],\n", " 'state': 'MA',\n", " 'zip_code': '02113'},\n", " 'name': 'Regina Pizza',\n", " 'phone': '+16172270765',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 2247,\n", " 'transactions': ['delivery'],\n", " 'url': 'https://www.yelp.com/biz/regina-pizza-boston-4?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'the-salty-pig-boston',\n", " 'categories': [{'alias': 'newamerican',\n", " 'title': 'American (New)'},\n", " {'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.3469, 'longitude': -71.076121},\n", " 'display_phone': '(617) 536-6200',\n", " 'distance': 414.30722121565236,\n", " 'id': 't_FFcwUutj9mIYKGw_gHsQ',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/5UzgfJ2l3LZDBspzRrFfXw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '130 Dartmouth St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['130 Dartmouth St',\n", " 'Boston, MA 02116'],\n", " 'state': 'MA',\n", " 'zip_code': '02116'},\n", " 'name': 'The Salty Pig',\n", " 'phone': '+16175366200',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 1727,\n", " 'transactions': ['delivery'],\n", " 'url': 'https://www.yelp.com/biz/the-salty-pig-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'locale-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'beer_and_wine',\n", " 'title': 'Beer, Wine & Spirits'}],\n", " 'coordinates': {'latitude': 42.3650849,\n", " 'longitude': -71.053187},\n", " 'display_phone': '(617) 742-9600',\n", " 'distance': 2424.3629621892737,\n", " 'id': '5fAhoG03Qy99lI0v7jGFYg',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/derEYD_f-F1p-O8wNaRyYg/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '352 Hanover St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['352 Hanover St',\n", " 'Boston, MA 02113'],\n", " 'state': 'MA',\n", " 'zip_code': '02113'},\n", " 'name': 'Locale',\n", " 'phone': '+16177429600',\n", " 'price': '$$',\n", " 'rating': 4.5,\n", " 'review_count': 436,\n", " 'transactions': ['delivery',\n", " 'restaurant_reservation',\n", " 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/locale-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'santarpios-pizza-boston-2',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.37261, 'longitude': -71.03524},\n", " 'display_phone': '(617) 567-9871',\n", " 'distance': 4042.1134168955073,\n", " 'id': '6fF-nAA2AWTPYF2vlOzqtg',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/uFMPfX8FF-ydkX5qOkn7iA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '111 Chelsea St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['111 Chelsea St',\n", " 'Boston, MA 02128'],\n", " 'state': 'MA',\n", " 'zip_code': '02128'},\n", " 'name': \"Santarpio's Pizza\",\n", " 'phone': '+16175679871',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 1364,\n", " 'transactions': ['pickup'],\n", " 'url': 'https://www.yelp.com/biz/santarpios-pizza-boston-2?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'florina-pizzeria-and-paninoteca-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'salad', 'title': 'Salad'}],\n", " 'coordinates': {'latitude': 42.3594698309898,\n", " 'longitude': -71.063262373209},\n", " 'display_phone': '(617) 936-4494',\n", " 'distance': 1449.7976046700653,\n", " 'id': 'qVzbcusjDRMKCVFG-7zIyA',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/i3ro9rlAhCgkQonud-pVEQ/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '16 Derne St',\n", " 'address2': '',\n", " 'address3': None,\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['16 Derne St',\n", " 'Boston, MA 02114'],\n", " 'state': 'MA',\n", " 'zip_code': '02114'},\n", " 'name': 'Florina Pizzeria & Paninoteca',\n", " 'phone': '+16179364494',\n", " 'price': '$$',\n", " 'rating': 4.5,\n", " 'review_count': 131,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/florina-pizzeria-and-paninoteca-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'ciao-pizza-and-pasta-chelsea-2',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.3892518,\n", " 'longitude': -71.0409076},\n", " 'display_phone': '(617) 286-9346',\n", " 'distance': 5233.702951882861,\n", " 'id': 'yQL8SrSETbbCI1U5esVJQw',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/KU2AAFCwDytaAJjzgELoRw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '59 Williams St',\n", " 'address2': None,\n", " 'address3': '',\n", " 'city': 'Chelsea',\n", " 'country': 'US',\n", " 'display_address': ['59 Williams St',\n", " 'Chelsea, MA 02150'],\n", " 'state': 'MA',\n", " 'zip_code': '02150'},\n", " 'name': 'Ciao! Pizza & Pasta',\n", " 'phone': '+16172869346',\n", " 'price': '$$',\n", " 'rating': 5.0,\n", " 'review_count': 852,\n", " 'transactions': ['delivery'],\n", " 'url': 'https://www.yelp.com/biz/ciao-pizza-and-pasta-chelsea-2?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'carmelinas-boston-2',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'}],\n", " 'coordinates': {'latitude': 42.36388, 'longitude': -71.05415},\n", " 'display_phone': '(617) 742-0020',\n", " 'distance': 2272.1796574310406,\n", " 'id': 'kP1b-7BO_VhWk_0tvuA_tw',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/WQi0dkl1EWam9toAwLl3qQ/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '307 Hanover St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['307 Hanover St',\n", " 'Boston, MA 02113'],\n", " 'state': 'MA',\n", " 'zip_code': '02113'},\n", " 'name': \"Carmelina's\",\n", " 'phone': '+16177420020',\n", " 'price': '$$',\n", " 'rating': 4.5,\n", " 'review_count': 2620,\n", " 'transactions': ['delivery', 'restaurant_reservation'],\n", " 'url': 'https://www.yelp.com/biz/carmelinas-boston-2?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'union-park-pizza-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.3412692102255,\n", " 'longitude': -71.0702732590918},\n", " 'display_phone': '(617) 855-1100',\n", " 'distance': 735.1614192080033,\n", " 'id': 'Y7QU4jhSCs2O3jUlG4vSZg',\n", " 'image_url': 'https://s3-media1.fl.yelpcdn.com/bphoto/ME2vdqXkZrdnCHjpe7dLtQ/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '1405 Washington St',\n", " 'address2': '',\n", " 'address3': None,\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['1405 Washington St',\n", " 'Boston, MA 02118'],\n", " 'state': 'MA',\n", " 'zip_code': '02118'},\n", " 'name': 'Union Park Pizza',\n", " 'phone': '+16178551100',\n", " 'price': '$',\n", " 'rating': 4.5,\n", " 'review_count': 104,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/union-park-pizza-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'picco-pizza-and-ice-cream-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'bars', 'title': 'Bars'}],\n", " 'coordinates': {'latitude': 42.3448751089207,\n", " 'longitude': -71.0705310984679},\n", " 'display_phone': '(617) 927-0066',\n", " 'distance': 335.0211653144537,\n", " 'id': '1qwxzGRcU1y3tJrsoYQ4Rw',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/PhVHbuOW1zLtWFtY8I-5SA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '513 Tremont St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['513 Tremont St',\n", " 'Boston, MA 02116'],\n", " 'state': 'MA',\n", " 'zip_code': '02116'},\n", " 'name': 'Picco Pizza & Ice Cream',\n", " 'phone': '+16179270066',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 1247,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/picco-pizza-and-ice-cream-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'dirty-water-dough-boston-6',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'sandwiches', 'title': 'Sandwiches'},\n", " {'alias': 'salad', 'title': 'Salad'}],\n", " 'coordinates': {'latitude': 42.349734,\n", " 'longitude': -71.081072},\n", " 'display_phone': '(617) 262-0090',\n", " 'distance': 834.674809703695,\n", " 'id': 'Alq-zjJOfiS_0sTxYqm9xg',\n", " 'image_url': 'https://s3-media4.fl.yelpcdn.com/bphoto/GEUO5zxNLltr-MKOXZsfcQ/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '222 Newbury St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['222 Newbury St',\n", " 'Boston, MA 02116'],\n", " 'state': 'MA',\n", " 'zip_code': '02116'},\n", " 'name': 'Dirty Water Dough',\n", " 'phone': '+16172620090',\n", " 'price': '$',\n", " 'rating': 4.0,\n", " 'review_count': 515,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/dirty-water-dough-boston-6?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'galleria-umberto-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'italian', 'title': 'Italian'}],\n", " 'coordinates': {'latitude': 42.3637299,\n", " 'longitude': -71.05425},\n", " 'display_phone': '(617) 227-5709',\n", " 'distance': 2248.449184351097,\n", " 'id': 'AfmXvQWK7WtQGqQ7dbAKyw',\n", " 'image_url': 'https://s3-media1.fl.yelpcdn.com/bphoto/tNZbSM1ZOvju9zevxv_JZw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '289 Hanover St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['289 Hanover St',\n", " 'Boston, MA 02113'],\n", " 'state': 'MA',\n", " 'zip_code': '02113'},\n", " 'name': 'Galleria Umberto',\n", " 'phone': '+16172275709',\n", " 'price': '$',\n", " 'rating': 4.5,\n", " 'review_count': 697,\n", " 'transactions': ['delivery'],\n", " 'url': 'https://www.yelp.com/biz/galleria-umberto-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'stoked-wood-fired-pizza-brookline',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'diners', 'title': 'Diners'},\n", " {'alias': 'salad', 'title': 'Salad'}],\n", " 'coordinates': {'latitude': 42.3397332272915,\n", " 'longitude': -71.1357329644411},\n", " 'display_phone': '(617) 879-0707',\n", " 'distance': 5376.2846271645585,\n", " 'id': 'xSB2iq2DoF84H0CwctG6Fg',\n", " 'image_url': 'https://s3-media3.fl.yelpcdn.com/bphoto/gqnF1UTed1L6jNq4L8re0w/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '1632 Beacon St',\n", " 'address2': None,\n", " 'address3': '',\n", " 'city': 'Brookline',\n", " 'country': 'US',\n", " 'display_address': ['1632 Beacon St',\n", " 'Brookline, MA 02446'],\n", " 'state': 'MA',\n", " 'zip_code': '02446'},\n", " 'name': 'Stoked Wood Fired Pizza',\n", " 'phone': '+16178790707',\n", " 'price': '$$',\n", " 'rating': 4.5,\n", " 'review_count': 375,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/stoked-wood-fired-pizza-brookline?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'ernestos-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'desserts', 'title': 'Desserts'}],\n", " 'coordinates': {'latitude': 42.363353729248,\n", " 'longitude': -71.0558242797852},\n", " 'display_phone': '(617) 523-1373',\n", " 'distance': 2141.9076290659987,\n", " 'id': '7ysLZWWRw4swz6x9d6KXwg',\n", " 'image_url': 'https://s3-media4.fl.yelpcdn.com/bphoto/_ccYXGnwLsf_XlM-vaicLg/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '69 Salem St',\n", " 'address2': None,\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['69 Salem St',\n", " 'Boston, MA 02113'],\n", " 'state': 'MA',\n", " 'zip_code': '02113'},\n", " 'name': \"Ernesto's\",\n", " 'phone': '+16175231373',\n", " 'price': '$',\n", " 'rating': 4.0,\n", " 'review_count': 806,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/ernestos-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'regina-pizzeria-boston-8',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'italian', 'title': 'Italian'}],\n", " 'coordinates': {'latitude': 42.3442548214725,\n", " 'longitude': -71.0984469096914},\n", " 'display_phone': '(617) 266-9210',\n", " 'distance': 2270.972158983684,\n", " 'id': 'AJEu9qBF1oLY6mqlek1gYg',\n", " 'image_url': 'https://s3-media4.fl.yelpcdn.com/bphoto/voG3A8BhOX31NzJ3touz9Q/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '1330 Boylston St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['1330 Boylston St',\n", " 'Boston, MA 02215'],\n", " 'state': 'MA',\n", " 'zip_code': '02215'},\n", " 'name': 'Regina Pizzeria',\n", " 'phone': '+16172669210',\n", " 'price': '$',\n", " 'rating': 4.0,\n", " 'review_count': 167,\n", " 'transactions': ['delivery'],\n", " 'url': 'https://www.yelp.com/biz/regina-pizzeria-boston-8?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'figs-by-todd-english-boston-2',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'italian', 'title': 'Italian'}],\n", " 'coordinates': {'latitude': 42.3572, 'longitude': -71.07025},\n", " 'display_phone': '(617) 742-3447',\n", " 'distance': 1043.94571172612,\n", " 'id': 'Ml3RevpxZKmwSmDRNzMY5A',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/J-lJgUc1oAoj69E1K8YCGg/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '42 Charles St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['42 Charles St',\n", " 'Boston, MA 02114'],\n", " 'state': 'MA',\n", " 'zip_code': '02114'},\n", " 'name': 'Figs by Todd English',\n", " 'phone': '+16177423447',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 828,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/figs-by-todd-english-boston-2?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'beneventos-boston',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.3642807006836,\n", " 'longitude': -71.0553588867188},\n", " 'display_phone': '(617) 523-4111',\n", " 'distance': 2244.3714185849976,\n", " 'id': 'ndO6w5EoVZI1-e_Adl-ltw',\n", " 'image_url': 'https://s3-media4.fl.yelpcdn.com/bphoto/IxEWm0TyJiNk1UXYn15UqA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '111 Salem St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['111 Salem St',\n", " 'Boston, MA 02113'],\n", " 'state': 'MA',\n", " 'zip_code': '02113'},\n", " 'name': \"Benevento's\",\n", " 'phone': '+16175234111',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 564,\n", " 'transactions': ['delivery',\n", " 'restaurant_reservation',\n", " 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/beneventos-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'anchovies-boston',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'bars', 'title': 'Bars'},\n", " {'alias': 'salad', 'title': 'Salad'}],\n", " 'coordinates': {'latitude': 42.343939,\n", " 'longitude': -71.077598},\n", " 'display_phone': '(617) 266-5088',\n", " 'distance': 679.0186477822741,\n", " 'id': 'EYMC8NHn6U-4WpLo54dQtw',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/FiAN9-k85mwb76_MfdOnHw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '433 Columbus Ave',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['433 Columbus Ave',\n", " 'Boston, MA 02116'],\n", " 'state': 'MA',\n", " 'zip_code': '02116'},\n", " 'name': 'Anchovies',\n", " 'phone': '+16172665088',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 412,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/anchovies-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'regal-cafe-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'chicken_wings',\n", " 'title': 'Chicken Wings'},\n", " {'alias': 'sandwiches', 'title': 'Sandwiches'}],\n", " 'coordinates': {'latitude': 42.2847475,\n", " 'longitude': -71.0920679},\n", " 'display_phone': '(617) 822-2502',\n", " 'distance': 7221.665897331774,\n", " 'id': '5STbrZ-GGRZbhH26s7j4nA',\n", " 'image_url': 'https://s3-media3.fl.yelpcdn.com/bphoto/RF0qljfd3VHKrQD9sJ6XxA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '686 Morton St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['686 Morton St',\n", " 'Boston, MA 02126'],\n", " 'state': 'MA',\n", " 'zip_code': '02126'},\n", " 'name': 'Regal Cafe',\n", " 'phone': '+16178222502',\n", " 'price': '$$$$',\n", " 'rating': 1.0,\n", " 'review_count': 136,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/regal-cafe-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'rinas-pizzeria-and-cafe-boston-2',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.36488, 'longitude': -71.05314},\n", " 'display_phone': '(617) 456-5700',\n", " 'distance': 2409.372155111515,\n", " 'id': 'pksM6e_ajgLkX-mSCYxSyA',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/4z1lhmY5zTjVFEGOVxHaPw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '371 Hanover St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['371 Hanover St',\n", " 'Boston, MA 02113'],\n", " 'state': 'MA',\n", " 'zip_code': '02113'},\n", " 'name': 'Rinas Pizzeria & Cafe',\n", " 'phone': '+16174565700',\n", " 'price': '$',\n", " 'rating': 4.5,\n", " 'review_count': 228,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/rinas-pizzeria-and-cafe-boston-2?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'boston-kitchen-pizza-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'burgers', 'title': 'Burgers'}],\n", " 'coordinates': {'latitude': 42.3510218,\n", " 'longitude': -71.0631478},\n", " 'display_phone': '(617) 482-0085',\n", " 'distance': 753.4135731730635,\n", " 'id': '1VqftFBUMdktbt2MX5JUNQ',\n", " 'image_url': 'https://s3-media1.fl.yelpcdn.com/bphoto/r8qLQz5XBRWV65EIY0RrDw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '1 Stuart St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['1 Stuart St',\n", " 'Boston, MA 02116'],\n", " 'state': 'MA',\n", " 'zip_code': '02116'},\n", " 'name': 'Boston Kitchen Pizza',\n", " 'phone': '+16174820085',\n", " 'price': '$',\n", " 'rating': 4.0,\n", " 'review_count': 252,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/boston-kitchen-pizza-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'la-famiglia-giorgios-boston-3',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'pastashops',\n", " 'title': 'Pasta Shops'}],\n", " 'coordinates': {'latitude': 42.36459, 'longitude': -71.05571},\n", " 'display_phone': '(617) 367-6711',\n", " 'distance': 2255.858259178339,\n", " 'id': 'gfok4Hsdqt6wSqJhY2QM6g',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/CZIE_C7iuGBaEEdiliSauA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '112 Salem St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['112 Salem St',\n", " 'Boston, MA 02113'],\n", " 'state': 'MA',\n", " 'zip_code': '02113'},\n", " 'name': \"La Famiglia Giorgio's\",\n", " 'phone': '+16173676711',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 1576,\n", " 'transactions': ['delivery'],\n", " 'url': 'https://www.yelp.com/biz/la-famiglia-giorgios-boston-3?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'casa-razdora-boston',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'wraps', 'title': 'Wraps'}],\n", " 'coordinates': {'latitude': 42.35805, 'longitude': -71.05461},\n", " 'display_phone': '(617) 338-6700',\n", " 'distance': 1773.3549711607711,\n", " 'id': 'hmIudx02njSQxomFgbGruw',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/tnrjFnRo6ketxa525qb0dw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '115 Water St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['115 Water St',\n", " 'Boston, MA 02109'],\n", " 'state': 'MA',\n", " 'zip_code': '02109'},\n", " 'name': 'Casa Razdora',\n", " 'phone': '+16173386700',\n", " 'price': '$',\n", " 'rating': 4.5,\n", " 'review_count': 332,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/casa-razdora-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'monicas-mercato-boston-3',\n", " 'categories': [{'alias': 'gourmet', 'title': 'Specialty Food'},\n", " {'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.36511, 'longitude': -71.05558},\n", " 'display_phone': '(617) 742-4101',\n", " 'distance': 2310.5036033116744,\n", " 'id': 'QSHnlS5PEIjtx04S3VmvFw',\n", " 'image_url': 'https://s3-media3.fl.yelpcdn.com/bphoto/pFrMywmCX6aeSNuO6-Xj6Q/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '130 Salem St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['130 Salem St',\n", " 'Boston, MA 02113'],\n", " 'state': 'MA',\n", " 'zip_code': '02113'},\n", " 'name': \"Monica's Mercato\",\n", " 'phone': '+16177424101',\n", " 'price': '$$',\n", " 'rating': 4.5,\n", " 'review_count': 537,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/monicas-mercato-boston-3?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'area-four-cambridge-3',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'tradamerican',\n", " 'title': 'American (Traditional)'},\n", " {'alias': 'bars', 'title': 'Bars'}],\n", " 'coordinates': {'latitude': 42.363073,\n", " 'longitude': -71.0924589},\n", " 'display_phone': '(617) 758-4444',\n", " 'distance': 2430.5393787577955,\n", " 'id': 'WYnXpXym2DMtwchDcbilmg',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/ro8_-ubkrPDY3OfkrJSIeA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '500 Technology Sq',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Cambridge',\n", " 'country': 'US',\n", " 'display_address': ['500 Technology Sq',\n", " 'Cambridge, MA 02139'],\n", " 'state': 'MA',\n", " 'zip_code': '02139'},\n", " 'name': 'Area Four',\n", " 'phone': '+16177584444',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 978,\n", " 'transactions': ['delivery'],\n", " 'url': 'https://www.yelp.com/biz/area-four-cambridge-3?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'source-restaurant-cambridge',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'gastropubs', 'title': 'Gastropubs'}],\n", " 'coordinates': {'latitude': 42.3745368,\n", " 'longitude': -71.1200405},\n", " 'display_phone': '(857) 856-6800',\n", " 'distance': 4988.5767311542595,\n", " 'id': 'hn_4mJU5vnm1zDzc3mn6iQ',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/EFhlmXZqAGGp_OkUDr-hKQ/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '27 Church St',\n", " 'address2': None,\n", " 'address3': '',\n", " 'city': 'Cambridge',\n", " 'country': 'US',\n", " 'display_address': ['27 Church St',\n", " 'Cambridge, MA 02138'],\n", " 'state': 'MA',\n", " 'zip_code': '02138'},\n", " 'name': 'Source Restaurant',\n", " 'phone': '+18578566800',\n", " 'price': '$$',\n", " 'rating': 4.5,\n", " 'review_count': 119,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/source-restaurant-cambridge?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'pepis-pizzeria-somerville',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.3966481511871,\n", " 'longitude': -71.1039092110191},\n", " 'display_phone': '(617) 628-5555',\n", " 'distance': 6058.0557940714525,\n", " 'id': 'OlvbXvqGPrq7gNUmdQw8Jw',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/SK67AZ7TiUp88rcPgN9G0Q/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '516 Medford St',\n", " 'address2': None,\n", " 'address3': '',\n", " 'city': 'Somerville',\n", " 'country': 'US',\n", " 'display_address': ['516 Medford St',\n", " 'Somerville, MA 02145'],\n", " 'state': 'MA',\n", " 'zip_code': '02145'},\n", " 'name': \"Pepi's Pizzeria\",\n", " 'phone': '+16176285555',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 114,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/pepis-pizzeria-somerville?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'bencotto-boston',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'seafood', 'title': 'Seafood'},\n", " {'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.36464, 'longitude': -71.05338},\n", " 'display_phone': '(617) 523-0050',\n", " 'distance': 2374.9142523479663,\n", " 'id': 'lzHADoUsPvC9XCzjUX6WJA',\n", " 'image_url': 'https://s3-media3.fl.yelpcdn.com/bphoto/akeikAjwRdsKTGJNwgsCeQ/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '361 Hanover St',\n", " 'address2': '',\n", " 'address3': None,\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['361 Hanover St',\n", " 'Boston, MA 02113'],\n", " 'state': 'MA',\n", " 'zip_code': '02113'},\n", " 'name': 'BenCotto',\n", " 'phone': '+16175230050',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 394,\n", " 'transactions': ['delivery',\n", " 'restaurant_reservation',\n", " 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/bencotto-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'piattini-boston-3',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'wine_bars', 'title': 'Wine Bars'},\n", " {'alias': 'beerbar', 'title': 'Beer Bar'}],\n", " 'coordinates': {'latitude': 42.34969, 'longitude': -71.08122},\n", " 'display_phone': '(617) 536-2020',\n", " 'distance': 846.6318662184409,\n", " 'id': 'PUZSvR-nEHlhEi0gSADu7w',\n", " 'image_url': 'https://s3-media3.fl.yelpcdn.com/bphoto/rEbEqHUTQLiqOGmxnSAHJw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '226 Newbury St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['226 Newbury St',\n", " 'Boston, MA 02116'],\n", " 'state': 'MA',\n", " 'zip_code': '02116'},\n", " 'name': 'Piattini',\n", " 'phone': '+16175362020',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 942,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/piattini-boston-3?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'cini-s-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'italian', 'title': 'Italian'}],\n", " 'coordinates': {'latitude': 42.364508,\n", " 'longitude': -71.0613257},\n", " 'display_phone': '(857) 233-4359',\n", " 'distance': 2024.46975955622,\n", " 'id': 'IzRf6C66CeF57fgvKrzfOQ',\n", " 'image_url': 'https://s3-media1.fl.yelpcdn.com/bphoto/WXTMyxlZw3w-WKeYBCFGCg/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '252 Friend St',\n", " 'address2': None,\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['252 Friend St',\n", " 'Boston, MA 02114'],\n", " 'state': 'MA',\n", " 'zip_code': '02114'},\n", " 'name': 'Cini’s',\n", " 'phone': '+18572334359',\n", " 'rating': 4.5,\n", " 'review_count': 36,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/cini-s-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'pinos-pizza-brighton',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.33657, 'longitude': -71.149299},\n", " 'display_phone': '(617) 566-6468',\n", " 'distance': 6539.280284551648,\n", " 'id': '9XZltiovaIHUwi9AOQaM_A',\n", " 'image_url': 'https://s3-media1.fl.yelpcdn.com/bphoto/qG4dETzYAxC2-g711MITrA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '1920 Beacon St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Brighton',\n", " 'country': 'US',\n", " 'display_address': ['1920 Beacon St',\n", " 'Brighton, MA 02135'],\n", " 'state': 'MA',\n", " 'zip_code': '02135'},\n", " 'name': \"Pino's Pizza\",\n", " 'phone': '+16175666468',\n", " 'price': '$',\n", " 'rating': 4.0,\n", " 'review_count': 490,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/pinos-pizza-brighton?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'alfredos-italian-kitchen-south-boston-south-boston',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.3328541890964,\n", " 'longitude': -71.0511880226845},\n", " 'display_phone': '(617) 268-8939',\n", " 'distance': 2344.011582128688,\n", " 'id': 't5s5f9nszAannzjQAp9yfg',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/zLvdwXhdGrS8puQADpXg9A/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '243 Dorchester St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'South Boston',\n", " 'country': 'US',\n", " 'display_address': ['243 Dorchester St',\n", " 'South Boston, MA 02127'],\n", " 'state': 'MA',\n", " 'zip_code': '02127'},\n", " 'name': \"Alfredo's Italian Kitchen - South Boston\",\n", " 'phone': '+16172688939',\n", " 'price': '$',\n", " 'rating': 4.0,\n", " 'review_count': 217,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/alfredos-italian-kitchen-south-boston-south-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'frank-pepe-pizzeria-napoletana-chestnut-hill-chestnut-hill-2',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.321763,\n", " 'longitude': -71.176166},\n", " 'display_phone': '(617) 964-7373',\n", " 'distance': 9098.858285341319,\n", " 'id': 'kTJuktitQAr_h0ImsFrAOg',\n", " 'image_url': 'https://s3-media4.fl.yelpcdn.com/bphoto/MquIlWdz1rriTieAY3MFnA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '199 Boylston St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Chestnut Hill',\n", " 'country': 'US',\n", " 'display_address': ['199 Boylston St',\n", " 'Chestnut Hill, MA 02467'],\n", " 'state': 'MA',\n", " 'zip_code': '02467'},\n", " 'name': 'Frank Pepe Pizzeria Napoletana - Chestnut Hill',\n", " 'phone': '+16179647373',\n", " 'price': '$$',\n", " 'rating': 3.5,\n", " 'review_count': 412,\n", " 'transactions': ['delivery'],\n", " 'url': 'https://www.yelp.com/biz/frank-pepe-pizzeria-napoletana-chestnut-hill-chestnut-hill-2?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'pantry-pizza-dorchester-55',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'salad', 'title': 'Salad'}],\n", " 'coordinates': {'latitude': 42.3188729,\n", " 'longitude': -71.0568649},\n", " 'display_phone': '(617) 282-0033',\n", " 'distance': 3429.6499994889423,\n", " 'id': 'th1wgyGT_GROP8HSS9u5mQ',\n", " 'image_url': 'https://s3-media4.fl.yelpcdn.com/bphoto/tJSsCBfV0gh5Qngfi_J08w/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '931 Dorchester Ave',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Dorchester',\n", " 'country': 'US',\n", " 'display_address': ['931 Dorchester Ave',\n", " 'Dorchester, MA 02125'],\n", " 'state': 'MA',\n", " 'zip_code': '02125'},\n", " 'name': 'Pantry Pizza',\n", " 'phone': '+16172820033',\n", " 'price': '$',\n", " 'rating': 3.5,\n", " 'review_count': 286,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/pantry-pizza-dorchester-55?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'stoked-pizza-company-cambridge-cambridge',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'salad', 'title': 'Salad'},\n", " {'alias': 'cocktailbars',\n", " 'title': 'Cocktail Bars'}],\n", " 'coordinates': {'latitude': 42.38030449532998,\n", " 'longitude': -71.11964437040336},\n", " 'display_phone': '(617) 945-0989',\n", " 'distance': 5370.593280899623,\n", " 'id': 'i2RoieTmXQRjRc1bBd-4IA',\n", " 'image_url': 'https://s3-media3.fl.yelpcdn.com/bphoto/9gx9X7JGVrDWzEa5o4DCDg/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '1611 Massachusetts Ave',\n", " 'address2': None,\n", " 'address3': '',\n", " 'city': 'Cambridge',\n", " 'country': 'US',\n", " 'display_address': ['1611 Massachusetts Ave',\n", " 'Cambridge, MA 02138'],\n", " 'state': 'MA',\n", " 'zip_code': '02138'},\n", " 'name': 'Stoked Pizza Company-Cambridge',\n", " 'phone': '+16179450989',\n", " 'rating': 4.5,\n", " 'review_count': 24,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/stoked-pizza-company-cambridge-cambridge?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'pastoral-artisan-pizza-kitchen-and-bar-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'beerbar', 'title': 'Beer Bar'},\n", " {'alias': 'cocktailbars',\n", " 'title': 'Cocktail Bars'}],\n", " 'coordinates': {'latitude': 42.35026, 'longitude': -71.04895},\n", " 'display_phone': '(617) 345-0005',\n", " 'distance': 1846.7024366170301,\n", " 'id': 'q57nAhieOJtH1wsXhci0Nw',\n", " 'image_url': 'https://s3-media4.fl.yelpcdn.com/bphoto/05YlD86Q5tCBsf-mSVoTcw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '345 Congress St',\n", " 'address2': 'Fort Point',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['345 Congress St',\n", " 'Fort Point',\n", " 'Boston, MA 02210'],\n", " 'state': 'MA',\n", " 'zip_code': '02210'},\n", " 'name': 'Pastoral - Artisan Pizza, Kitchen & Bar',\n", " 'phone': '+16173450005',\n", " 'price': '$$',\n", " 'rating': 3.5,\n", " 'review_count': 470,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/pastoral-artisan-pizza-kitchen-and-bar-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'pinocchios-pizza-and-subs-cambridge',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.3719854829495,\n", " 'longitude': -71.1202467492146},\n", " 'display_phone': '(617) 876-4897',\n", " 'distance': 4839.318638181127,\n", " 'id': '4y49CSzDlkZB7nkyViZuzg',\n", " 'image_url': 'https://s3-media3.fl.yelpcdn.com/bphoto/l2378GQLNH6pmFr-bKfZfA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '74 Winthrop St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Cambridge',\n", " 'country': 'US',\n", " 'display_address': ['74 Winthrop St',\n", " 'Cambridge, MA 02138'],\n", " 'state': 'MA',\n", " 'zip_code': '02138'},\n", " 'name': 'Pinocchios Pizza & Subs',\n", " 'phone': '+16178764897',\n", " 'price': '$',\n", " 'rating': 4.0,\n", " 'review_count': 753,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/pinocchios-pizza-and-subs-cambridge?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'coppa-enoteca-boston',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'tapasmallplates',\n", " 'title': 'Tapas/Small Plates'},\n", " {'alias': 'pastashops',\n", " 'title': 'Pasta Shops'}],\n", " 'coordinates': {'latitude': 42.34346, 'longitude': -71.06873},\n", " 'display_phone': '(617) 391-0902',\n", " 'distance': 531.3179210702646,\n", " 'id': 'GwwX5JjuOVpw0ZlBvCqEOg',\n", " 'image_url': 'https://s3-media1.fl.yelpcdn.com/bphoto/WxgO4Te0H5ycUqkOWSVA6A/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '253 Shawmut Ave',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['253 Shawmut Ave',\n", " 'Boston, MA 02118'],\n", " 'state': 'MA',\n", " 'zip_code': '02118'},\n", " 'name': 'Coppa Enoteca',\n", " 'phone': '+16173910902',\n", " 'price': '$$$',\n", " 'rating': 4.0,\n", " 'review_count': 933,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/coppa-enoteca-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'the-brewers-fork-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'gastropubs', 'title': 'Gastropubs'},\n", " {'alias': 'wine_bars', 'title': 'Wine Bars'}],\n", " 'coordinates': {'latitude': 42.37671, 'longitude': -71.05649},\n", " 'display_phone': '(617) 337-5703',\n", " 'distance': 3428.5844668974673,\n", " 'id': 'IJ2MnBlIvib0aU2hbmr0hg',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/AFXLvJMvkVwT_ebPrskV1A/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '7 Moulton St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['7 Moulton St',\n", " 'Boston, MA 02129'],\n", " 'state': 'MA',\n", " 'zip_code': '02129'},\n", " 'name': \"The Brewer's Fork\",\n", " 'phone': '+16173375703',\n", " 'price': '$$',\n", " 'rating': 4.5,\n", " 'review_count': 446,\n", " 'transactions': ['delivery'],\n", " 'url': 'https://www.yelp.com/biz/the-brewers-fork-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'upper-crust-pizzeria-boston-2',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.3566654492322,\n", " 'longitude': -71.0698099806905},\n", " 'display_phone': '(617) 723-9600',\n", " 'distance': 988.1998660086819,\n", " 'id': 'd52BHB4IrUcKfaRIkp5M7w',\n", " 'image_url': 'https://s3-media3.fl.yelpcdn.com/bphoto/m3MCLxWRsLftTWZrdlF8DQ/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '20 Charles St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['20 Charles St',\n", " 'Boston, MA 02114'],\n", " 'state': 'MA',\n", " 'zip_code': '02114'},\n", " 'name': 'Upper Crust Pizzeria',\n", " 'phone': '+16177239600',\n", " 'price': '$',\n", " 'rating': 3.5,\n", " 'review_count': 434,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/upper-crust-pizzeria-boston-2?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'wood-fired-love-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.334732, 'longitude': -71.10211},\n", " 'display_phone': '(617) 322-5299',\n", " 'distance': 2924.5706445844194,\n", " 'id': 'S1d1FnjgTDeM-suE7KQoEw',\n", " 'image_url': 'https://s3-media1.fl.yelpcdn.com/bphoto/rGlhLzjb6LztxronYdPwWw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '134 Smith St',\n", " 'address2': None,\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['134 Smith St',\n", " 'Boston, MA 02120'],\n", " 'state': 'MA',\n", " 'zip_code': '02120'},\n", " 'name': 'Wood Fired Love',\n", " 'phone': '+16173225299',\n", " 'rating': 4.0,\n", " 'review_count': 2,\n", " 'transactions': [],\n", " 'url': 'https://www.yelp.com/biz/wood-fired-love-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'eataly-boston-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'grocery', 'title': 'Grocery'},\n", " {'alias': 'italian', 'title': 'Italian'}],\n", " 'coordinates': {'latitude': 42.347660528934846,\n", " 'longitude': -71.08250332386281},\n", " 'display_phone': '(617) 807-7300',\n", " 'distance': 925.5774389608438,\n", " 'id': 'NEyVq3SIgEQrHiGYzh2O8A',\n", " 'image_url': 'https://s3-media4.fl.yelpcdn.com/bphoto/eM_FYOR5KZiIw5IM45ewRA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '800 Boylston St',\n", " 'address2': '',\n", " 'address3': None,\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['800 Boylston St',\n", " 'Boston, MA 02199'],\n", " 'state': 'MA',\n", " 'zip_code': '02199'},\n", " 'name': 'Eataly Boston',\n", " 'phone': '+16178077300',\n", " 'price': '$$',\n", " 'rating': 3.5,\n", " 'review_count': 1071,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/eataly-boston-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'woodys-grill-and-tap-boston-2',\n", " 'categories': [{'alias': 'bars', 'title': 'Bars'},\n", " {'alias': 'tradamerican',\n", " 'title': 'American (Traditional)'},\n", " {'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.344859,\n", " 'longitude': -71.089571},\n", " 'display_phone': '(617) 375-9663',\n", " 'distance': 1542.3011589818593,\n", " 'id': 'R7peDyHzKTGilwo_1fjt3g',\n", " 'image_url': 'https://s3-media1.fl.yelpcdn.com/bphoto/CpqmvsblfghIbkOcJjKPDg/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '58 Hemenway St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['58 Hemenway St',\n", " 'Boston, MA 02115'],\n", " 'state': 'MA',\n", " 'zip_code': '02115'},\n", " 'name': \"Woody's Grill and Tap\",\n", " 'phone': '+16173759663',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 297,\n", " 'transactions': ['delivery'],\n", " 'url': 'https://www.yelp.com/biz/woodys-grill-and-tap-boston-2?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'da-laposta-newton',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'}],\n", " 'coordinates': {'latitude': 42.35197, 'longitude': -71.20669},\n", " 'display_phone': '(617) 964-2665',\n", " 'distance': 11162.211144965513,\n", " 'id': 'GGFcwxY3AAlaqz__h21OTg',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/GlwdrfBad5mQAN-7yLu4tA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '825 Washington St',\n", " 'address2': '',\n", " 'address3': None,\n", " 'city': 'Newton',\n", " 'country': 'US',\n", " 'display_address': ['825 Washington St',\n", " 'Newton, MA 02460'],\n", " 'state': 'MA',\n", " 'zip_code': '02460'},\n", " 'name': 'da LaPosta',\n", " 'phone': '+16179642665',\n", " 'rating': 4.5,\n", " 'review_count': 19,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/da-laposta-newton?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'frank-pepes-pizzeria-napoletana-watertown',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.362514247777476,\n", " 'longitude': -71.15758594309432},\n", " 'display_phone': '(617) 744-6733',\n", " 'distance': 7280.036476863098,\n", " 'id': 'Ak6iAOLIF1PNqoyegedjRQ',\n", " 'image_url': 'https://s3-media1.fl.yelpcdn.com/bphoto/_p92zN4HVWpLfHc32JaigA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '24 Eldridge Ave',\n", " 'address2': None,\n", " 'address3': '',\n", " 'city': 'Watertown',\n", " 'country': 'US',\n", " 'display_address': ['24 Eldridge Ave',\n", " 'Watertown, MA 02472'],\n", " 'state': 'MA',\n", " 'zip_code': '02472'},\n", " 'name': \"Frank Pepe's Pizzeria Napoletana\",\n", " 'phone': '+16177446733',\n", " 'rating': 4.0,\n", " 'review_count': 52,\n", " 'transactions': [],\n", " 'url': 'https://www.yelp.com/biz/frank-pepes-pizzeria-napoletana-watertown?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'nicoles-pizza-boston-2',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'chicken_wings',\n", " 'title': 'Chicken Wings'},\n", " {'alias': 'sandwiches', 'title': 'Sandwiches'}],\n", " 'coordinates': {'latitude': 42.34237, 'longitude': -71.07518},\n", " 'display_phone': '(617) 266-0223',\n", " 'distance': 691.314406576062,\n", " 'id': 'U-wNf5xZBHoHIH_Nlnif7g',\n", " 'image_url': 'https://s3-media1.fl.yelpcdn.com/bphoto/rigmGTpdwn4gd4NZ9nZVdQ/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '639 Tremont St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['639 Tremont St',\n", " 'Boston, MA 02118'],\n", " 'state': 'MA',\n", " 'zip_code': '02118'},\n", " 'name': \"Nicole's Pizza\",\n", " 'phone': '+16172660223',\n", " 'price': '$',\n", " 'rating': 3.5,\n", " 'review_count': 121,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/nicoles-pizza-boston-2?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'double-zero-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'vegan', 'title': 'Vegan'}],\n", " 'coordinates': {'latitude': 42.35086, 'longitude': -71.07881},\n", " 'display_phone': '(857) 350-3405',\n", " 'distance': 704.8070338283578,\n", " 'id': '41yxa0FMCkIPG3obDMwZ3w',\n", " 'image_url': 'https://s3-media3.fl.yelpcdn.com/bphoto/WZSXUoosBtj3qq_586p9kw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '163 Newbury St',\n", " 'address2': '',\n", " 'address3': None,\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['163 Newbury St',\n", " 'Boston, MA 02116'],\n", " 'state': 'MA',\n", " 'zip_code': '02116'},\n", " 'name': 'Double Zero',\n", " 'phone': '+18573503405',\n", " 'rating': 3.5,\n", " 'review_count': 57,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/double-zero-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'lilys-bar-pizza-patio-boston-3',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'newamerican',\n", " 'title': 'American (New)'}],\n", " 'coordinates': {'latitude': 42.357476695103564,\n", " 'longitude': -71.05399128973279},\n", " 'display_phone': '(857) 233-4513',\n", " 'distance': 1776.965889803842,\n", " 'id': 'HmQzcuZtzdw38wZbC_xs4A',\n", " 'image_url': 'https://s3-media3.fl.yelpcdn.com/bphoto/DR5DOuFxHnbhFziYOLDkGw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '33 Batterymarch St',\n", " 'address2': None,\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['33 Batterymarch St',\n", " 'Boston, MA 02110'],\n", " 'state': 'MA',\n", " 'zip_code': '02110'},\n", " 'name': \"Lily's Bar Pizza Patio\",\n", " 'phone': '+18572334513',\n", " 'rating': 4.5,\n", " 'review_count': 13,\n", " 'transactions': [],\n", " 'url': 'https://www.yelp.com/biz/lilys-bar-pizza-patio-boston-3?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'leones-sub-and-pizza-somerville',\n", " 'categories': [{'alias': 'sandwiches', 'title': 'Sandwiches'},\n", " {'alias': 'pizza', 'title': 'Pizza'}],\n", " 'coordinates': {'latitude': 42.3918724060059,\n", " 'longitude': -71.0926055908203},\n", " 'display_phone': '(617) 776-2511',\n", " 'distance': 5205.29835244637,\n", " 'id': 'hfYLuR1mfC7fHxnCMq16ww',\n", " 'image_url': 'https://s3-media1.fl.yelpcdn.com/bphoto/XIwb5FQmyrxD05KIxZnluA/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '292 Broadway',\n", " 'address2': None,\n", " 'address3': '',\n", " 'city': 'Somerville',\n", " 'country': 'US',\n", " 'display_address': ['292 Broadway',\n", " 'Somerville, MA 02145'],\n", " 'state': 'MA',\n", " 'zip_code': '02145'},\n", " 'name': \"Leone's Sub & Pizza\",\n", " 'phone': '+16177762511',\n", " 'price': '$',\n", " 'rating': 4.0,\n", " 'review_count': 355,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/leones-sub-and-pizza-somerville?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'new-york-pizza-boston-boston',\n", " 'categories': [{'alias': 'pizza', 'title': 'Pizza'},\n", " {'alias': 'burgers', 'title': 'Burgers'},\n", " {'alias': 'sandwiches', 'title': 'Sandwiches'}],\n", " 'coordinates': {'latitude': 42.351448059082,\n", " 'longitude': -71.0645599365234},\n", " 'display_phone': '(617) 482-3459',\n", " 'distance': 679.9852325163279,\n", " 'id': 'kNXBd_SW0ij7u3UrjCdPcA',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/m_1jcOHEOknOwQor2qfpmw/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '224 Tremont St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['224 Tremont St',\n", " 'Boston, MA 02116'],\n", " 'state': 'MA',\n", " 'zip_code': '02116'},\n", " 'name': 'New York Pizza -Boston',\n", " 'phone': '+16174823459',\n", " 'price': '$',\n", " 'rating': 3.0,\n", " 'review_count': 285,\n", " 'transactions': ['delivery', 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/new-york-pizza-boston-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'},\n", " {'alias': 'al-dente-restaurant-boston',\n", " 'categories': [{'alias': 'italian', 'title': 'Italian'},\n", " {'alias': 'salad', 'title': 'Salad'},\n", " {'alias': 'seafood', 'title': 'Seafood'}],\n", " 'coordinates': {'latitude': 42.36422, 'longitude': -71.05536},\n", " 'display_phone': '(617) 523-0990',\n", " 'distance': 2239.151953813023,\n", " 'id': 'pOEHpNa4B6oesmr5ltiv8A',\n", " 'image_url': 'https://s3-media2.fl.yelpcdn.com/bphoto/1Fka1ftpeOll7x2Jiy0VLQ/o.jpg',\n", " 'is_closed': False,\n", " 'location': {'address1': '109 Salem St',\n", " 'address2': '',\n", " 'address3': '',\n", " 'city': 'Boston',\n", " 'country': 'US',\n", " 'display_address': ['109 Salem St',\n", " 'Boston, MA 02113'],\n", " 'state': 'MA',\n", " 'zip_code': '02113'},\n", " 'name': 'Al Dente Restaurant',\n", " 'phone': '+16175230990',\n", " 'price': '$$',\n", " 'rating': 4.0,\n", " 'review_count': 1256,\n", " 'transactions': ['delivery',\n", " 'restaurant_reservation',\n", " 'pickup'],\n", " 'url': 'https://www.yelp.com/biz/al-dente-restaurant-boston?adjust_creative=ncTGRk9cVh1sNIlumaLqlQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=ncTGRk9cVh1sNIlumaLqlQ'}],\n", " 'region': {'center': {'latitude': 42.34784169448538,\n", " 'longitude': -71.07124328613281}},\n", " 'total': 2300}\n" ] } ], "source": [ "import requests\n", "\n", "API_KEY = 'k04EveojLDWtsNI9D_GcEAYSDLNThcspgKOAPuP3TgaCH7u97JdAtaoFni8FiD612pkEJRQyvkSI0iCMXbM8xVWe6e6N0_KWNB-e1zQw7JR1Qv-hg_R-Rwy0L7TMXXYx'\n", "\n", "API_URL = 'https://api.yelp.com/v3/businesses/search'\n", "\n", "myheaders = {'Authorization' : 'Bearer {}'.format(API_KEY)}\n", "myparams = {'location':'Boston', 'term':'Pizza', 'limit':50}\n", "response = requests.get(API_URL, params=myparams, headers=myheaders)\n", "\n", "print(response.status_code)\n", "\n", "import pprint\n", "pp.PrettyPrinter().pprint(response.json())\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Could there be a relationship between the rating of the pizza place and the number of reviews? Let's find out!" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "50" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "json = response.json()\n", "pizza = json['businesses']\n", "len(pizza)\n", "\n", "#[place.get('price','?') for place in pizza]\n" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Text(0, 0.5, 'Number of Yelp Reviews')" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "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\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "json = response.json()\n", "pizza = json[\"businesses\"]\n", "\n", "ratings = [place['rating'] for place in pizza] # if place.get('price','?')=='$$$']\n", "#reviews = [place['review_count'] for place in pizza] # if place.get('price','?')=='$']\n", "\n", "#import sklearn.linear_model as lm\n", "#indep = [[x] for x in ratings]\n", "#model = lm.LinearRegression().fit(indep, reviews)\n", "#predicted = model.predict(indep)\n", "\n", "\n", "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "plt.figure(figsize=(8,8))\n", "plt.hist(ratings)\n", "#plt.hist(reviews)\n", "#plt.scatter(ratings, reviews)\n", "plt.xlabel(\"Avg. Rating\")\n", "plt.ylabel(\"Number of Yelp Reviews\")\n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As another an example, reddit makes it possible to fetch content from sub-redit streams. The documentation for this API is found here. In particular, let's fetch some recent cat photos from reddit - because we haven't seen enough cat photos on the Internet, right?\n", "\n", "### A note about HTTP headers\n", "When we make an API call, we may have to supply additional metadata about our request in the form of key-value pairs. Which request headers we have to supply is API-specific. The reddit API requires that we supply a descriptive value for the 'User-Agent'. The User-Agent attribute is used to define the caller, the browser, or the application being used to make the API request. In otherwords, reddit is telling us that we can freely access their database via a documented API call, but they want to know who's calling! Additional rules for using the reddit API can be found here: https://www.reddit.com/dev/api/\n" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "{'data': {'after': 't3_u1yw4m',\n", " 'before': None,\n", " 'children': [{'data': {'all_awardings': [],\n", " 'allow_live_comments': False,\n", " 'approved_at_utc': None,\n", " 'approved_by': None,\n", " 'archived': False,\n", " 'author': 'moody_economist22',\n", " 'author_flair_background_color': None,\n", " 'author_flair_css_class': None,\n", " 'author_flair_richtext': [],\n", " 'author_flair_template_id': None,\n", " 'author_flair_text': None,\n", " 'author_flair_text_color': None,\n", " 'author_flair_type': 'text',\n", " 'author_fullname': 't2_b3u8t31f',\n", " 'author_is_blocked': False,\n", " 'author_patreon_flair': False,\n", " 'author_premium': False,\n", " 'awarders': [],\n", " 'banned_at_utc': None,\n", " 'banned_by': None,\n", " 'can_gild': False,\n", " 'can_mod_post': False,\n", " 'category': None,\n", " 'clicked': False,\n", " 'content_categories': None,\n", " 'contest_mode': False,\n", " 'created': 1649770032.0,\n", " 'created_utc': 1649770032.0,\n", " 'discussion_type': None,\n", " 'distinguished': None,\n", " 'domain': 'i.redd.it',\n", " 'downs': 0,\n", " 'edited': False,\n", " 'gilded': 0,\n", " 'gildings': {},\n", " 'hidden': False,\n", " 'hide_score': True,\n", " 'id': 'u1z3mt',\n", " 'is_created_from_ads_ui': False,\n", " 'is_crosspostable': False,\n", " 'is_meta': False,\n", " 'is_original_content': False,\n", " 'is_reddit_media_domain': True,\n", " 'is_robot_indexable': True,\n", " 'is_self': False,\n", " 'is_video': False,\n", " 'likes': None,\n", " 'link_flair_background_color': '',\n", " 'link_flair_css_class': '',\n", " 'link_flair_richtext': [{'e': 'text',\n", " 't': 'Cat Picture'}],\n", " 'link_flair_template_id': '9b021bc6-b875-11ec-aa94-8e28dbb24a96',\n", " 'link_flair_text': 'Cat Picture',\n", " 'link_flair_text_color': 'dark',\n", " 'link_flair_type': 'richtext',\n", " 'locked': False,\n", " 'media': None,\n", " 'media_embed': {},\n", " 'media_only': False,\n", " 'mod_note': None,\n", " 'mod_reason_by': None,\n", " 'mod_reason_title': None,\n", " 'mod_reports': [],\n", " 'name': 't3_u1z3mt',\n", " 'no_follow': True,\n", " 'num_comments': 0,\n", " 'num_crossposts': 0,\n", " 'num_reports': None,\n", " 'over_18': False,\n", " 'parent_whitelist_status': 'all_ads',\n", " 'permalink': '/r/cats/comments/u1z3mt/this_is_the_first_photograph_i_clicked_using_my/',\n", " 'pinned': False,\n", " 'post_hint': 'image',\n", " 'preview': {'enabled': True,\n", " 'images': [{'id': 'lo85kF7s7cxLo0A-foMAgnPw4RldrLVcrKEv8RtkAKw',\n", " 'resolutions': [{'height': 104,\n", " 'url': 'https://preview.redd.it/3ttuw2rsn3t81.jpg?width=108&crop=smart&auto=webp&s=8e1b11181bd5e0e644ec994e53e5f25c6b32ba6c',\n", " 'width': 108},\n", " {'height': 209,\n", " 'url': 'https://preview.redd.it/3ttuw2rsn3t81.jpg?width=216&crop=smart&auto=webp&s=f7a87ce5058860c44b9a5287508f431bf5b99560',\n", " 'width': 216},\n", " {'height': 309,\n", " 'url': 'https://preview.redd.it/3ttuw2rsn3t81.jpg?width=320&crop=smart&auto=webp&s=18334c8b5f242622e520a621f5ae6b701e638ac6',\n", " 'width': 320},\n", " {'height': 619,\n", " 'url': 'https://preview.redd.it/3ttuw2rsn3t81.jpg?width=640&crop=smart&auto=webp&s=7e7314fed6b1cd6448a2ea6dd1590141a7868912',\n", " 'width': 640},\n", " {'height': 928,\n", " 'url': 'https://preview.redd.it/3ttuw2rsn3t81.jpg?width=960&crop=smart&auto=webp&s=e736c2411a9c7ab471595e03f36642d0849263c4',\n", " 'width': 960},\n", " {'height': 1045,\n", " 'url': 'https://preview.redd.it/3ttuw2rsn3t81.jpg?width=1080&crop=smart&auto=webp&s=796e7f3bf6e22c92c71e18b4a754a16cc71e2318',\n", " 'width': 1080}],\n", " 'source': {'height': 1045,\n", " 'url': 'https://preview.redd.it/3ttuw2rsn3t81.jpg?auto=webp&s=322ba858f2f342402ae492e01122e08bfecb39a6',\n", " 'width': 1080},\n", " 'variants': {}}]},\n", " 'pwls': 6,\n", " 'quarantine': False,\n", " 'removal_reason': None,\n", " 'removed_by': None,\n", " 'removed_by_category': None,\n", " 'report_reasons': None,\n", " 'saved': False,\n", " 'score': 1,\n", " 'secure_media': None,\n", " 'secure_media_embed': {},\n", " 'selftext': '',\n", " 'selftext_html': None,\n", " 'send_replies': True,\n", " 'spoiler': False,\n", " 'stickied': False,\n", " 'subreddit': 'cats',\n", " 'subreddit_id': 't5_2qhta',\n", " 'subreddit_name_prefixed': 'r/cats',\n", " 'subreddit_subscribers': 3435246,\n", " 'subreddit_type': 'public',\n", " 'suggested_sort': None,\n", " 'thumbnail': 'https://a.thumbs.redditmedia.com/N1u0g5YCLyQfgi5rsH_vLCsiPsMvXjSg1jXMobPHPq0.jpg',\n", " 'thumbnail_height': 135,\n", " 'thumbnail_width': 140,\n", " 'title': 'This is the first photograph I '\n", " 'clicked using my new phone and just '\n", " 'used a B/W filter!!',\n", " 'top_awarded_type': None,\n", " 'total_awards_received': 0,\n", " 'treatment_tags': [],\n", " 'ups': 1,\n", " 'upvote_ratio': 1.0,\n", " 'url': 'https://i.redd.it/3ttuw2rsn3t81.jpg',\n", " 'url_overridden_by_dest': 'https://i.redd.it/3ttuw2rsn3t81.jpg',\n", " 'user_reports': [],\n", " 'view_count': None,\n", " 'visited': False,\n", " 'whitelist_status': 'all_ads',\n", " 'wls': 6},\n", " 'kind': 't3'},\n", " {'data': {'all_awardings': [],\n", " 'allow_live_comments': False,\n", " 'approved_at_utc': None,\n", " 'approved_by': None,\n", " 'archived': False,\n", " 'author': 'yrurunningzed',\n", " 'author_flair_background_color': None,\n", " 'author_flair_css_class': None,\n", " 'author_flair_richtext': [],\n", " 'author_flair_template_id': None,\n", " 'author_flair_text': None,\n", " 'author_flair_text_color': None,\n", " 'author_flair_type': 'text',\n", " 'author_fullname': 't2_ae9g7q9h',\n", " 'author_is_blocked': False,\n", " 'author_patreon_flair': False,\n", " 'author_premium': False,\n", " 'awarders': [],\n", " 'banned_at_utc': None,\n", " 'banned_by': None,\n", " 'can_gild': False,\n", " 'can_mod_post': False,\n", " 'category': None,\n", " 'clicked': False,\n", " 'content_categories': None,\n", " 'contest_mode': False,\n", " 'created': 1649769920.0,\n", " 'created_utc': 1649769920.0,\n", " 'crosspost_parent': 't3_u1th3y',\n", " 'crosspost_parent_list': [{'all_awardings': [{'award_sub_type': 'GLOBAL',\n", " 'award_type': 'global',\n", " 'awardings_required_to_grant_benefits': None,\n", " 'coin_price': 100,\n", " 'coin_reward': 0,\n", " 'count': 2,\n", " 'days_of_drip_extension': None,\n", " 'days_of_premium': None,\n", " 'description': 'Shows '\n", " 'the '\n", " 'Silver '\n", " 'Award... '\n", " 'and '\n", " \"that's \"\n", " 'it.',\n", " 'end_date': None,\n", " 'giver_coin_reward': None,\n", " 'icon_format': None,\n", " 'icon_height': 512,\n", " 'icon_url': 'https://www.redditstatic.com/gold/awards/icon/silver_512.png',\n", " 'icon_width': 512,\n", " 'id': 'gid_1',\n", " 'is_enabled': True,\n", " 'is_new': False,\n", " 'name': 'Silver',\n", " 'penny_donate': None,\n", " 'penny_price': None,\n", " 'resized_icons': [{'height': 16,\n", " 'url': 'https://www.redditstatic.com/gold/awards/icon/silver_16.png',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://www.redditstatic.com/gold/awards/icon/silver_32.png',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://www.redditstatic.com/gold/awards/icon/silver_48.png',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://www.redditstatic.com/gold/awards/icon/silver_64.png',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://www.redditstatic.com/gold/awards/icon/silver_128.png',\n", " 'width': 128}],\n", " 'resized_static_icons': [{'height': 16,\n", " 'url': 'https://www.redditstatic.com/gold/awards/icon/silver_16.png',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://www.redditstatic.com/gold/awards/icon/silver_32.png',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://www.redditstatic.com/gold/awards/icon/silver_48.png',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://www.redditstatic.com/gold/awards/icon/silver_64.png',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://www.redditstatic.com/gold/awards/icon/silver_128.png',\n", " 'width': 128}],\n", " 'start_date': None,\n", " 'static_icon_height': 512,\n", " 'static_icon_url': 'https://www.redditstatic.com/gold/awards/icon/silver_512.png',\n", " 'static_icon_width': 512,\n", " 'subreddit_coin_reward': 0,\n", " 'subreddit_id': None,\n", " 'tiers_by_required_awardings': None},\n", " {'award_sub_type': 'GLOBAL',\n", " 'award_type': 'global',\n", " 'awardings_required_to_grant_benefits': None,\n", " 'coin_price': 150,\n", " 'coin_reward': 0,\n", " 'count': 3,\n", " 'days_of_drip_extension': None,\n", " 'days_of_premium': None,\n", " 'description': 'Thank '\n", " 'you '\n", " 'stranger. '\n", " 'Shows '\n", " 'the '\n", " 'award.',\n", " 'end_date': None,\n", " 'giver_coin_reward': None,\n", " 'icon_format': None,\n", " 'icon_height': 2048,\n", " 'icon_url': 'https://i.redd.it/award_images/t5_22cerq/klvxk1wggfd41_Helpful.png',\n", " 'icon_width': 2048,\n", " 'id': 'award_f44611f1-b89e-46dc-97fe-892280b13b82',\n", " 'is_enabled': True,\n", " 'is_new': False,\n", " 'name': 'Helpful',\n", " 'penny_donate': None,\n", " 'penny_price': None,\n", " 'resized_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/klvxk1wggfd41_Helpful.png?width=16&height=16&auto=webp&s=a5662dfbdb402bf67866c050aa76c31c147c2f45',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/klvxk1wggfd41_Helpful.png?width=32&height=32&auto=webp&s=a6882eb3f380e8e88009789f4d0072e17b8c59f1',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/klvxk1wggfd41_Helpful.png?width=48&height=48&auto=webp&s=e50064b090879e8a0b55e433f6ee61d5cb5fbe1d',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/klvxk1wggfd41_Helpful.png?width=64&height=64&auto=webp&s=8e5bb2e76683cb6b161830bcdd9642049d6adc11',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/klvxk1wggfd41_Helpful.png?width=128&height=128&auto=webp&s=eda4a9246f95f42ee6940cc0ec65306fd20de878',\n", " 'width': 128}],\n", " 'resized_static_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/klvxk1wggfd41_Helpful.png?width=16&height=16&auto=webp&s=a5662dfbdb402bf67866c050aa76c31c147c2f45',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/klvxk1wggfd41_Helpful.png?width=32&height=32&auto=webp&s=a6882eb3f380e8e88009789f4d0072e17b8c59f1',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/klvxk1wggfd41_Helpful.png?width=48&height=48&auto=webp&s=e50064b090879e8a0b55e433f6ee61d5cb5fbe1d',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/klvxk1wggfd41_Helpful.png?width=64&height=64&auto=webp&s=8e5bb2e76683cb6b161830bcdd9642049d6adc11',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/klvxk1wggfd41_Helpful.png?width=128&height=128&auto=webp&s=eda4a9246f95f42ee6940cc0ec65306fd20de878',\n", " 'width': 128}],\n", " 'start_date': None,\n", " 'static_icon_height': 2048,\n", " 'static_icon_url': 'https://i.redd.it/award_images/t5_22cerq/klvxk1wggfd41_Helpful.png',\n", " 'static_icon_width': 2048,\n", " 'subreddit_coin_reward': 0,\n", " 'subreddit_id': None,\n", " 'tiers_by_required_awardings': None},\n", " {'award_sub_type': 'GLOBAL',\n", " 'award_type': 'global',\n", " 'awardings_required_to_grant_benefits': None,\n", " 'coin_price': 70,\n", " 'coin_reward': 0,\n", " 'count': 1,\n", " 'days_of_drip_extension': None,\n", " 'days_of_premium': None,\n", " 'description': 'Show '\n", " 'nature '\n", " 'some '\n", " 'love.',\n", " 'end_date': None,\n", " 'giver_coin_reward': None,\n", " 'icon_format': 'PNG',\n", " 'icon_height': 2048,\n", " 'icon_url': 'https://i.redd.it/award_images/t5_22cerq/fukjtec638u41_TreeHug.png',\n", " 'icon_width': 2048,\n", " 'id': 'award_b92370bb-b7de-4fb3-9608-c5b4a22f714a',\n", " 'is_enabled': True,\n", " 'is_new': False,\n", " 'name': 'Tree '\n", " 'Hug',\n", " 'penny_donate': None,\n", " 'penny_price': 0,\n", " 'resized_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/fukjtec638u41_TreeHug.png?width=16&height=16&auto=webp&s=bbe4efb7b7ea2ecacd9609c937941282019a511f',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/fukjtec638u41_TreeHug.png?width=32&height=32&auto=webp&s=7aa65fa1bbd9dd3482e18cae220a6acbbabd6452',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/fukjtec638u41_TreeHug.png?width=48&height=48&auto=webp&s=a7b1d9f0629a00bc081d6db45a01c14720841969',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/fukjtec638u41_TreeHug.png?width=64&height=64&auto=webp&s=ee0ceaa18ec2902fcb59a89bb93dfb440ce7bcf5',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/fukjtec638u41_TreeHug.png?width=128&height=128&auto=webp&s=f3c3ed580426898ffd2df864e1111c957f71adf3',\n", " 'width': 128}],\n", " 'resized_static_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/fukjtec638u41_TreeHug.png?width=16&height=16&auto=webp&s=bbe4efb7b7ea2ecacd9609c937941282019a511f',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/fukjtec638u41_TreeHug.png?width=32&height=32&auto=webp&s=7aa65fa1bbd9dd3482e18cae220a6acbbabd6452',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/fukjtec638u41_TreeHug.png?width=48&height=48&auto=webp&s=a7b1d9f0629a00bc081d6db45a01c14720841969',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/fukjtec638u41_TreeHug.png?width=64&height=64&auto=webp&s=ee0ceaa18ec2902fcb59a89bb93dfb440ce7bcf5',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/fukjtec638u41_TreeHug.png?width=128&height=128&auto=webp&s=f3c3ed580426898ffd2df864e1111c957f71adf3',\n", " 'width': 128}],\n", " 'start_date': None,\n", " 'static_icon_height': 2048,\n", " 'static_icon_url': 'https://i.redd.it/award_images/t5_22cerq/fukjtec638u41_TreeHug.png',\n", " 'static_icon_width': 2048,\n", " 'subreddit_coin_reward': 0,\n", " 'subreddit_id': None,\n", " 'tiers_by_required_awardings': None},\n", " {'award_sub_type': 'GLOBAL',\n", " 'award_type': 'global',\n", " 'awardings_required_to_grant_benefits': None,\n", " 'coin_price': 100,\n", " 'coin_reward': 0,\n", " 'count': 1,\n", " 'days_of_drip_extension': None,\n", " 'days_of_premium': None,\n", " 'description': 'That '\n", " 'looks '\n", " 'so '\n", " 'good',\n", " 'end_date': None,\n", " 'giver_coin_reward': None,\n", " 'icon_format': 'PNG',\n", " 'icon_height': 2048,\n", " 'icon_url': 'https://i.redd.it/award_images/t5_22cerq/a7dhg27hvnf51_Yummy.png',\n", " 'icon_width': 2048,\n", " 'id': 'award_ae7f17fb-6538-4c75-9ff4-5f48b4cdaa94',\n", " 'is_enabled': True,\n", " 'is_new': False,\n", " 'name': 'Yummy',\n", " 'penny_donate': None,\n", " 'penny_price': 0,\n", " 'resized_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/a7dhg27hvnf51_Yummy.png?width=16&height=16&auto=webp&s=0398654024704fc1df844ddd3124a0c09c10d425',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/a7dhg27hvnf51_Yummy.png?width=32&height=32&auto=webp&s=1ec486c8e1a058a85b2285d2e28ade83c1f15dfe',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/a7dhg27hvnf51_Yummy.png?width=48&height=48&auto=webp&s=487fd7a1cfb27e02d74365da0bfa6872d83389f1',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/a7dhg27hvnf51_Yummy.png?width=64&height=64&auto=webp&s=3d1e8fc7767c8fcf691a1b15a6c31d2410207c31',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/a7dhg27hvnf51_Yummy.png?width=128&height=128&auto=webp&s=61926bf75696db6d94875c5ec822ae657733918f',\n", " 'width': 128}],\n", " 'resized_static_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/a7dhg27hvnf51_Yummy.png?width=16&height=16&auto=webp&s=0398654024704fc1df844ddd3124a0c09c10d425',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/a7dhg27hvnf51_Yummy.png?width=32&height=32&auto=webp&s=1ec486c8e1a058a85b2285d2e28ade83c1f15dfe',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/a7dhg27hvnf51_Yummy.png?width=48&height=48&auto=webp&s=487fd7a1cfb27e02d74365da0bfa6872d83389f1',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/a7dhg27hvnf51_Yummy.png?width=64&height=64&auto=webp&s=3d1e8fc7767c8fcf691a1b15a6c31d2410207c31',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/a7dhg27hvnf51_Yummy.png?width=128&height=128&auto=webp&s=61926bf75696db6d94875c5ec822ae657733918f',\n", " 'width': 128}],\n", " 'start_date': None,\n", " 'static_icon_height': 2048,\n", " 'static_icon_url': 'https://i.redd.it/award_images/t5_22cerq/a7dhg27hvnf51_Yummy.png',\n", " 'static_icon_width': 2048,\n", " 'subreddit_coin_reward': 0,\n", " 'subreddit_id': None,\n", " 'tiers_by_required_awardings': None},\n", " {'award_sub_type': 'GLOBAL',\n", " 'award_type': 'global',\n", " 'awardings_required_to_grant_benefits': None,\n", " 'coin_price': 100,\n", " 'coin_reward': 0,\n", " 'count': 1,\n", " 'days_of_drip_extension': None,\n", " 'days_of_premium': None,\n", " 'description': 'You '\n", " 'deserve '\n", " 'a '\n", " 'smooch',\n", " 'end_date': None,\n", " 'giver_coin_reward': None,\n", " 'icon_format': 'PNG',\n", " 'icon_height': 2048,\n", " 'icon_url': 'https://i.redd.it/award_images/t5_22cerq/sb42u5gmwsj51_Kiss.png',\n", " 'icon_width': 2048,\n", " 'id': 'award_1e516e18-cbee-4668-b338-32d5530f91fe',\n", " 'is_enabled': True,\n", " 'is_new': False,\n", " 'name': 'Kiss',\n", " 'penny_donate': None,\n", " 'penny_price': 0,\n", " 'resized_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/sb42u5gmwsj51_Kiss.png?width=16&height=16&auto=webp&s=9baa0747231fdafce284b8aea2c91997c750681b',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/sb42u5gmwsj51_Kiss.png?width=32&height=32&auto=webp&s=8ee5221fe490340a1e7a18544ad7aa61074b7de9',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/sb42u5gmwsj51_Kiss.png?width=48&height=48&auto=webp&s=a95cfc5b8ca5ee9c74706affad33fecc9b119b6a',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/sb42u5gmwsj51_Kiss.png?width=64&height=64&auto=webp&s=c385e7270d88c6b35ee7aaa021085f5679a75c76',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/sb42u5gmwsj51_Kiss.png?width=128&height=128&auto=webp&s=de811236846f2acc44a7932fd293d4bdee6565ee',\n", " 'width': 128}],\n", " 'resized_static_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/sb42u5gmwsj51_Kiss.png?width=16&height=16&auto=webp&s=9baa0747231fdafce284b8aea2c91997c750681b',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/sb42u5gmwsj51_Kiss.png?width=32&height=32&auto=webp&s=8ee5221fe490340a1e7a18544ad7aa61074b7de9',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/sb42u5gmwsj51_Kiss.png?width=48&height=48&auto=webp&s=a95cfc5b8ca5ee9c74706affad33fecc9b119b6a',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/sb42u5gmwsj51_Kiss.png?width=64&height=64&auto=webp&s=c385e7270d88c6b35ee7aaa021085f5679a75c76',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/sb42u5gmwsj51_Kiss.png?width=128&height=128&auto=webp&s=de811236846f2acc44a7932fd293d4bdee6565ee',\n", " 'width': 128}],\n", " 'start_date': None,\n", " 'static_icon_height': 2048,\n", " 'static_icon_url': 'https://i.redd.it/award_images/t5_22cerq/sb42u5gmwsj51_Kiss.png',\n", " 'static_icon_width': 2048,\n", " 'subreddit_coin_reward': 0,\n", " 'subreddit_id': None,\n", " 'tiers_by_required_awardings': None},\n", " {'award_sub_type': 'GLOBAL',\n", " 'award_type': 'global',\n", " 'awardings_required_to_grant_benefits': None,\n", " 'coin_price': 125,\n", " 'coin_reward': 0,\n", " 'count': 1,\n", " 'days_of_drip_extension': None,\n", " 'days_of_premium': None,\n", " 'description': 'When '\n", " 'you '\n", " 'come '\n", " 'across '\n", " 'a '\n", " 'feel-good '\n", " 'thing.',\n", " 'end_date': None,\n", " 'giver_coin_reward': None,\n", " 'icon_format': None,\n", " 'icon_height': 2048,\n", " 'icon_url': 'https://i.redd.it/award_images/t5_22cerq/5izbv4fn0md41_Wholesome.png',\n", " 'icon_width': 2048,\n", " 'id': 'award_5f123e3d-4f48-42f4-9c11-e98b566d5897',\n", " 'is_enabled': True,\n", " 'is_new': False,\n", " 'name': 'Wholesome',\n", " 'penny_donate': None,\n", " 'penny_price': None,\n", " 'resized_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5izbv4fn0md41_Wholesome.png?width=16&height=16&auto=webp&s=92932f465d58e4c16b12b6eac4ca07d27e3d11c0',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5izbv4fn0md41_Wholesome.png?width=32&height=32&auto=webp&s=d11484a208d68a318bf9d4fcf371171a1cb6a7ef',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5izbv4fn0md41_Wholesome.png?width=48&height=48&auto=webp&s=febdf28b6f39f7da7eb1365325b85e0bb49a9f63',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5izbv4fn0md41_Wholesome.png?width=64&height=64&auto=webp&s=b4406a2d88bf86fa3dc8a45aacf7e0c7bdccc4fb',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5izbv4fn0md41_Wholesome.png?width=128&height=128&auto=webp&s=19555b13e3e196b62eeb9160d1ac1d1b372dcb0b',\n", " 'width': 128}],\n", " 'resized_static_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5izbv4fn0md41_Wholesome.png?width=16&height=16&auto=webp&s=92932f465d58e4c16b12b6eac4ca07d27e3d11c0',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5izbv4fn0md41_Wholesome.png?width=32&height=32&auto=webp&s=d11484a208d68a318bf9d4fcf371171a1cb6a7ef',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5izbv4fn0md41_Wholesome.png?width=48&height=48&auto=webp&s=febdf28b6f39f7da7eb1365325b85e0bb49a9f63',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5izbv4fn0md41_Wholesome.png?width=64&height=64&auto=webp&s=b4406a2d88bf86fa3dc8a45aacf7e0c7bdccc4fb',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5izbv4fn0md41_Wholesome.png?width=128&height=128&auto=webp&s=19555b13e3e196b62eeb9160d1ac1d1b372dcb0b',\n", " 'width': 128}],\n", " 'start_date': None,\n", " 'static_icon_height': 2048,\n", " 'static_icon_url': 'https://i.redd.it/award_images/t5_22cerq/5izbv4fn0md41_Wholesome.png',\n", " 'static_icon_width': 2048,\n", " 'subreddit_coin_reward': 0,\n", " 'subreddit_id': None,\n", " 'tiers_by_required_awardings': None},\n", " {'award_sub_type': 'GLOBAL',\n", " 'award_type': 'global',\n", " 'awardings_required_to_grant_benefits': None,\n", " 'coin_price': 80,\n", " 'coin_reward': 0,\n", " 'count': 1,\n", " 'days_of_drip_extension': None,\n", " 'days_of_premium': None,\n", " 'description': 'Everything '\n", " 'is '\n", " 'better '\n", " 'with '\n", " 'a '\n", " 'good '\n", " 'hug',\n", " 'end_date': None,\n", " 'giver_coin_reward': None,\n", " 'icon_format': 'PNG',\n", " 'icon_height': 2048,\n", " 'icon_url': 'https://i.redd.it/award_images/t5_q0gj4/ks45ij6w05f61_oldHugz.png',\n", " 'icon_width': 2048,\n", " 'id': 'award_8352bdff-3e03-4189-8a08-82501dd8f835',\n", " 'is_enabled': True,\n", " 'is_new': False,\n", " 'name': 'Hugz',\n", " 'penny_donate': None,\n", " 'penny_price': 0,\n", " 'resized_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_q0gj4/ks45ij6w05f61_oldHugz.png?width=16&height=16&auto=webp&s=73a23bf7f08b633508dedf457f2704c522b94a04',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_q0gj4/ks45ij6w05f61_oldHugz.png?width=32&height=32&auto=webp&s=50f2f16e71d2929e3d7275060af3ad6b851dbfb1',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_q0gj4/ks45ij6w05f61_oldHugz.png?width=48&height=48&auto=webp&s=ca487311563425e195699a4d7e4c57a98cbfde8b',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_q0gj4/ks45ij6w05f61_oldHugz.png?width=64&height=64&auto=webp&s=7b4eedcffb1c09a826e7837532c52979760f1d2b',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_q0gj4/ks45ij6w05f61_oldHugz.png?width=128&height=128&auto=webp&s=e4d5ab237eb71a9f02bb3bf9ad5ee43741918d6c',\n", " 'width': 128}],\n", " 'resized_static_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_q0gj4/fpm0r5ryq1361_PolarHugs.png?width=16&height=16&auto=webp&s=69997ace3ef4ffc099b81d774c2c8f1530602875',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_q0gj4/fpm0r5ryq1361_PolarHugs.png?width=32&height=32&auto=webp&s=e9519d1999ef9dce5c8a9f59369cb92f52d95319',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_q0gj4/fpm0r5ryq1361_PolarHugs.png?width=48&height=48&auto=webp&s=f076c6434fb2d2f9075991810fd845c40fa73fc6',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_q0gj4/fpm0r5ryq1361_PolarHugs.png?width=64&height=64&auto=webp&s=85527145e0c4b754306a30df29e584fd16187636',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_q0gj4/fpm0r5ryq1361_PolarHugs.png?width=128&height=128&auto=webp&s=b8843cdf82c3b741d7af057c14076dcd2621e811',\n", " 'width': 128}],\n", " 'start_date': None,\n", " 'static_icon_height': 2048,\n", " 'static_icon_url': 'https://i.redd.it/award_images/t5_q0gj4/fpm0r5ryq1361_PolarHugs.png',\n", " 'static_icon_width': 2048,\n", " 'subreddit_coin_reward': 0,\n", " 'subreddit_id': None,\n", " 'tiers_by_required_awardings': None},\n", " {'award_sub_type': 'GLOBAL',\n", " 'award_type': 'global',\n", " 'awardings_required_to_grant_benefits': None,\n", " 'coin_price': 50,\n", " 'coin_reward': 0,\n", " 'count': 1,\n", " 'days_of_drip_extension': None,\n", " 'days_of_premium': None,\n", " 'description': 'Listen, '\n", " 'get '\n", " 'educated, '\n", " 'and '\n", " 'get '\n", " 'involved.',\n", " 'end_date': None,\n", " 'giver_coin_reward': None,\n", " 'icon_format': 'PNG',\n", " 'icon_height': 2048,\n", " 'icon_url': 'https://i.redd.it/award_images/t5_22cerq/5nswjpyy44551_Ally.png',\n", " 'icon_width': 2048,\n", " 'id': 'award_69c94eb4-d6a3-48e7-9cf2-0f39fed8b87c',\n", " 'is_enabled': True,\n", " 'is_new': False,\n", " 'name': 'Ally',\n", " 'penny_donate': None,\n", " 'penny_price': 0,\n", " 'resized_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5nswjpyy44551_Ally.png?width=16&height=16&auto=webp&s=bb033b3352b6ece0954d279a56f99e16c67abe14',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5nswjpyy44551_Ally.png?width=32&height=32&auto=webp&s=a8e1d0c2994e6e0b254fab1611d539a4fb94e38a',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5nswjpyy44551_Ally.png?width=48&height=48&auto=webp&s=723e4e932c9692ac61cf5b7509424c6ae1b5d220',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5nswjpyy44551_Ally.png?width=64&height=64&auto=webp&s=b7f0640e403ac0ef31236a4a0b7f3dc25de6046c',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5nswjpyy44551_Ally.png?width=128&height=128&auto=webp&s=ac954bb1a06af66bf9295bbfee4550443fb6f21d',\n", " 'width': 128}],\n", " 'resized_static_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5nswjpyy44551_Ally.png?width=16&height=16&auto=webp&s=bb033b3352b6ece0954d279a56f99e16c67abe14',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5nswjpyy44551_Ally.png?width=32&height=32&auto=webp&s=a8e1d0c2994e6e0b254fab1611d539a4fb94e38a',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5nswjpyy44551_Ally.png?width=48&height=48&auto=webp&s=723e4e932c9692ac61cf5b7509424c6ae1b5d220',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5nswjpyy44551_Ally.png?width=64&height=64&auto=webp&s=b7f0640e403ac0ef31236a4a0b7f3dc25de6046c',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/5nswjpyy44551_Ally.png?width=128&height=128&auto=webp&s=ac954bb1a06af66bf9295bbfee4550443fb6f21d',\n", " 'width': 128}],\n", " 'start_date': None,\n", " 'static_icon_height': 2048,\n", " 'static_icon_url': 'https://i.redd.it/award_images/t5_22cerq/5nswjpyy44551_Ally.png',\n", " 'static_icon_width': 2048,\n", " 'subreddit_coin_reward': 0,\n", " 'subreddit_id': None,\n", " 'tiers_by_required_awardings': None},\n", " {'award_sub_type': 'GLOBAL',\n", " 'award_type': 'global',\n", " 'awardings_required_to_grant_benefits': None,\n", " 'coin_price': 100,\n", " 'coin_reward': 0,\n", " 'count': 1,\n", " 'days_of_drip_extension': None,\n", " 'days_of_premium': None,\n", " 'description': 'I '\n", " 'needed '\n", " 'this '\n", " 'today',\n", " 'end_date': None,\n", " 'giver_coin_reward': None,\n", " 'icon_format': 'PNG',\n", " 'icon_height': 2048,\n", " 'icon_url': 'https://i.redd.it/award_images/t5_22cerq/v1mxw8i6wnf51_Heartwarming.png',\n", " 'icon_width': 2048,\n", " 'id': 'award_19860e30-3331-4bac-b3d1-bd28de0c7974',\n", " 'is_enabled': True,\n", " 'is_new': False,\n", " 'name': 'Heartwarming',\n", " 'penny_donate': None,\n", " 'penny_price': 0,\n", " 'resized_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/v1mxw8i6wnf51_Heartwarming.png?width=16&height=16&auto=webp&s=4e50438bd2d72ae5398e839ac2bdcccf323fca79',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/v1mxw8i6wnf51_Heartwarming.png?width=32&height=32&auto=webp&s=e730f68de038499700c6301470812c29ef6a8555',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/v1mxw8i6wnf51_Heartwarming.png?width=48&height=48&auto=webp&s=8d7c7fa22e6ff3b1b0a347839e42f493eb5f6cbc',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/v1mxw8i6wnf51_Heartwarming.png?width=64&height=64&auto=webp&s=11ec2a72e2724017bb8479639edce8a7f2ba64f4',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/v1mxw8i6wnf51_Heartwarming.png?width=128&height=128&auto=webp&s=1e936ae571e89abb5a5aaa2efd2d7cfb0ed1b537',\n", " 'width': 128}],\n", " 'resized_static_icons': [{'height': 16,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/v1mxw8i6wnf51_Heartwarming.png?width=16&height=16&auto=webp&s=4e50438bd2d72ae5398e839ac2bdcccf323fca79',\n", " 'width': 16},\n", " {'height': 32,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/v1mxw8i6wnf51_Heartwarming.png?width=32&height=32&auto=webp&s=e730f68de038499700c6301470812c29ef6a8555',\n", " 'width': 32},\n", " {'height': 48,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/v1mxw8i6wnf51_Heartwarming.png?width=48&height=48&auto=webp&s=8d7c7fa22e6ff3b1b0a347839e42f493eb5f6cbc',\n", " 'width': 48},\n", " {'height': 64,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/v1mxw8i6wnf51_Heartwarming.png?width=64&height=64&auto=webp&s=11ec2a72e2724017bb8479639edce8a7f2ba64f4',\n", " 'width': 64},\n", " {'height': 128,\n", " 'url': 'https://preview.redd.it/award_images/t5_22cerq/v1mxw8i6wnf51_Heartwarming.png?width=128&height=128&auto=webp&s=1e936ae571e89abb5a5aaa2efd2d7cfb0ed1b537',\n", " 'width': 128}],\n", " 'start_date': None,\n", " 'static_icon_height': 2048,\n", " 'static_icon_url': 'https://i.redd.it/award_images/t5_22cerq/v1mxw8i6wnf51_Heartwarming.png',\n", " 'static_icon_width': 2048,\n", " 'subreddit_coin_reward': 0,\n", " 'subreddit_id': None,\n", " 'tiers_by_required_awardings': None}],\n", " 'allow_live_comments': True,\n", " 'approved_at_utc': None,\n", " 'approved_by': None,\n", " 'archived': False,\n", " 'author': 'merckenzie',\n", " 'author_flair_background_color': None,\n", " 'author_flair_css_class': None,\n", " 'author_flair_richtext': [],\n", " 'author_flair_template_id': None,\n", " 'author_flair_text': None,\n", " 'author_flair_text_color': None,\n", " 'author_flair_type': 'text',\n", " 'author_fullname': 't2_71esm',\n", " 'author_is_blocked': False,\n", " 'author_patreon_flair': False,\n", " 'author_premium': False,\n", " 'awarders': [],\n", " 'banned_at_utc': None,\n", " 'banned_by': None,\n", " 'can_gild': False,\n", " 'can_mod_post': False,\n", " 'category': None,\n", " 'clicked': False,\n", " 'content_categories': None,\n", " 'contest_mode': False,\n", " 'created': 1649749180.0,\n", " 'created_utc': 1649749180.0,\n", " 'discussion_type': None,\n", " 'distinguished': None,\n", " 'domain': 'v.redd.it',\n", " 'downs': 0,\n", " 'edited': False,\n", " 'gilded': 0,\n", " 'gildings': {'gid_1': 2},\n", " 'hidden': False,\n", " 'hide_score': False,\n", " 'id': 'u1th3y',\n", " 'is_created_from_ads_ui': False,\n", " 'is_crosspostable': False,\n", " 'is_meta': False,\n", " 'is_original_content': False,\n", " 'is_reddit_media_domain': True,\n", " 'is_robot_indexable': True,\n", " 'is_self': False,\n", " 'is_video': True,\n", " 'likes': None,\n", " 'link_flair_background_color': '',\n", " 'link_flair_css_class': None,\n", " 'link_flair_richtext': [],\n", " 'link_flair_text': None,\n", " 'link_flair_text_color': 'dark',\n", " 'link_flair_type': 'text',\n", " 'locked': False,\n", " 'media': {'reddit_video': {'bitrate_kbps': 1200,\n", " 'dash_url': 'https://v.redd.it/tiiw38asx1t81/DASHPlaylist.mpd?a=1652362054%2COTY1ZDkwZTk1NDdiYTAyYWMxM2M2MjRlYWJiMjJlMzBiMTUwNmIwYjUwZmI5YWI3MzFhMzliZTIyNmRhMmYxMw%3D%3D&v=1&f=sd',\n", " 'duration': 8,\n", " 'fallback_url': 'https://v.redd.it/tiiw38asx1t81/DASH_480.mp4?source=fallback',\n", " 'height': 480,\n", " 'hls_url': 'https://v.redd.it/tiiw38asx1t81/HLSPlaylist.m3u8?a=1652362054%2CNDY3ZTE2ZWMzZDI5Mjg4NjZhZjg5MGIyNzYwNTdhMTNlN2E1ZjE0MmI1NjUwZjIwOThlNGJkZjUzZDU0MzZjZA%3D%3D&v=1&f=sd',\n", " 'is_gif': False,\n", " 'scrubber_media_url': 'https://v.redd.it/tiiw38asx1t81/DASH_96.mp4',\n", " 'transcoding_status': 'completed',\n", " 'width': 480}},\n", " 'media_embed': {},\n", " 'media_only': False,\n", " 'mod_note': None,\n", " 'mod_reason_by': None,\n", " 'mod_reason_title': None,\n", " 'mod_reports': [],\n", " 'name': 't3_u1th3y',\n", " 'no_follow': False,\n", " 'num_comments': 57,\n", " 'num_crossposts': 5,\n", " 'num_reports': None,\n", " 'over_18': False,\n", " 'parent_whitelist_status': 'all_ads',\n", " 'permalink': '/r/FunnyAnimals/comments/u1th3y/stop_biting_my_tail/',\n", " 'pinned': False,\n", " 'post_hint': 'hosted:video',\n", " 'preview': {'enabled': False,\n", " 'images': [{'id': '6UamnRy4pHoi5ahyRCJhJbeAEJb0cxT-pqrGGEf3D5I',\n", " 'resolutions': [{'height': 108,\n", " 'url': 'https://external-preview.redd.it/ns45WA_oH_O5agb1hJuGDidqEui_vI6pIqCS_3Oxf38.png?width=108&crop=smart&format=pjpg&auto=webp&s=51e25ec79a8788b7babf52464f7167719e2dc270',\n", " 'width': 108},\n", " {'height': 216,\n", " 'url': 'https://external-preview.redd.it/ns45WA_oH_O5agb1hJuGDidqEui_vI6pIqCS_3Oxf38.png?width=216&crop=smart&format=pjpg&auto=webp&s=ea3cec0215105287ba52beaf97e9c0125850e8b7',\n", " 'width': 216},\n", " {'height': 320,\n", " 'url': 'https://external-preview.redd.it/ns45WA_oH_O5agb1hJuGDidqEui_vI6pIqCS_3Oxf38.png?width=320&crop=smart&format=pjpg&auto=webp&s=3694d3648cf033646d683323b45787926e55203d',\n", " 'width': 320}],\n", " 'source': {'height': 480,\n", " 'url': 'https://external-preview.redd.it/ns45WA_oH_O5agb1hJuGDidqEui_vI6pIqCS_3Oxf38.png?format=pjpg&auto=webp&s=436604987ae380593c42cc2542a3881e94739ddc',\n", " 'width': 480},\n", " 'variants': {}}]},\n", " 'pwls': 6,\n", " 'quarantine': False,\n", " 'removal_reason': None,\n", " 'removed_by': None,\n", " 'removed_by_category': None,\n", " 'report_reasons': None,\n", " 'saved': False,\n", " 'score': 7533,\n", " 'secure_media': {'reddit_video': {'bitrate_kbps': 1200,\n", " 'dash_url': 'https://v.redd.it/tiiw38asx1t81/DASHPlaylist.mpd?a=1652362054%2COTY1ZDkwZTk1NDdiYTAyYWMxM2M2MjRlYWJiMjJlMzBiMTUwNmIwYjUwZmI5YWI3MzFhMzliZTIyNmRhMmYxMw%3D%3D&v=1&f=sd',\n", " 'duration': 8,\n", " 'fallback_url': 'https://v.redd.it/tiiw38asx1t81/DASH_480.mp4?source=fallback',\n", " 'height': 480,\n", " 'hls_url': 'https://v.redd.it/tiiw38asx1t81/HLSPlaylist.m3u8?a=1652362054%2CNDY3ZTE2ZWMzZDI5Mjg4NjZhZjg5MGIyNzYwNTdhMTNlN2E1ZjE0MmI1NjUwZjIwOThlNGJkZjUzZDU0MzZjZA%3D%3D&v=1&f=sd',\n", " 'is_gif': False,\n", " 'scrubber_media_url': 'https://v.redd.it/tiiw38asx1t81/DASH_96.mp4',\n", " 'transcoding_status': 'completed',\n", " 'width': 480}},\n", " 'secure_media_embed': {},\n", " 'selftext': '',\n", " 'selftext_html': None,\n", " 'send_replies': True,\n", " 'spoiler': False,\n", " 'stickied': False,\n", " 'subreddit': 'FunnyAnimals',\n", " 'subreddit_id': 't5_2st2l',\n", " 'subreddit_name_prefixed': 'r/FunnyAnimals',\n", " 'subreddit_subscribers': 564010,\n", " 'subreddit_type': 'public',\n", " 'suggested_sort': None,\n", " 'thumbnail': 'https://b.thumbs.redditmedia.com/ArG8Aywz6wwsH437bGsPdCkub_2mWnRsqu3QLQMTJOE.jpg',\n", " 'thumbnail_height': 140,\n", " 'thumbnail_width': 140,\n", " 'title': 'stop '\n", " 'biting '\n", " 'my tail',\n", " 'top_awarded_type': None,\n", " 'total_awards_received': 12,\n", " 'treatment_tags': [],\n", " 'ups': 7533,\n", " 'upvote_ratio': 0.97,\n", " 'url': 'https://v.redd.it/tiiw38asx1t81',\n", " 'url_overridden_by_dest': 'https://v.redd.it/tiiw38asx1t81',\n", " 'user_reports': [],\n", " 'view_count': None,\n", " 'visited': False,\n", " 'whitelist_status': 'all_ads',\n", " 'wls': 6}],\n", " 'discussion_type': None,\n", " 'distinguished': None,\n", " 'domain': 'v.redd.it',\n", " 'downs': 0,\n", " 'edited': False,\n", " 'gilded': 0,\n", " 'gildings': {},\n", " 'hidden': False,\n", " 'hide_score': True,\n", " 'id': 'u1z292',\n", " 'is_created_from_ads_ui': False,\n", " 'is_crosspostable': False,\n", " 'is_meta': False,\n", " 'is_original_content': False,\n", " 'is_reddit_media_domain': True,\n", " 'is_robot_indexable': True,\n", " 'is_self': False,\n", " 'is_video': False,\n", " 'likes': None,\n", " 'link_flair_background_color': '',\n", " 'link_flair_css_class': 'humor',\n", " 'link_flair_richtext': [{'e': 'text',\n", " 't': 'Humor'}],\n", " 'link_flair_template_id': 'c52106d2-f9a1-11e4-8ed8-0e65fcd98ff7',\n", " 'link_flair_text': 'Humor',\n", " 'link_flair_text_color': 'dark',\n", " 'link_flair_type': 'richtext',\n", " 'locked': False,\n", " 'media': None,\n", " 'media_embed': {},\n", " 'media_only': False,\n", " 'mod_note': None,\n", " 'mod_reason_by': None,\n", " 'mod_reason_title': None,\n", " 'mod_reports': [],\n", " 'name': 't3_u1z292',\n", " 'no_follow': False,\n", " 'num_comments': 0,\n", " 'num_crossposts': 0,\n", " 'num_reports': None,\n", " 'over_18': False,\n", " 'parent_whitelist_status': 'all_ads',\n", " 'permalink': '/r/cats/comments/u1z292/stop_biting_my_tail/',\n", " 'pinned': False,\n", " 'post_hint': 'link',\n", " 'preview': {'enabled': False,\n", " 'images': [{'id': '6UamnRy4pHoi5ahyRCJhJbeAEJb0cxT-pqrGGEf3D5I',\n", " 'resolutions': [{'height': 108,\n", " 'url': 'https://external-preview.redd.it/ns45WA_oH_O5agb1hJuGDidqEui_vI6pIqCS_3Oxf38.png?width=108&crop=smart&auto=webp&s=c268e07125b5932a2a9d3fd88f973a8c1f926b4f',\n", " 'width': 108},\n", " {'height': 216,\n", " 'url': 'https://external-preview.redd.it/ns45WA_oH_O5agb1hJuGDidqEui_vI6pIqCS_3Oxf38.png?width=216&crop=smart&auto=webp&s=4fa718addea1f43473af6dfbcbe1e7651670fc8c',\n", " 'width': 216},\n", " {'height': 320,\n", " 'url': 'https://external-preview.redd.it/ns45WA_oH_O5agb1hJuGDidqEui_vI6pIqCS_3Oxf38.png?width=320&crop=smart&auto=webp&s=59697d95d01d137db82d412b61d8318069ab11bc',\n", " 'width': 320}],\n", " 'source': {'height': 480,\n", " 'url': 'https://external-preview.redd.it/ns45WA_oH_O5agb1hJuGDidqEui_vI6pIqCS_3Oxf38.png?auto=webp&s=51d1bf99759b49f97f6387f4e9aa02c93967bd6c',\n", " 'width': 480},\n", " 'variants': {}}]},\n", " 'pwls': 6,\n", " 'quarantine': False,\n", " 'removal_reason': None,\n", " 'removed_by': None,\n", " 'removed_by_category': None,\n", " 'report_reasons': None,\n", " 'saved': False,\n", " 'score': 2,\n", " 'secure_media': None,\n", " 'secure_media_embed': {},\n", " 'selftext': '',\n", " 'selftext_html': None,\n", " 'send_replies': False,\n", " 'spoiler': False,\n", " 'stickied': False,\n", " 'subreddit': 'cats',\n", " 'subreddit_id': 't5_2qhta',\n", " 'subreddit_name_prefixed': 'r/cats',\n", " 'subreddit_subscribers': 3435246,\n", " 'subreddit_type': 'public',\n", " 'suggested_sort': None,\n", " 'thumbnail': 'https://b.thumbs.redditmedia.com/ArG8Aywz6wwsH437bGsPdCkub_2mWnRsqu3QLQMTJOE.jpg',\n", " 'thumbnail_height': 140,\n", " 'thumbnail_width': 140,\n", " 'title': 'stop biting my tail',\n", " 'top_awarded_type': None,\n", " 'total_awards_received': 0,\n", " 'treatment_tags': [],\n", " 'ups': 2,\n", " 'upvote_ratio': 1.0,\n", " 'url': 'https://v.redd.it/tiiw38asx1t81',\n", " 'url_overridden_by_dest': 'https://v.redd.it/tiiw38asx1t81',\n", " 'user_reports': [],\n", " 'view_count': None,\n", " 'visited': False,\n", " 'whitelist_status': 'all_ads',\n", " 'wls': 6},\n", " 'kind': 't3'},\n", " {'data': {'all_awardings': [],\n", " 'allow_live_comments': False,\n", " 'approved_at_utc': None,\n", " 'approved_by': None,\n", " 'archived': False,\n", " 'author': 'hurricanedoll',\n", " 'author_flair_background_color': None,\n", " 'author_flair_css_class': None,\n", " 'author_flair_richtext': [],\n", " 'author_flair_template_id': None,\n", " 'author_flair_text': None,\n", " 'author_flair_text_color': None,\n", " 'author_flair_type': 'text',\n", " 'author_fullname': 't2_kfslswws',\n", " 'author_is_blocked': False,\n", " 'author_patreon_flair': False,\n", " 'author_premium': False,\n", " 'awarders': [],\n", " 'banned_at_utc': None,\n", " 'banned_by': None,\n", " 'can_gild': False,\n", " 'can_mod_post': False,\n", " 'category': None,\n", " 'clicked': False,\n", " 'content_categories': None,\n", " 'contest_mode': False,\n", " 'created': 1649769890.0,\n", " 'created_utc': 1649769890.0,\n", " 'discussion_type': None,\n", " 'distinguished': None,\n", " 'domain': 'i.redd.it',\n", " 'downs': 0,\n", " 'edited': False,\n", " 'gilded': 0,\n", " 'gildings': {},\n", " 'hidden': False,\n", " 'hide_score': True,\n", " 'id': 'u1z1us',\n", " 'is_created_from_ads_ui': False,\n", " 'is_crosspostable': False,\n", " 'is_meta': False,\n", " 'is_original_content': False,\n", " 'is_reddit_media_domain': True,\n", " 'is_robot_indexable': True,\n", " 'is_self': False,\n", " 'is_video': False,\n", " 'likes': None,\n", " 'link_flair_background_color': '',\n", " 'link_flair_css_class': 'default',\n", " 'link_flair_richtext': [{'e': 'text',\n", " 't': 'Cat Picture'}],\n", " 'link_flair_text': 'Cat Picture',\n", " 'link_flair_text_color': 'dark',\n", " 'link_flair_type': 'richtext',\n", " 'locked': False,\n", " 'media': None,\n", " 'media_embed': {},\n", " 'media_only': False,\n", " 'mod_note': None,\n", " 'mod_reason_by': None,\n", " 'mod_reason_title': None,\n", " 'mod_reports': [],\n", " 'name': 't3_u1z1us',\n", " 'no_follow': True,\n", " 'num_comments': 0,\n", " 'num_crossposts': 0,\n", " 'num_reports': None,\n", " 'over_18': False,\n", " 'parent_whitelist_status': 'all_ads',\n", " 'permalink': '/r/cats/comments/u1z1us/look_how_little_my_baby_was_c/',\n", " 'pinned': False,\n", " 'post_hint': 'image',\n", " 'preview': {'enabled': True,\n", " 'images': [{'id': 'zbokmI9FoSZ_1zqZneNMORv77_YNM195y1bJ3cMlGgg',\n", " 'resolutions': [{'height': 144,\n", " 'url': 'https://preview.redd.it/3j0ze7j6n3t81.jpg?width=108&crop=smart&auto=webp&s=e12f9732ab85efe81dd04a30f88919479fcd0a58',\n", " 'width': 108},\n", " {'height': 288,\n", " 'url': 'https://preview.redd.it/3j0ze7j6n3t81.jpg?width=216&crop=smart&auto=webp&s=bd336bd7274aeed60c0eef24b20d8c925116ad4c',\n", " 'width': 216},\n", " {'height': 426,\n", " 'url': 'https://preview.redd.it/3j0ze7j6n3t81.jpg?width=320&crop=smart&auto=webp&s=b866abe58edbe6d95cdc937625cbc4e382da2797',\n", " 'width': 320},\n", " {'height': 853,\n", " 'url': 'https://preview.redd.it/3j0ze7j6n3t81.jpg?width=640&crop=smart&auto=webp&s=7978f3e3a6b0f0a53d2537901378011d482e3c5a',\n", " 'width': 640},\n", " {'height': 1280,\n", " 'url': 'https://preview.redd.it/3j0ze7j6n3t81.jpg?width=960&crop=smart&auto=webp&s=2cf534fcba2a83e19287b9a21d8f80be485adae5',\n", " 'width': 960},\n", " {'height': 1440,\n", " 'url': 'https://preview.redd.it/3j0ze7j6n3t81.jpg?width=1080&crop=smart&auto=webp&s=21477eef191b2ead1f0eece852d0154c41ca7473',\n", " 'width': 1080}],\n", " 'source': {'height': 4160,\n", " 'url': 'https://preview.redd.it/3j0ze7j6n3t81.jpg?auto=webp&s=1913772104b20e170e4ef4a4fb06789096859054',\n", " 'width': 3120},\n", " 'variants': {}}]},\n", " 'pwls': 6,\n", " 'quarantine': False,\n", " 'removal_reason': None,\n", " 'removed_by': None,\n", " 'removed_by_category': None,\n", " 'report_reasons': None,\n", " 'saved': False,\n", " 'score': 1,\n", " 'secure_media': None,\n", " 'secure_media_embed': {},\n", " 'selftext': '',\n", " 'selftext_html': None,\n", " 'send_replies': True,\n", " 'spoiler': False,\n", " 'stickied': False,\n", " 'subreddit': 'cats',\n", " 'subreddit_id': 't5_2qhta',\n", " 'subreddit_name_prefixed': 'r/cats',\n", " 'subreddit_subscribers': 3435246,\n", " 'subreddit_type': 'public',\n", " 'suggested_sort': None,\n", " 'thumbnail': 'https://a.thumbs.redditmedia.com/qCH7z-xFv1j-bNwOQ9zDp45zBOqS4prwE7C4APSJ7Y0.jpg',\n", " 'thumbnail_height': 140,\n", " 'thumbnail_width': 140,\n", " 'title': 'Look how little my baby was :C',\n", " 'top_awarded_type': None,\n", " 'total_awards_received': 0,\n", " 'treatment_tags': [],\n", " 'ups': 1,\n", " 'upvote_ratio': 1.0,\n", " 'url': 'https://i.redd.it/3j0ze7j6n3t81.jpg',\n", " 'url_overridden_by_dest': 'https://i.redd.it/3j0ze7j6n3t81.jpg',\n", " 'user_reports': [],\n", " 'view_count': None,\n", " 'visited': False,\n", " 'whitelist_status': 'all_ads',\n", " 'wls': 6},\n", " 'kind': 't3'},\n", " {'data': {'all_awardings': [],\n", " 'allow_live_comments': False,\n", " 'approved_at_utc': None,\n", " 'approved_by': None,\n", " 'archived': False,\n", " 'author': 'Fangs_0ut',\n", " 'author_flair_background_color': None,\n", " 'author_flair_css_class': None,\n", " 'author_flair_richtext': [],\n", " 'author_flair_template_id': None,\n", " 'author_flair_text': None,\n", " 'author_flair_text_color': None,\n", " 'author_flair_type': 'text',\n", " 'author_fullname': 't2_55p02azz',\n", " 'author_is_blocked': False,\n", " 'author_patreon_flair': False,\n", " 'author_premium': False,\n", " 'awarders': [],\n", " 'banned_at_utc': None,\n", " 'banned_by': None,\n", " 'can_gild': False,\n", " 'can_mod_post': False,\n", " 'category': None,\n", " 'clicked': False,\n", " 'content_categories': None,\n", " 'contest_mode': False,\n", " 'created': 1649769861.0,\n", " 'created_utc': 1649769861.0,\n", " 'discussion_type': None,\n", " 'distinguished': None,\n", " 'domain': 'i.redd.it',\n", " 'downs': 0,\n", " 'edited': False,\n", " 'gilded': 0,\n", " 'gildings': {},\n", " 'hidden': False,\n", " 'hide_score': True,\n", " 'id': 'u1z1i2',\n", " 'is_created_from_ads_ui': False,\n", " 'is_crosspostable': False,\n", " 'is_meta': False,\n", " 'is_original_content': False,\n", " 'is_reddit_media_domain': True,\n", " 'is_robot_indexable': True,\n", " 'is_self': False,\n", " 'is_video': False,\n", " 'likes': None,\n", " 'link_flair_background_color': '',\n", " 'link_flair_css_class': '',\n", " 'link_flair_richtext': [{'e': 'text',\n", " 't': 'Cat Picture'}],\n", " 'link_flair_template_id': '9b021bc6-b875-11ec-aa94-8e28dbb24a96',\n", " 'link_flair_text': 'Cat Picture',\n", " 'link_flair_text_color': 'dark',\n", " 'link_flair_type': 'richtext',\n", " 'locked': False,\n", " 'media': None,\n", " 'media_embed': {},\n", " 'media_only': False,\n", " 'mod_note': None,\n", " 'mod_reason_by': None,\n", " 'mod_reason_title': None,\n", " 'mod_reports': [],\n", " 'name': 't3_u1z1i2',\n", " 'no_follow': False,\n", " 'num_comments': 1,\n", " 'num_crossposts': 0,\n", " 'num_reports': None,\n", " 'over_18': False,\n", " 'parent_whitelist_status': 'all_ads',\n", " 'permalink': '/r/cats/comments/u1z1i2/3_of_my_6_cats_having_a_morning_meeting_by_the/',\n", " 'pinned': False,\n", " 'post_hint': 'image',\n", " 'preview': {'enabled': True,\n", " 'images': [{'id': 'wrFTO3ZPzwKw-aZ-wgHS_iXERZmxo9RyPE4IXSSzX68',\n", " 'resolutions': [{'height': 144,\n", " 'url': 'https://preview.redd.it/tn86ahban3t81.jpg?width=108&crop=smart&auto=webp&s=266eb990cfdef2a2ef365d692fb9ad501dcf1eb9',\n", " 'width': 108},\n", " {'height': 288,\n", " 'url': 'https://preview.redd.it/tn86ahban3t81.jpg?width=216&crop=smart&auto=webp&s=1f1be7c0a51af201a07bb083727c0f2b5cfcb893',\n", " 'width': 216},\n", " {'height': 426,\n", " 'url': 'https://preview.redd.it/tn86ahban3t81.jpg?width=320&crop=smart&auto=webp&s=1a461cb3bfccca2ee424f983f349db0e452e6be1',\n", " 'width': 320},\n", " {'height': 853,\n", " 'url': 'https://preview.redd.it/tn86ahban3t81.jpg?width=640&crop=smart&auto=webp&s=b6e6bf5cbaeff1bfc7048ccf938589bf3b2a80bc',\n", " 'width': 640},\n", " {'height': 1280,\n", " 'url': 'https://preview.redd.it/tn86ahban3t81.jpg?width=960&crop=smart&auto=webp&s=e3febd5280cb88b72537d79163e4aad5738be9e4',\n", " 'width': 960},\n", " {'height': 1440,\n", " 'url': 'https://preview.redd.it/tn86ahban3t81.jpg?width=1080&crop=smart&auto=webp&s=15781951a93b1da88b186aef19c5e346f99c1844',\n", " 'width': 1080}],\n", " 'source': {'height': 4032,\n", " 'url': 'https://preview.redd.it/tn86ahban3t81.jpg?auto=webp&s=1a95cdec2b113ea17c502a9d2dfcd47d0a769a38',\n", " 'width': 3024},\n", " 'variants': {}}]},\n", " 'pwls': 6,\n", " 'quarantine': False,\n", " 'removal_reason': None,\n", " 'removed_by': None,\n", " 'removed_by_category': None,\n", " 'report_reasons': None,\n", " 'saved': False,\n", " 'score': 8,\n", " 'secure_media': None,\n", " 'secure_media_embed': {},\n", " 'selftext': '',\n", " 'selftext_html': None,\n", " 'send_replies': False,\n", " 'spoiler': False,\n", " 'stickied': False,\n", " 'subreddit': 'cats',\n", " 'subreddit_id': 't5_2qhta',\n", " 'subreddit_name_prefixed': 'r/cats',\n", " 'subreddit_subscribers': 3435246,\n", " 'subreddit_type': 'public',\n", " 'suggested_sort': None,\n", " 'thumbnail': 'https://b.thumbs.redditmedia.com/Zs0zvccQznhSWhaXi-oBlnn9GEPO9fmPOCFw59Zd7oI.jpg',\n", " 'thumbnail_height': 140,\n", " 'thumbnail_width': 140,\n", " 'title': '3 of my 6 cats having a morning '\n", " 'meeting by the window. 💜',\n", " 'top_awarded_type': None,\n", " 'total_awards_received': 0,\n", " 'treatment_tags': [],\n", " 'ups': 8,\n", " 'upvote_ratio': 1.0,\n", " 'url': 'https://i.redd.it/tn86ahban3t81.jpg',\n", " 'url_overridden_by_dest': 'https://i.redd.it/tn86ahban3t81.jpg',\n", " 'user_reports': [],\n", " 'view_count': None,\n", " 'visited': False,\n", " 'whitelist_status': 'all_ads',\n", " 'wls': 6},\n", " 'kind': 't3'},\n", " {'data': {'all_awardings': [],\n", " 'allow_live_comments': False,\n", " 'approved_at_utc': None,\n", " 'approved_by': None,\n", " 'archived': False,\n", " 'author': 'ispyamy',\n", " 'author_flair_background_color': None,\n", " 'author_flair_css_class': None,\n", " 'author_flair_richtext': [],\n", " 'author_flair_template_id': None,\n", " 'author_flair_text': None,\n", " 'author_flair_text_color': None,\n", " 'author_flair_type': 'text',\n", " 'author_fullname': 't2_9hskjgfw',\n", " 'author_is_blocked': False,\n", " 'author_patreon_flair': False,\n", " 'author_premium': False,\n", " 'awarders': [],\n", " 'banned_at_utc': None,\n", " 'banned_by': None,\n", " 'can_gild': False,\n", " 'can_mod_post': False,\n", " 'category': None,\n", " 'clicked': False,\n", " 'content_categories': None,\n", " 'contest_mode': False,\n", " 'created': 1649769803.0,\n", " 'created_utc': 1649769803.0,\n", " 'discussion_type': None,\n", " 'distinguished': None,\n", " 'domain': 'i.redd.it',\n", " 'downs': 0,\n", " 'edited': False,\n", " 'gilded': 0,\n", " 'gildings': {},\n", " 'hidden': False,\n", " 'hide_score': True,\n", " 'id': 'u1z0ry',\n", " 'is_created_from_ads_ui': False,\n", " 'is_crosspostable': False,\n", " 'is_meta': False,\n", " 'is_original_content': False,\n", " 'is_reddit_media_domain': True,\n", " 'is_robot_indexable': True,\n", " 'is_self': False,\n", " 'is_video': False,\n", " 'likes': None,\n", " 'link_flair_background_color': '',\n", " 'link_flair_css_class': 'default',\n", " 'link_flair_richtext': [{'e': 'text',\n", " 't': 'Cat Picture'}],\n", " 'link_flair_text': 'Cat Picture',\n", " 'link_flair_text_color': 'dark',\n", " 'link_flair_type': 'richtext',\n", " 'locked': False,\n", " 'media': None,\n", " 'media_embed': {},\n", " 'media_only': False,\n", " 'mod_note': None,\n", " 'mod_reason_by': None,\n", " 'mod_reason_title': None,\n", " 'mod_reports': [],\n", " 'name': 't3_u1z0ry',\n", " 'no_follow': False,\n", " 'num_comments': 1,\n", " 'num_crossposts': 0,\n", " 'num_reports': None,\n", " 'over_18': False,\n", " 'parent_whitelist_status': 'all_ads',\n", " 'permalink': '/r/cats/comments/u1z0ry/what_can_i_do_to_help_my_cats_pass_their/',\n", " 'pinned': False,\n", " 'post_hint': 'image',\n", " 'preview': {'enabled': True,\n", " 'images': [{'id': 'iKOW3qnlp5zYaETHGFuqzfcRQBIaYlw8D46D4ESXWnE',\n", " 'resolutions': [{'height': 144,\n", " 'url': 'https://preview.redd.it/1yqlmuj3n3t81.jpg?width=108&crop=smart&auto=webp&s=8c9f6c3996fe5de3fbf8ec173242245f46626997',\n", " 'width': 108},\n", " {'height': 288,\n", " 'url': 'https://preview.redd.it/1yqlmuj3n3t81.jpg?width=216&crop=smart&auto=webp&s=0a4368d5b2ed534c038d970c21c69b3852d82992',\n", " 'width': 216},\n", " {'height': 426,\n", " 'url': 'https://preview.redd.it/1yqlmuj3n3t81.jpg?width=320&crop=smart&auto=webp&s=0216485ef6660254405f922c72624a765ab50860',\n", " 'width': 320},\n", " {'height': 853,\n", " 'url': 'https://preview.redd.it/1yqlmuj3n3t81.jpg?width=640&crop=smart&auto=webp&s=724f542afddec13bb7aebbdb84288a77b7250b9c',\n", " 'width': 640},\n", " {'height': 1280,\n", " 'url': 'https://preview.redd.it/1yqlmuj3n3t81.jpg?width=960&crop=smart&auto=webp&s=ec70a095c67b6748b6371937374b6ecc58b5c2c6',\n", " 'width': 960},\n", " {'height': 1440,\n", " 'url': 'https://preview.redd.it/1yqlmuj3n3t81.jpg?width=1080&crop=smart&auto=webp&s=66142f602181091c5ed96af3e5002a15affac7c5',\n", " 'width': 1080}],\n", " 'source': {'height': 4032,\n", " 'url': 'https://preview.redd.it/1yqlmuj3n3t81.jpg?auto=webp&s=0fd829e35c44ecc5d96163f48cec95327c25c507',\n", " 'width': 3024},\n", " 'variants': {}}]},\n", " 'pwls': 6,\n", " 'quarantine': False,\n", " 'removal_reason': None,\n", " 'removed_by': None,\n", " 'removed_by_category': None,\n", " 'report_reasons': None,\n", " 'saved': False,\n", " 'score': 3,\n", " 'secure_media': None,\n", " 'secure_media_embed': {},\n", " 'selftext': '',\n", " 'selftext_html': None,\n", " 'send_replies': True,\n", " 'spoiler': False,\n", " 'stickied': False,\n", " 'subreddit': 'cats',\n", " 'subreddit_id': 't5_2qhta',\n", " 'subreddit_name_prefixed': 'r/cats',\n", " 'subreddit_subscribers': 3435246,\n", " 'subreddit_type': 'public',\n", " 'suggested_sort': None,\n", " 'thumbnail': 'https://b.thumbs.redditmedia.com/Cxwc6J51WDZhv3KtRJ2H1zE-tJ0GNS37cB64QmzShMU.jpg',\n", " 'thumbnail_height': 140,\n", " 'thumbnail_width': 140,\n", " 'title': 'What can I do to help my cats pass '\n", " 'their hairballs? They’re shedding '\n", " 'so much it’s crazy!',\n", " 'top_awarded_type': None,\n", " 'total_awards_received': 0,\n", " 'treatment_tags': [],\n", " 'ups': 3,\n", " 'upvote_ratio': 1.0,\n", " 'url': 'https://i.redd.it/1yqlmuj3n3t81.jpg',\n", " 'url_overridden_by_dest': 'https://i.redd.it/1yqlmuj3n3t81.jpg',\n", " 'user_reports': [],\n", " 'view_count': None,\n", " 'visited': False,\n", " 'whitelist_status': 'all_ads',\n", " 'wls': 6},\n", " 'kind': 't3'},\n", " {'data': {'all_awardings': [],\n", " 'allow_live_comments': False,\n", " 'approved_at_utc': None,\n", " 'approved_by': None,\n", " 'archived': False,\n", " 'author': 'WeiShenYT',\n", " 'author_flair_background_color': None,\n", " 'author_flair_css_class': None,\n", " 'author_flair_richtext': [],\n", " 'author_flair_template_id': None,\n", " 'author_flair_text': None,\n", " 'author_flair_text_color': None,\n", " 'author_flair_type': 'text',\n", " 'author_fullname': 't2_1kvajpqr',\n", " 'author_is_blocked': False,\n", " 'author_patreon_flair': False,\n", " 'author_premium': False,\n", " 'awarders': [],\n", " 'banned_at_utc': None,\n", " 'banned_by': None,\n", " 'can_gild': False,\n", " 'can_mod_post': False,\n", " 'category': None,\n", " 'clicked': False,\n", " 'content_categories': None,\n", " 'contest_mode': False,\n", " 'created': 1649769731.0,\n", " 'created_utc': 1649769731.0,\n", " 'discussion_type': None,\n", " 'distinguished': None,\n", " 'domain': 'i.redd.it',\n", " 'downs': 0,\n", " 'edited': False,\n", " 'gilded': 0,\n", " 'gildings': {},\n", " 'hidden': False,\n", " 'hide_score': True,\n", " 'id': 'u1yzuj',\n", " 'is_created_from_ads_ui': False,\n", " 'is_crosspostable': False,\n", " 'is_meta': False,\n", " 'is_original_content': False,\n", " 'is_reddit_media_domain': True,\n", " 'is_robot_indexable': True,\n", " 'is_self': False,\n", " 'is_video': False,\n", " 'likes': None,\n", " 'link_flair_background_color': '',\n", " 'link_flair_css_class': 'default',\n", " 'link_flair_richtext': [{'e': 'text',\n", " 't': 'Cat Picture'}],\n", " 'link_flair_text': 'Cat Picture',\n", " 'link_flair_text_color': 'dark',\n", " 'link_flair_type': 'richtext',\n", " 'locked': False,\n", " 'media': None,\n", " 'media_embed': {},\n", " 'media_only': False,\n", " 'mod_note': None,\n", " 'mod_reason_by': None,\n", " 'mod_reason_title': None,\n", " 'mod_reports': [],\n", " 'name': 't3_u1yzuj',\n", " 'no_follow': False,\n", " 'num_comments': 1,\n", " 'num_crossposts': 0,\n", " 'num_reports': None,\n", " 'over_18': False,\n", " 'parent_whitelist_status': 'all_ads',\n", " 'permalink': '/r/cats/comments/u1yzuj/need_a_name_for_our_new_buddy/',\n", " 'pinned': False,\n", " 'post_hint': 'image',\n", " 'preview': {'enabled': True,\n", " 'images': [{'id': '_MfdamO2qk7rm3joSNTv53y2Ez8plxTMjmE4I5FoXFM',\n", " 'resolutions': [{'height': 193,\n", " 'url': 'https://preview.redd.it/8k6kviqwm3t81.jpg?width=108&crop=smart&auto=webp&s=b558c47bebc193c1cc6b1cbb73437352b0ce6914',\n", " 'width': 108},\n", " {'height': 386,\n", " 'url': 'https://preview.redd.it/8k6kviqwm3t81.jpg?width=216&crop=smart&auto=webp&s=7e02543892cc1baf6e46ceb98045557f419e3c5f',\n", " 'width': 216},\n", " {'height': 572,\n", " 'url': 'https://preview.redd.it/8k6kviqwm3t81.jpg?width=320&crop=smart&auto=webp&s=29d06a1282e292916f21971b249cdbaf72c55e8f',\n", " 'width': 320},\n", " {'height': 1145,\n", " 'url': 'https://preview.redd.it/8k6kviqwm3t81.jpg?width=640&crop=smart&auto=webp&s=3530f19ceab6de48e89ea71f17f862cf8338f386',\n", " 'width': 640}],\n", " 'source': {'height': 1717,\n", " 'url': 'https://preview.redd.it/8k6kviqwm3t81.jpg?auto=webp&s=9f7aae433063395c4f1db0bf2dd702363caad421',\n", " 'width': 959},\n", " 'variants': {}}]},\n", " 'pwls': 6,\n", " 'quarantine': False,\n", " 'removal_reason': None,\n", " 'removed_by': None,\n", " 'removed_by_category': None,\n", " 'report_reasons': None,\n", " 'saved': False,\n", " 'score': 5,\n", " 'secure_media': None,\n", " 'secure_media_embed': {},\n", " 'selftext': '',\n", " 'selftext_html': None,\n", " 'send_replies': True,\n", " 'spoiler': False,\n", " 'stickied': False,\n", " 'subreddit': 'cats',\n", " 'subreddit_id': 't5_2qhta',\n", " 'subreddit_name_prefixed': 'r/cats',\n", " 'subreddit_subscribers': 3435246,\n", " 'subreddit_type': 'public',\n", " 'suggested_sort': None,\n", " 'thumbnail': 'https://b.thumbs.redditmedia.com/BvKHqFcpZW7cHa73eZJIx63lZvIQwo2Kw9Mu8I9SgYY.jpg',\n", " 'thumbnail_height': 140,\n", " 'thumbnail_width': 140,\n", " 'title': 'Need a Name for our new Buddy :)',\n", " 'top_awarded_type': None,\n", " 'total_awards_received': 0,\n", " 'treatment_tags': [],\n", " 'ups': 5,\n", " 'upvote_ratio': 1.0,\n", " 'url': 'https://i.redd.it/8k6kviqwm3t81.jpg',\n", " 'url_overridden_by_dest': 'https://i.redd.it/8k6kviqwm3t81.jpg',\n", " 'user_reports': [],\n", " 'view_count': None,\n", " 'visited': False,\n", " 'whitelist_status': 'all_ads',\n", " 'wls': 6},\n", " 'kind': 't3'},\n", " {'data': {'all_awardings': [],\n", " 'allow_live_comments': False,\n", " 'approved_at_utc': None,\n", " 'approved_by': None,\n", " 'archived': False,\n", " 'author': 'SpacePickle99',\n", " 'author_flair_background_color': None,\n", " 'author_flair_css_class': None,\n", " 'author_flair_richtext': [],\n", " 'author_flair_template_id': None,\n", " 'author_flair_text': None,\n", " 'author_flair_text_color': None,\n", " 'author_flair_type': 'text',\n", " 'author_fullname': 't2_fvqr12v',\n", " 'author_is_blocked': False,\n", " 'author_patreon_flair': False,\n", " 'author_premium': False,\n", " 'awarders': [],\n", " 'banned_at_utc': None,\n", " 'banned_by': None,\n", " 'can_gild': False,\n", " 'can_mod_post': False,\n", " 'category': None,\n", " 'clicked': False,\n", " 'content_categories': None,\n", " 'contest_mode': False,\n", " 'created': 1649769556.0,\n", " 'created_utc': 1649769556.0,\n", " 'discussion_type': None,\n", " 'distinguished': None,\n", " 'domain': 'self.cats',\n", " 'downs': 0,\n", " 'edited': False,\n", " 'gilded': 0,\n", " 'gildings': {},\n", " 'hidden': False,\n", " 'hide_score': True,\n", " 'id': 'u1yxgv',\n", " 'is_created_from_ads_ui': False,\n", " 'is_crosspostable': False,\n", " 'is_meta': False,\n", " 'is_original_content': False,\n", " 'is_reddit_media_domain': False,\n", " 'is_robot_indexable': True,\n", " 'is_self': True,\n", " 'is_video': False,\n", " 'likes': None,\n", " 'link_flair_background_color': '',\n", " 'link_flair_css_class': 'advice',\n", " 'link_flair_richtext': [{'e': 'text',\n", " 't': 'Advice'}],\n", " 'link_flair_template_id': '7e252220-f6c9-11e4-ba11-0e7d3bf7865f',\n", " 'link_flair_text': 'Advice',\n", " 'link_flair_text_color': 'dark',\n", " 'link_flair_type': 'richtext',\n", " 'locked': False,\n", " 'media': None,\n", " 'media_embed': {},\n", " 'media_only': False,\n", " 'mod_note': None,\n", " 'mod_reason_by': None,\n", " 'mod_reason_title': None,\n", " 'mod_reports': [],\n", " 'name': 't3_u1yxgv',\n", " 'no_follow': True,\n", " 'num_comments': 3,\n", " 'num_crossposts': 0,\n", " 'num_reports': None,\n", " 'over_18': False,\n", " 'parent_whitelist_status': 'all_ads',\n", " 'permalink': '/r/cats/comments/u1yxgv/how_do_you_clean_out_a_litter_box_when_living_in/',\n", " 'pinned': False,\n", " 'pwls': 6,\n", " 'quarantine': False,\n", " 'removal_reason': None,\n", " 'removed_by': None,\n", " 'removed_by_category': None,\n", " 'report_reasons': None,\n", " 'saved': False,\n", " 'score': 1,\n", " 'secure_media': None,\n", " 'secure_media_embed': {},\n", " 'selftext': 'I want to completely clean my '\n", " 'cats litter box and refresh the '\n", " 'litter, but I don’t know where '\n", " 'to clean it because I live in an '\n", " 'apartment. I have a bathtub, so '\n", " 'I could just spray it down in '\n", " 'there. But isn’t wet cat litter '\n", " 'going down the drain a bad idea?',\n", " 'selftext_html': '<!-- SC_OFF '\n", " '--><div '\n", " 'class=\"md\"><p>I '\n", " 'want to completely clean my '\n", " 'cats litter box and refresh '\n", " 'the litter, but I don’t '\n", " 'know where to clean it '\n", " 'because I live in an '\n", " 'apartment. I have a '\n", " 'bathtub, so I could just '\n", " 'spray it down in there. But '\n", " 'isn’t wet cat litter going '\n", " 'down the drain a bad '\n", " 'idea?</p>\\n'\n", " '</div><!-- SC_ON '\n", " '-->',\n", " 'send_replies': True,\n", " 'spoiler': False,\n", " 'stickied': False,\n", " 'subreddit': 'cats',\n", " 'subreddit_id': 't5_2qhta',\n", " 'subreddit_name_prefixed': 'r/cats',\n", " 'subreddit_subscribers': 3435246,\n", " 'subreddit_type': 'public',\n", " 'suggested_sort': None,\n", " 'thumbnail': 'self',\n", " 'thumbnail_height': None,\n", " 'thumbnail_width': None,\n", " 'title': 'How do you clean out a litter box '\n", " 'when living in an apartment?',\n", " 'top_awarded_type': None,\n", " 'total_awards_received': 0,\n", " 'treatment_tags': [],\n", " 'ups': 1,\n", " 'upvote_ratio': 1.0,\n", " 'url': 'https://www.reddit.com/r/cats/comments/u1yxgv/how_do_you_clean_out_a_litter_box_when_living_in/',\n", " 'user_reports': [],\n", " 'view_count': None,\n", " 'visited': False,\n", " 'whitelist_status': 'all_ads',\n", " 'wls': 6},\n", " 'kind': 't3'},\n", " {'data': {'all_awardings': [],\n", " 'allow_live_comments': False,\n", " 'approved_at_utc': None,\n", " 'approved_by': None,\n", " 'archived': False,\n", " 'author': 'Western-Constant2340',\n", " 'author_flair_background_color': None,\n", " 'author_flair_css_class': None,\n", " 'author_flair_richtext': [],\n", " 'author_flair_template_id': None,\n", " 'author_flair_text': None,\n", " 'author_flair_text_color': None,\n", " 'author_flair_type': 'text',\n", " 'author_fullname': 't2_6jxbeupp',\n", " 'author_is_blocked': False,\n", " 'author_patreon_flair': False,\n", " 'author_premium': False,\n", " 'awarders': [],\n", " 'banned_at_utc': None,\n", " 'banned_by': None,\n", " 'can_gild': False,\n", " 'can_mod_post': False,\n", " 'category': None,\n", " 'clicked': False,\n", " 'content_categories': None,\n", " 'contest_mode': False,\n", " 'created': 1649769479.0,\n", " 'created_utc': 1649769479.0,\n", " 'discussion_type': None,\n", " 'distinguished': None,\n", " 'domain': 'i.redd.it',\n", " 'downs': 0,\n", " 'edited': False,\n", " 'gilded': 0,\n", " 'gildings': {},\n", " 'hidden': False,\n", " 'hide_score': True,\n", " 'id': 'u1ywhc',\n", " 'is_created_from_ads_ui': False,\n", " 'is_crosspostable': False,\n", " 'is_meta': False,\n", " 'is_original_content': False,\n", " 'is_reddit_media_domain': True,\n", " 'is_robot_indexable': True,\n", " 'is_self': False,\n", " 'is_video': False,\n", " 'likes': None,\n", " 'link_flair_background_color': '',\n", " 'link_flair_css_class': '',\n", " 'link_flair_richtext': [{'e': 'text',\n", " 't': 'Cat Picture'}],\n", " 'link_flair_template_id': '9b021bc6-b875-11ec-aa94-8e28dbb24a96',\n", " 'link_flair_text': 'Cat Picture',\n", " 'link_flair_text_color': 'dark',\n", " 'link_flair_type': 'richtext',\n", " 'locked': False,\n", " 'media': None,\n", " 'media_embed': {},\n", " 'media_only': False,\n", " 'mod_note': None,\n", " 'mod_reason_by': None,\n", " 'mod_reason_title': None,\n", " 'mod_reports': [],\n", " 'name': 't3_u1ywhc',\n", " 'no_follow': False,\n", " 'num_comments': 0,\n", " 'num_crossposts': 0,\n", " 'num_reports': None,\n", " 'over_18': False,\n", " 'parent_whitelist_status': 'all_ads',\n", " 'permalink': '/r/cats/comments/u1ywhc/good_girl_with_eminem_cd/',\n", " 'pinned': False,\n", " 'post_hint': 'image',\n", " 'preview': {'enabled': True,\n", " 'images': [{'id': 'AErtBAHRrcPGDFPVg1jS4KgCM-7tlAw3d3sGMhnJ3Go',\n", " 'resolutions': [{'height': 108,\n", " 'url': 'https://preview.redd.it/ffmf34t5m3t81.jpg?width=108&crop=smart&auto=webp&s=155235917a3d359a14b3f4cf282a5e0c686f7c4a',\n", " 'width': 108},\n", " {'height': 216,\n", " 'url': 'https://preview.redd.it/ffmf34t5m3t81.jpg?width=216&crop=smart&auto=webp&s=3dc5e977a143c8aa4c40d2fdf3cee8a9c3744b53',\n", " 'width': 216},\n", " {'height': 320,\n", " 'url': 'https://preview.redd.it/ffmf34t5m3t81.jpg?width=320&crop=smart&auto=webp&s=19bfe9ceec97fd2f0b0355e6b3c92f852c44bc73',\n", " 'width': 320},\n", " {'height': 640,\n", " 'url': 'https://preview.redd.it/ffmf34t5m3t81.jpg?width=640&crop=smart&auto=webp&s=133357d4c55a46b0bf050e7ac76a99dfe3ab2a42',\n", " 'width': 640},\n", " {'height': 960,\n", " 'url': 'https://preview.redd.it/ffmf34t5m3t81.jpg?width=960&crop=smart&auto=webp&s=524662f3562eca9501c7211902a3c8108097eb63',\n", " 'width': 960}],\n", " 'source': {'height': 1079,\n", " 'url': 'https://preview.redd.it/ffmf34t5m3t81.jpg?auto=webp&s=d0799b1d08bb7eea6e4ec72346b65a494b3d67f5',\n", " 'width': 1079},\n", " 'variants': {}}]},\n", " 'pwls': 6,\n", " 'quarantine': False,\n", " 'removal_reason': None,\n", " 'removed_by': None,\n", " 'removed_by_category': None,\n", " 'report_reasons': None,\n", " 'saved': False,\n", " 'score': 6,\n", " 'secure_media': None,\n", " 'secure_media_embed': {},\n", " 'selftext': '',\n", " 'selftext_html': None,\n", " 'send_replies': True,\n", " 'spoiler': False,\n", " 'stickied': False,\n", " 'subreddit': 'cats',\n", " 'subreddit_id': 't5_2qhta',\n", " 'subreddit_name_prefixed': 'r/cats',\n", " 'subreddit_subscribers': 3435246,\n", " 'subreddit_type': 'public',\n", " 'suggested_sort': None,\n", " 'thumbnail': 'https://a.thumbs.redditmedia.com/aApvyhah7R9EnSbgvo5MpBsMkutvBWyb9ozqy02QWb0.jpg',\n", " 'thumbnail_height': 140,\n", " 'thumbnail_width': 140,\n", " 'title': 'good girl with eminem cd',\n", " 'top_awarded_type': None,\n", " 'total_awards_received': 0,\n", " 'treatment_tags': [],\n", " 'ups': 6,\n", " 'upvote_ratio': 1.0,\n", " 'url': 'https://i.redd.it/ffmf34t5m3t81.jpg',\n", " 'url_overridden_by_dest': 'https://i.redd.it/ffmf34t5m3t81.jpg',\n", " 'user_reports': [],\n", " 'view_count': None,\n", " 'visited': False,\n", " 'whitelist_status': 'all_ads',\n", " 'wls': 6},\n", " 'kind': 't3'},\n", " {'data': {'all_awardings': [],\n", " 'allow_live_comments': False,\n", " 'approved_at_utc': None,\n", " 'approved_by': None,\n", " 'archived': False,\n", " 'author': 'plattark',\n", " 'author_flair_background_color': None,\n", " 'author_flair_css_class': None,\n", " 'author_flair_richtext': [],\n", " 'author_flair_template_id': None,\n", " 'author_flair_text': None,\n", " 'author_flair_text_color': None,\n", " 'author_flair_type': 'text',\n", " 'author_fullname': 't2_3e5v8zw9',\n", " 'author_is_blocked': False,\n", " 'author_patreon_flair': False,\n", " 'author_premium': False,\n", " 'awarders': [],\n", " 'banned_at_utc': None,\n", " 'banned_by': None,\n", " 'can_gild': False,\n", " 'can_mod_post': False,\n", " 'category': None,\n", " 'clicked': False,\n", " 'content_categories': None,\n", " 'contest_mode': False,\n", " 'created': 1649769469.0,\n", " 'created_utc': 1649769469.0,\n", " 'discussion_type': None,\n", " 'distinguished': None,\n", " 'domain': 'i.redd.it',\n", " 'downs': 0,\n", " 'edited': False,\n", " 'gilded': 0,\n", " 'gildings': {},\n", " 'hidden': False,\n", " 'hide_score': True,\n", " 'id': 'u1ywd1',\n", " 'is_created_from_ads_ui': False,\n", " 'is_crosspostable': False,\n", " 'is_meta': False,\n", " 'is_original_content': False,\n", " 'is_reddit_media_domain': True,\n", " 'is_robot_indexable': True,\n", " 'is_self': False,\n", " 'is_video': False,\n", " 'likes': None,\n", " 'link_flair_background_color': '',\n", " 'link_flair_css_class': 'default',\n", " 'link_flair_richtext': [{'e': 'text',\n", " 't': 'Cat Picture'}],\n", " 'link_flair_text': 'Cat Picture',\n", " 'link_flair_text_color': 'dark',\n", " 'link_flair_type': 'richtext',\n", " 'locked': False,\n", " 'media': None,\n", " 'media_embed': {},\n", " 'media_only': False,\n", " 'mod_note': None,\n", " 'mod_reason_by': None,\n", " 'mod_reason_title': None,\n", " 'mod_reports': [],\n", " 'name': 't3_u1ywd1',\n", " 'no_follow': False,\n", " 'num_comments': 0,\n", " 'num_crossposts': 0,\n", " 'num_reports': None,\n", " 'over_18': False,\n", " 'parent_whitelist_status': 'all_ads',\n", " 'permalink': '/r/cats/comments/u1ywd1/sleep_after_dinner/',\n", " 'pinned': False,\n", " 'post_hint': 'image',\n", " 'preview': {'enabled': True,\n", " 'images': [{'id': 'a6eEAyNFUqpYRj6rnM-H59q3klN0vIg1aLy4GsyDqPw',\n", " 'resolutions': [{'height': 81,\n", " 'url': 'https://preview.redd.it/zdb7uvm4m3t81.jpg?width=108&crop=smart&auto=webp&s=abc77ce4c2099dca8492b7df5fd4839a0b0988e0',\n", " 'width': 108},\n", " {'height': 162,\n", " 'url': 'https://preview.redd.it/zdb7uvm4m3t81.jpg?width=216&crop=smart&auto=webp&s=c551ded59d5505dc3ee475c1ea057fb1b402dee6',\n", " 'width': 216},\n", " {'height': 240,\n", " 'url': 'https://preview.redd.it/zdb7uvm4m3t81.jpg?width=320&crop=smart&auto=webp&s=25f67d04e760c4a6cde8f6a66479093453555e18',\n", " 'width': 320},\n", " {'height': 480,\n", " 'url': 'https://preview.redd.it/zdb7uvm4m3t81.jpg?width=640&crop=smart&auto=webp&s=a4159f3d272a7b744c4a3bc7c413c5b33084f43c',\n", " 'width': 640},\n", " {'height': 720,\n", " 'url': 'https://preview.redd.it/zdb7uvm4m3t81.jpg?width=960&crop=smart&auto=webp&s=363c1d212b3fbe3dbeea9a7e6ba80cc7bf30e2ea',\n", " 'width': 960},\n", " {'height': 810,\n", " 'url': 'https://preview.redd.it/zdb7uvm4m3t81.jpg?width=1080&crop=smart&auto=webp&s=26f2ed59c03ab8fb2a5156c1a18d5b0f7e673d81',\n", " 'width': 1080}],\n", " 'source': {'height': 960,\n", " 'url': 'https://preview.redd.it/zdb7uvm4m3t81.jpg?auto=webp&s=71e18328d634c761a988b3f0045e2f98c91292fb',\n", " 'width': 1280},\n", " 'variants': {}}]},\n", " 'pwls': 6,\n", " 'quarantine': False,\n", " 'removal_reason': None,\n", " 'removed_by': None,\n", " 'removed_by_category': None,\n", " 'report_reasons': None,\n", " 'saved': False,\n", " 'score': 5,\n", " 'secure_media': None,\n", " 'secure_media_embed': {},\n", " 'selftext': '',\n", " 'selftext_html': None,\n", " 'send_replies': True,\n", " 'spoiler': False,\n", " 'stickied': False,\n", " 'subreddit': 'cats',\n", " 'subreddit_id': 't5_2qhta',\n", " 'subreddit_name_prefixed': 'r/cats',\n", " 'subreddit_subscribers': 3435246,\n", " 'subreddit_type': 'public',\n", " 'suggested_sort': None,\n", " 'thumbnail': 'https://a.thumbs.redditmedia.com/Bey3Zp201bH0wIyLY8LX2YGZAD16kqPm-Rwb1brI_I8.jpg',\n", " 'thumbnail_height': 105,\n", " 'thumbnail_width': 140,\n", " 'title': 'Sleep after dinner',\n", " 'top_awarded_type': None,\n", " 'total_awards_received': 0,\n", " 'treatment_tags': [],\n", " 'ups': 5,\n", " 'upvote_ratio': 1.0,\n", " 'url': 'https://i.redd.it/zdb7uvm4m3t81.jpg',\n", " 'url_overridden_by_dest': 'https://i.redd.it/zdb7uvm4m3t81.jpg',\n", " 'user_reports': [],\n", " 'view_count': None,\n", " 'visited': False,\n", " 'whitelist_status': 'all_ads',\n", " 'wls': 6},\n", " 'kind': 't3'},\n", " {'data': {'all_awardings': [],\n", " 'allow_live_comments': False,\n", " 'approved_at_utc': None,\n", " 'approved_by': None,\n", " 'archived': False,\n", " 'author': 'SergeBaldini1980',\n", " 'author_flair_background_color': None,\n", " 'author_flair_css_class': None,\n", " 'author_flair_richtext': [],\n", " 'author_flair_template_id': None,\n", " 'author_flair_text': None,\n", " 'author_flair_text_color': None,\n", " 'author_flair_type': 'text',\n", " 'author_fullname': 't2_k56kn4v',\n", " 'author_is_blocked': False,\n", " 'author_patreon_flair': False,\n", " 'author_premium': False,\n", " 'awarders': [],\n", " 'banned_at_utc': None,\n", " 'banned_by': None,\n", " 'can_gild': False,\n", " 'can_mod_post': False,\n", " 'category': None,\n", " 'clicked': False,\n", " 'content_categories': None,\n", " 'contest_mode': False,\n", " 'created': 1649769448.0,\n", " 'created_utc': 1649769448.0,\n", " 'discussion_type': None,\n", " 'distinguished': None,\n", " 'domain': 'i.redd.it',\n", " 'downs': 0,\n", " 'edited': False,\n", " 'gilded': 0,\n", " 'gildings': {},\n", " 'hidden': False,\n", " 'hide_score': True,\n", " 'id': 'u1yw4m',\n", " 'is_created_from_ads_ui': False,\n", " 'is_crosspostable': False,\n", " 'is_meta': False,\n", " 'is_original_content': False,\n", " 'is_reddit_media_domain': True,\n", " 'is_robot_indexable': True,\n", " 'is_self': False,\n", " 'is_video': False,\n", " 'likes': None,\n", " 'link_flair_background_color': '',\n", " 'link_flair_css_class': '',\n", " 'link_flair_richtext': [{'e': 'text',\n", " 't': 'Cat Picture'}],\n", " 'link_flair_template_id': '9b021bc6-b875-11ec-aa94-8e28dbb24a96',\n", " 'link_flair_text': 'Cat Picture',\n", " 'link_flair_text_color': 'dark',\n", " 'link_flair_type': 'richtext',\n", " 'locked': False,\n", " 'media': None,\n", " 'media_embed': {},\n", " 'media_only': False,\n", " 'mod_note': None,\n", " 'mod_reason_by': None,\n", " 'mod_reason_title': None,\n", " 'mod_reports': [],\n", " 'name': 't3_u1yw4m',\n", " 'no_follow': False,\n", " 'num_comments': 0,\n", " 'num_crossposts': 0,\n", " 'num_reports': None,\n", " 'over_18': False,\n", " 'parent_whitelist_status': 'all_ads',\n", " 'permalink': '/r/cats/comments/u1yw4m/we_are_not_amused/',\n", " 'pinned': False,\n", " 'post_hint': 'image',\n", " 'preview': {'enabled': True,\n", " 'images': [{'id': '9ugMF9gB4iGl7Ugm1wShPqHsV0FpRkCbpakNOLvIBIY',\n", " 'resolutions': [{'height': 144,\n", " 'url': 'https://preview.redd.it/4111w2u1m3t81.jpg?width=108&crop=smart&auto=webp&s=d449aebe95d0a900673c64eb380a09668004f97a',\n", " 'width': 108},\n", " {'height': 288,\n", " 'url': 'https://preview.redd.it/4111w2u1m3t81.jpg?width=216&crop=smart&auto=webp&s=94b56dbad824e0d4665682e2e917a2ff65505fc5',\n", " 'width': 216},\n", " {'height': 426,\n", " 'url': 'https://preview.redd.it/4111w2u1m3t81.jpg?width=320&crop=smart&auto=webp&s=96373054991dbb0b724b2029901bdfbdc26475aa',\n", " 'width': 320},\n", " {'height': 853,\n", " 'url': 'https://preview.redd.it/4111w2u1m3t81.jpg?width=640&crop=smart&auto=webp&s=a0ef9e3ff4aee59956730b2aa98e5640a4dfac0f',\n", " 'width': 640},\n", " {'height': 1280,\n", " 'url': 'https://preview.redd.it/4111w2u1m3t81.jpg?width=960&crop=smart&auto=webp&s=928e43b380c4984cc2a5d50852678817200f1dfd',\n", " 'width': 960},\n", " {'height': 1440,\n", " 'url': 'https://preview.redd.it/4111w2u1m3t81.jpg?width=1080&crop=smart&auto=webp&s=7f47f8daf4200ca89a98ab8c33d3f33fc9869b76',\n", " 'width': 1080}],\n", " 'source': {'height': 4032,\n", " 'url': 'https://preview.redd.it/4111w2u1m3t81.jpg?auto=webp&s=fa82148b19f362589d547e78803a9e2eeafbf5b6',\n", " 'width': 3024},\n", " 'variants': {}}]},\n", " 'pwls': 6,\n", " 'quarantine': False,\n", " 'removal_reason': None,\n", " 'removed_by': None,\n", " 'removed_by_category': None,\n", " 'report_reasons': None,\n", " 'saved': False,\n", " 'score': 8,\n", " 'secure_media': None,\n", " 'secure_media_embed': {},\n", " 'selftext': '',\n", " 'selftext_html': None,\n", " 'send_replies': False,\n", " 'spoiler': False,\n", " 'stickied': False,\n", " 'subreddit': 'cats',\n", " 'subreddit_id': 't5_2qhta',\n", " 'subreddit_name_prefixed': 'r/cats',\n", " 'subreddit_subscribers': 3435246,\n", " 'subreddit_type': 'public',\n", " 'suggested_sort': None,\n", " 'thumbnail': 'https://b.thumbs.redditmedia.com/TtWSIKXBLEGPxFJpodttlfXs_nM2HjHI0eCEXuVr55A.jpg',\n", " 'thumbnail_height': 140,\n", " 'thumbnail_width': 140,\n", " 'title': '“We are not amused.”',\n", " 'top_awarded_type': None,\n", " 'total_awards_received': 0,\n", " 'treatment_tags': [],\n", " 'ups': 8,\n", " 'upvote_ratio': 1.0,\n", " 'url': 'https://i.redd.it/4111w2u1m3t81.jpg',\n", " 'url_overridden_by_dest': 'https://i.redd.it/4111w2u1m3t81.jpg',\n", " 'user_reports': [],\n", " 'view_count': None,\n", " 'visited': False,\n", " 'whitelist_status': 'all_ads',\n", " 'wls': 6},\n", " 'kind': 't3'}],\n", " 'dist': 10,\n", " 'geo_filter': '',\n", " 'modhash': ''},\n", " 'kind': 'Listing'}\n" ] } ], "source": [ "import requests\n", "import json\n", "\n", "# here's we're hitting the 'new' endpoint, see: https://www.reddit.com/dev/api/#GET_new\n", "my_headers = {'User-agent': 'a cat bot API call demonstration for NEU DS2000'}\n", "\n", "# Make the request. BTW, the result you get is likely to change every few minutes.\n", "# Cat's are really really popular on reddit!\n", "\n", "response = requests.get('https://www.reddit.com/r/cats/new.json?limit=10', headers=my_headers)\n", "print(response)\n", "\n", "import pprint\n", "cats = response.json()\n", "pp.PrettyPrinter().pprint(cats)\n" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "10" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# How many items did we receive?\n", "# We asked for at most 10.\n", "len(cats['data']['children'])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "So these are the top 10 posts. Let's look at the first." ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "URL: https://i.redd.it/3ttuw2rsn3t81.jpg\n", "CAPTION: This is the first photograph I clicked using my new phone and just used a B/W filter!!\n" ] } ], "source": [ "first_post = cats['data']['children'][0]\n", "print(\"URL:\",first_post['data']['url'])\n", "print(\"CAPTION:\",first_post['data']['title'])\n" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Let's see some cats!\n", "\n", "from IPython.display import Image\n", "Image(url= first_post['data']['url'])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.9" } }, "nbformat": 4, "nbformat_minor": 2 }