From e5de1f72ee74c8320e22c5cf1b143fa6d06c5215 Mon Sep 17 00:00:00 2001 From: Logan Williams Date: Wed, 27 Jul 2022 14:31:09 +0200 Subject: [PATCH] Update README.md --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4be6301..8a43b6e 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ This Python application requires `requests`, `numpy`, and `pandas` to be properl The following command will search for Instagram locations nearby the coordinates 32.22 N, 110.97 W (downtown Tucson, Arizona.) The list of locations is saved as a CSV file at "locs.csv". -```python3 instagram-locations.py --session "" --lat 32.22 --lng -110.97 --csv locs.csv``` +```python3 instagram-locations.py --cookie "" --lat 32.22 --lng -110.97 --csv locs.csv``` -Note that this requires an Instagram session ID in order to work! See below for how to obtain one from your account. +Note that this requires Instagram cookies in order to work! See below for how to obtain one from your account. ## Example usage with date @@ -18,7 +18,7 @@ The following command will search for Instagram locations near Seattle's "Capito protests in early June, 2020. Not all location pages in the area will have posts relevant to the Zone, but some do. Open the resulting `map.html` file in your browser to view locations. -```python3 instagram-locations.py --session "" --lat 47.6164311 --lng -122.3203952 --map map.html --date 2020-06-09``` +```python3 instagram-locations.py --cookie "" --lat 47.6164311 --lng -122.3203952 --map map.html --date 2020-06-09``` When using the `--date` argument, links to Instagram location pages will be filtered to show posts created on this date or earlier. Instagram will usually first show a 3x3 grid of "Top Images and Videos" that are more recent, however once you scroll past that @@ -43,7 +43,7 @@ Using the `--map ` command line argument, a simple Leaflet map Multiple types of output can be generated. For example, the following command will search for Instagram locations, save the JSON list, a CSV file, and a map for viewing the locations visually. -```python3 instagram-locations.py --session "" --lat 32.22 --lng -110.97 --json locs.json --csv locs.csv --map map.html``` +```python3 instagram-locations.py --cookie "" --lat 32.22 --lng -110.97 --json locs.json --csv locs.csv --map map.html``` ## Sample Usage with `instagram-scraper` The ID list generated with the `--ids` flag can be passed into `instagram-scraper` to pull down image metadata. @@ -53,7 +53,7 @@ The ID list generated with the `--ids` flag can be passed into `instagram-scrape First, get the proximal location IDs of your target location: ```sh -python3 instagram-locations.py --session "" --lat --lng --ids location_ids.txt +python3 instagram-locations.py --cookies "" --lat --lng --ids location_ids.txt ``` Be sure to install `instagram-scraper`: @@ -72,7 +72,9 @@ Now use `instagram-scraper` to pull down all the photos at those locations: instagram-scraper @creds.txt --filename @location_ids.txt --location --include-location --destination ``` -## Getting an Instagram session ID +## Getting Instagram cookies + +This now requires the entire cookie string, in the format of an HTTP request header. Details TK. __Important: an Instagram session ID should be treated like a password — it provides full access to the Instagram account. Using this session ID in multiple places or on multiple computers may trigger Instagram to invalidate all session IDs. Using this session ID for any purpose other than the official Instagram website or application may be a violation of the Instagram Terms of Service and could lead to account suspension.__