All Projects → marcopompili → django-instagram

marcopompili / django-instagram

Licence: BSD-3-Clause License
Instagram application for Django.

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to django-instagram

Instaloctrack
An Instagram OSINT tool to collect all the geotagged locations available on an Instagram profile in order to plot them on a map, and dump them in a JSON.
Stars: ✭ 85 (+16.44%)
Mutual labels:  instagram, scraper
Instagram Crawler
Crawl instagram photos, posts and videos for download.
Stars: ✭ 178 (+143.84%)
Mutual labels:  instagram, scraper
Instagram Python Scraper
A instagram scraper wrote in python. Similar to instagram-php-scraper.Usages are in example.py. Enjoy it!
Stars: ✭ 115 (+57.53%)
Mutual labels:  instagram, scraper
Skraper
Kotlin/Java library and cli tool for scraping posts and media from various sources with neither authorization nor full page rendering (Facebook, Instagram, Twitter, Youtube, Tiktok, Telegram, Twitch, Reddit, 9GAG, Pinterest, Flickr, Tumblr, IFunny, VK, Pikabu)
Stars: ✭ 72 (-1.37%)
Mutual labels:  instagram, scraper
instagram-get-images
Instagram get images 🌄 (hashtags, account, locations) with puppeteer
Stars: ✭ 69 (-5.48%)
Mutual labels:  instagram, scraper
Instascrape
🚀 A fast and lightweight utility and Python library for downloading posts, stories, and highlights from Instagram.
Stars: ✭ 76 (+4.11%)
Mutual labels:  instagram, scraper
Instagram Scraper
scrapes medias, likes, followers, tags and all metadata. Inspired by instagram-php-scraper,bot
Stars: ✭ 2,209 (+2926.03%)
Mutual labels:  instagram, scraper
Instagram Crawler
Get Instagram posts/profile/hashtag data without using Instagram API
Stars: ✭ 643 (+780.82%)
Mutual labels:  instagram, scraper
instagram-hashtag-scraper
NodeJS application for scraping recent top posts from Instagram by hashtag without API access.
Stars: ✭ 17 (-76.71%)
Mutual labels:  instagram, scraper
Instagram Proxy Api
CORS compliant API to access Instagram's public data
Stars: ✭ 245 (+235.62%)
Mutual labels:  instagram, scraper
Scrapstagram
An Instagram Scrapper
Stars: ✭ 50 (-31.51%)
Mutual labels:  instagram, scraper
InstagramLocationScraper
No description or website provided.
Stars: ✭ 13 (-82.19%)
Mutual labels:  instagram, scraper
Social Scraper
Tổng hợp script crawl dữ liệu từ các mạng xã hội & website tiếng Việt
Stars: ✭ 47 (-35.62%)
Mutual labels:  instagram, scraper
Spam Bot 3000
Social media research and promotion, semi-autonomous CLI bot
Stars: ✭ 79 (+8.22%)
Mutual labels:  instagram, scraper
Public Instagram
Tool to fetch Instagram's public content.
Stars: ✭ 43 (-41.1%)
Mutual labels:  instagram, scraper
Onegram
This repository is no longer maintained.
Stars: ✭ 137 (+87.67%)
Mutual labels:  instagram, scraper
Instagram Scraper
Scrapes an instagram user's photos and videos
Stars: ✭ 5,664 (+7658.9%)
Mutual labels:  instagram, scraper
Instagram4j
📷 Instagram private API in Java
Stars: ✭ 629 (+761.64%)
Mutual labels:  instagram, scraper
Media Scraper
Scrapes all photos and videos in a web page / Instagram / Twitter / Tumblr / Reddit / pixiv / TikTok
Stars: ✭ 206 (+182.19%)
Mutual labels:  instagram, scraper
Instagram-to-discord
Monitor instagram user account and automatically post new images to discord channel via a webhook. Working 2022!
Stars: ✭ 113 (+54.79%)
Mutual labels:  instagram, scraper

django-instagram

⚠️ This project should be considered abandoned. To embed IG content you should go through Instagram official API.

A Django application that allows to use some template tags for displaying content from an Instagram public profile.

Requirements

Installation

Install Django with your favourite Linux packaging system or you can use pip for installing python packages, if Django is not an official package for your distribution:

pip install django

Use pip to install Django Instagram:

pip install django-instagram

Pip should take care of the package dependencies for Django Instagram.

Configuration

Add the application to INSTALLED_APPS:

INSTALLED_APPS = (
                  ...
                  'sorl.thumbnail', # required for thumbnail support
                  'django_instagram',)

Rebuild your application database, this command depends on which version of Django you are using.

In Django 2.0 (recommended):

python manage.py makemigrations django_instagram

Them migrate the db:

python manage.py migrate

Usage

The instagram_user_recent_media brings into context two objects:

  • profile: Contains the who scraped object.
  • recent_media: Contains the recent media, like 10 or 12 entries or so.

A Django urls.py example using a TemplateView View class with a context variable called instagram_profile_name:

from django.contrib import admin
from django.urls import path
from django.views.generic import TemplateView
urlpatterns = [
    path('admin/', admin.site.urls),
    path('', TemplateView.as_view(template_name='index.html', extra_context={
        "instagram_profile_name": "amd"
    })),
]

You can display the data contained in recent_media list like this:

<!DOCTYPE html>

{% load instagram_client %}

<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{ instagram_profile_name|capfirst }} Instagram feed</title>
</head>
<body>
<h1>{{ instagram_profile_name|capfirst }} Instagram Feed</h1>
<div id="django_recent_media_wall">
    {% instagram_user_recent_media instagram_profile_name %}
    {% for media in recent_media %}
        <div class="django_instagram_media_wall_item">
            <a href="//instagram.com/p/{{ media.shortcode }}" target="_blank">
                <img src="{{ media.thumbnail_src }}"/>
                <span>{{ media.edge_media_to_caption.edges.0.node.text }}</span>
            </a>
        </div>
    {% endfor %}
</div>
<p>Got from instagram</p>
</body>
</html>

There are also two inclusion tags that includes an example of how to parse data from Instagram, you can also use them like this:

{% load instagram_client %}

<h1>Instagram media wall</h1>
{% instagram_recent_media_wall username="intel" %}

<h1>Instagram sliding box</h1>
{% instagram_recent_media_box username="intel" %}

Filters

As you may have noticed some filters can be used for sizing the pictures. Make sure you have sorl.thumbnail in the INSTALLED_APPS to use these.

Here is the list of the usable fitlers:

For standard size:

{% for media in recent_media %}
...
<img src="{{ media.thumbnail_src|standard_size }}"/>
...
{% endfor %}

For low resolution images:

{% for media in recent_media %}
...
<img src="{{ media.thumbnail_src|low_resolution }}"/>
...
{% endfor %}

For thumbnail size:

{% for media in recent_media %}
...
<img src="{{ media.thumbnail_src|thumbnail }}"/>
...
{% endfor %}

Releases

  • 0.3.2 Compatibility fix for Django 3.
  • 0.3.1 Template tag accepts context variables.
  • 0.3.0 Updates to the scraping algorithm.
  • 0.2.0 New scraping algorithm, removed Python Instagram.
  • 0.1.1 Numerous bug fixes, better documentation.
  • 0.1.0 Work in progress version.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].