Insta-scrape

Latest version: v1.7.1

Safety actively analyzes 681775 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.7.1

Deprecated data point

Removed `business_email` as an available data point from `instascrape.scrapers.Profile` scraper. Instagram seems to have removed the ability to view business email's from the web version of the platform and all values were being returned as `nan`. This will be explored further in the future but for now it is being removed.

1.7.0

Deprecations

Officially removed deprecated methods from all scrapers as listed below

All scrapers
- `load` instance method

instascrape.scrapers.Hashtag
- `from_profile` class method

instascrape.scrapers.Post
- `from_shortcode` class method

instascrape.scrapers.Profile
- `from_username` class method

The functionality for all of these methods is covered by the `scrape` instance method and are thus redundant and less powerful.

Documentation
- Removed misleading documentation for outdated scrapers. Improved existing scrapers
- Added and improved type hints

1.6.1

Docs

Added type hints for better documentation

1.6.0

New feature

Added `instascrape.scrapers.IGTV` for scraping IGTV posts. `instascrape.scrapers.IGTV` is a subclass of `instascrape.scrapers.Post` and thus inherited all of its methods and behaviors

Sample usage:

python
from instascrape import IGTV
google_igtv = IGTV('https://www.instagram.com/tv/CIrIIMYl8VQ/')
google_igtv.scrape()

1.5.0

New feature

Introduced the `Reel` scraper for scraping Instagram reels. `Reel` is a subclass of `Post` so pretty much everything you expect from `Post` is available in `Reel` as well.

Sample usage:
from instascrape import Reel
sample_reel = Reel("https://www.instagram.com/reel/CIrJSrFFHM_/")
sample_reel.scrape()

Bug fixes

json_from_url

Added optional/default request headers argument to `instascrape.scrapers.json_from_url`

unit tests

Fixed some of the broken unit tests. The library was fine but some of the tests were a little outdated and needed what appears to be required browser headers now to run properly.

1.4.0

New features

Location scraper
Ability to scrape Instagram Location pages.

Sample usage
python
from instascrape import Location
url = "https://www.instagram.com/explore/locations/212988663/new-york-new-york/"
new_york = Location(url)
new_york.scrape()
print(f"{new_york.amount_of_posts:,} people have been to New York"
>>> 61,202,403 people have been to New York


Optional header for requests
Now supports passing an optional browser header to the `scrape` method of all scraper objects. Syntax is exactly the same as a header `dict` you would pass to `requests.get`.

The default header is
python
headers={"User-Agent": "user-agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Mobile Safari/537.36 Edg/87.0.664.57"}


Sample usage is
python
from instascrape import Profile
headers={"User-Agent": "user-agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Mobile Safari/537.36 Edg/87.0.664.57"}
google = Profile("google")
google.scrape(headers=headers)


Fixes

It appears Instagram tightened restrictions overnight, all GET requests from the library were being returned 429 HTTP response status codes (Too Many Requests). Prior to now, `instascrape` did not pass or have any support for passing browser headers. This newest default and option to pass in headers seems to have returned library functioning for now. Keep an eye out for more robust session handling and better cookie support in later updates

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.