How to write in script on instagram


How to Change Fonts on Instagram

Have you noticed how more and more Instagram accounts use different fonts on their bio and posts? Are you wondering how they do it, and how you could change fonts on Instagram too?

In this article, we’ll show you how fonts work on Instagram and what options you have if you want to change them on your Instagram bio, posts, or profile.

But let’s get something out of the way first.

Why Should You Change Font on Instagram?

Well, there are three reasons:

#1. To Stand Out

Instagram is one of the most creative social media platforms. Many designers, creators, artists use it to showcase their work. Similarly, many brands are also competing for attention by highlighting their creativity.

And that means that the level of competition in terms of creativity is incredibly high. 

Using custom fonts is one way to make your Instagram presence different from the others and stand out. 

#2. To Showcase Your Creativity

Instagram is all about experimenting with your content, isn’t it?

The social media platform offers so many ways to do that, after all.

Changing text fonts is another way by which you can showcase your creativity.

#3. To Bank on the Latest Trends

Another incredible thing about Instagram is the speed at which new trends emerge on the platform. And, let’s face it, they will affect what you do on the platform as well. 

Just imagine sticking to a trend for way too long. Eventually, your followers will see your profile as outdated and falling behind the pack.

Using custom fonts on Instagram is currently trending among influencers and brands. This means that it is time to give it a try. 

With that off the way, let’s cover how you can change fonts on Instagram. 

How to Change Fonts on Instagram

The process is quite simple. To change fonts, you need to use an Instagram Font Generator.

Using Instagram Font Generators

Font generators, as the name might suggest, aim to simplify the process of changing fonts. But those tools also help you explore all the different options before picking the right font for your brand, giving you the freedom to choose insta fonts you’d like. 

There are four main Instagram font generators that you could use:

IGFonts.io – This is a very simple tool that helps you pick the best font for you. All you have to do is type the text and explore all the available fonts. 

The tool’s interface includes only a text field where you can type your Instagram content to style. Once you’ve done that, the tool will generate fonts to output your copy, allowing you to choose the one you like. 

FontGet – Instagram Font Generator – Here is another simple option to try based on a text box and a list of all the available fonts that you can use.

However, FontGet also expands your options with emojis, cool symbols, and text faces. 

MetaTags Font Generator – If you want to preview how your new font shows up on your bio, then this tool is for you.

You can use it to preview your profile with different fonts and see how they’d work to represent your brand. 

Fonts.Social – This is a fun tool to try out new fonts while exploring their emoji recommendations that go along with your text.

How to Change Font on Your Instagram Bio

Let’s look at the step-by-step process on how to add custom fonts to your bio.

First of all, you need to use one of the Instagram font generators we’ve mentioned above.

Let’s say you decide to use the MetaTags Font Generator. Here’s the exact process to use it to change fonts on your bio: 

  1. Visit MetaTags Font Generator. 
  2. Type your text at the left of the screen
  3. Several font options will show up. Pick the one that you like. Copy the text
  4. Go to the Instagram app. Tap at your profile
  5. Click at the top of your profile at ‘Edit Profile.’
  6. Paste the text on your bio, and you’re done. 

TIP: Keep in mind the limit of 150 characters, so make sure you provide all the necessary details for your brand in this section.

How to Change Font on Your Instagram Post

Here’s how the process will look like when changing fonts on an Instagram post. 

Once again, you need to start with an Instagram font generator. We’re picking IGFonts.io this time.

So, here’s what you need to do:

  1. Visit IGFonts.io
  2. Type your text at the text box
  3. Several font options will show up right below. Pick the one that you like. Copy the text
  4. Go to the Instagram app. 
  5. Create a new Instagram post
  6. Paste the text  
  7. Share your post
  8. You’re done!

How to Change Font on Your Instagram Stories

Custom fonts can also help you decorate your Instagram Stories.

Changing fonts on your Instagram Stories can help you build your brand through everyday content. Even if you simply stay consistent with a couple of fonts that reflect your brand, it’s still a creative tactic to play around based on the different themes you are focusing on.

There are two different ways to use different fonts on your Instagram Stories:

  1. Using an Instagram font generator. The process would be similar to adding a custom font on your Instagram bio or feed post. Pick a font generator, add your text, copy-paste it on your Story, and your new font is ready.
  2. Using Instagram’s different fonts. Instagram also offers a series of fonts that you can use on your Stories.

Let’s look at the second option.

  1. Go to Instagram Stories
  2. Take a photo that you want to share
  3. Tap at the ‘Aa’ button at the top right
  4. Type the text
  5. Swipe left and right to pick the font that you want to choose
  6. Click on ‘Done’ when you’re ready.

Best Practices for Changing Your Instagram Fonts

Changing Instagram fonts is relatively easy, isn’t’ it? Unfortunately, making sure that custom fonts work for your brand and elevate your image is entirely different.

That’s why there are some things I recommend you keep in mind when changing fonts. 

#1. Don’t Change All Your Instagram Fonts

First of all, you don’t necessarily need to change all your Instagram fonts. Just because it’s fun and it can help you stand out, it doesn’t mean that you need to use them on all your posts.

In fact, it’s better to use the new fonts strategically so that they help you stand out.

There’s no need to go through the process of using an Instagram Font Generator for every single feed post. It will soon look repetitive to your followers.

It can also look like you’re overusing an Instagram trend. You don’t want your followers to think that you’re trying too hard, do you?

#2. Retain Brand Consistency

All your creative output on Instagram should align with your branding. Changing your Instagram font can be fun, but you still need to be consistent with your brand.

Make sure you stick to the fonts that reflect your brand instead of using a different one on every single post.

Pick one or two fonts that match your brand’s content and start using them more often.

#3. Consider Accessibility

Custom fonts are all based on Unicode characters. This means that they should show up on all browsers and devices using a universal code.

However, it’s not always the case. Sometimes not all characters show up, which makes your custom font illegible.

Be careful with the fonts you’re using, and make sure you test them as much as possible on different devices.

Takeaway 

Changing Instagram fonts can help you make anything you post on the social network to stand out and showcase your creativity. It is also incredibly easy to do so. All you need is an Instagram font generator, and you can start boosting the creativity of your profile bio, posts, and Stories. 

Good luck!

How to Change Fonts on Instagram (Captions + Bio)

Do you feel like your Instagram captions lack a little something these days? 🤔

Wish there was a way to quickly grab your reader’s attention OR help them skim your caption copy for the main points?

Great news – there is, and the secret is a quick Instagram font change!

Let’s take a look at how some of our favorite Instagrammers are making the most of different fonts for Instagram in their captions – and how you can put our new Instagram font changer tool to work!

What Font Does Instagram Use?

Where Do Those Cool Fonts for Instagram Come From?

How to Get Different Fonts On Instagram

How to Change Fonts on Instagram Posts

How to Change Instagram Bio Fonts

How to Get Different Fonts on Instagram Story

How to Use Instagram Font Change For Sales + Engagement

Conclusion: How to Change Instagram Font on Your Captions + Bio

FAQs: How to Change Fonts on Instagram

Pin Me For Later 📌:

What Font Does Instagram Use?

Curious what the signature Instagram text font is? This Sans Serif typeface is the immensely popular Proxima Nova, created by Mark Simonson in 2005.

If it looks familiar, it probably is. Proxima Nova is the most popular commercial font on the web and can be found on thousands of websites.

Where Do Those Cool Fonts for Instagram Come From?

If you’ve poked around at all while trying to change your font on Instagram, you’ve probably noticed there aren’t other fonts readily available on the platform. 

And if you’ve spied cursive fonts or funky bubble letters across tons of profiles, you may be already clued in that the types of Instagram fonts you can actually use are limited.

The reason for this is simply that they’re not other fonts at all. 

The stylistic letters and symbols you’re seeing in Instagram captions and bios are actually Unicode characters. 

Poke around Insert Symbols or Special Characters in a word processor doc, and chances are you’ll come across part of or all of the thousands of unique symbols in Unicode.

We won’t dive into the technical specifics here, but suffice it to say, some of these symbols (and in some cases, entire alphabets) can be used in your Instagram bio or caption for a unique look!

Some of the supported Unicode symbols that can be used for Instagram font options are:

  • 𝒽𝒶𝓃𝒹𝓌𝓇𝒾𝓉𝓉𝑒𝓃 𝒻𝑜𝓃𝓉
  • 𝔻𝕠𝕦𝕓𝕝𝕖 𝕤𝕥𝕣𝕦𝕔𝕜 𝕗𝕠𝕟𝕥
  • 𝔊𝔬𝔱𝔥𝔦𝔠 𝔣𝔬𝔫𝔱
  • 𝐓𝐢𝐦𝐞𝐬 𝐍𝐞𝐰 𝐑𝐨𝐦𝐚𝐧
  • 𝗕𝗼𝗹𝗱 𝗜𝗻𝘀𝘁𝗮𝗴𝗿𝗮𝗺 𝗳𝗼𝗻𝘁
  • Ⓑⓤⓑⓑⓛⓔ ⓛⓔⓣⓣⓔⓡⓢ
  • 🄱🄻🄾🄲🄺 🄻🄴🅃🅃🄴🅁🅂

There are also tons of ϝαɳƈყ ıŋʂɬąɠཞąɱ ₣Ø₦₮ [̲̅o][̲̅p][̲̅t][̲̅i][̲̅o][̲̅n][̲̅s] if you know where to look (don’t worry -we’ll help!)

How to Get Different Fonts On Instagram 

You can use these different fonts on Instagram in a few different places, including in your Instagram captions, your Instagram bio and in your Instagram Stories!

We’ll walk you through how to change each below:

How to Change Fonts on Instagram Posts

You can grab any type of Instagram font you want to use in your caption from an Instagram font generator tool like LingoJam. Simply type in the phrase you want to display in a unique font and copy and paste it into our caption!

A word of caution here: a lot of fancy Instagram fonts are hard to read – especially in a long caption. 

That’s why our Tailwind caption font formatting tool gives you four style options that are the easiest to read on the platform while still making your caption uniquely yours!

Here’s how to get different fonts on Instagram with Tailwind’s Instagram planning tool:

  1. Log in to Tailwind for Instagram on your desktop 
  2. Upload your post photo, OR select an existing photo you want to edit!
  3. Begin typing your caption
  4. Select from the different fonts for Instagram in the pop-up. You can choose Serif, Cursive, Bold and Italic.

You can also combine some styles together, such as Bold + Italic, Bold + Cursive, and even Bold, Italic + Times New Roman for all kinds of fancy letters.

You’re not limited to one style for your entire caption, either! You can use any style in any part of your caption except Hashtags. Just click the different fonts you’d like to use on Instagram as you’re typing!

See? We told you it was the easiest way to change your font – no pesky generator or Instagram caption formatting web tool required.

How to Change Instagram Bio Fonts

The Instagram bio is definitely the place where unique Instagram fonts shine. If you’re wondering how to change the font in your Instagram bio, it’s really easy – especially with the feature built into Tailwind’s Instagram scheduling tool!

You’ll need to change the font on your Instagram bio via desktop. It takes just two steps:

Step One: Open Tailwind For Instagram on Desktop

To get different fonts on Instagram, you’ll need to work in an existing draft – or upload a new post to get started.

Now open your draft and type the message you want to put in your Instagram bio (in the font of your choice!)

Once you’ve formatted your new font change for Instagram bio to perfection, select the stylish text you’ve typed and hit copy (Command + C/ Control + C)!

Step Two: Open Instagram for Desktop to Update Your Bio

The secret to how to change Instagram fonts in your bio is really as simple as a quick copy and paste! Once you’re in the Instagram app for desktop, head over to your Instagram Profile >Edit Profile.

Drop your newly-minted Instagram bio font into the Bio textbox. You can do one sentence, or the whole thing!

Just remember that you’ll have to type the complete text in our caption formatting tool to paste into this section.

Once your bio is updated with new Insta fonts, click Submit and check it out!

Pro Tip: If you want to format your Instagram bio with spaces and line breaks to work on Instagram, make sure you remove any extra spaces after emojis, text symbols, and punctuation marks.

Even one extra space at the end of a line cancels out your line spacing! 😱

How to Get Different Fonts on Instagram Story

You can also use the same copy and paste trick from an Instagram font generator (or Tailwind) to add different fonts to your Instagram Stories!

Simply choose the font you want to use, copy, and paste it into your Stories.

Or, you could use the new fonts on Instagram Stories! The new font choices have been rolling out to accounts over the past year, and expand the original four font choices to nine. Check them out!

You can change your fonts by opening a Story to create, tapping the text button in the top right corner, and scrolling through the available fonts.

How to Use Instagram Font Change For Sales + Engagement

Besides being totally cool, different Instagram text fonts serve a purpose in your Instagram strategy. In fact, new Instagram font styles can help make your great Instagram captions get more sales!

Want to see how? Here’s some of our favorite uses for different Instagram fonts:

1.Tease Main Points with Different Instagram Fonts 

When users are scrolling mindlessly through Instagram, they’re less likely to stop and click on every caption to read it.

After all, they know there’s another post coming up next!

To capture attention quickly, you have to stop the scroll with an Instagram caption that stands out.

For example, Molly has placed a powerful call-to-action in eye-catching Instagram font exactly where it’ll appear in the feed (only about 35 characters appear before someone has to click read more. ). 

Bold the first line of your caption with an eye-grabbing question or statement.

Then bold select keywords throughout your copy to help skimmers get the gist quickly and decide to engage!

2.Bold Key Words That Trigger Strong Reactions

This is a handy psychological trick that plays into evoking strong emotion – all with the use of an Instagram font change! 

Try bolding or adding different fonts for Instagram to select keywords and phrases that will trigger emotion or action.

A great example is something like ⚡️FLASH SALE! ⚡️

3. Highlight Your Events with Instagram Font Changes

Anxious to get attendees to buy tickets on Instagram for your latest event or promotion?

Try bolding the most relevant information so it jumps out at casual browsers.

By bolding the who, when, and where’s, your readers are more likely to check their calendars and figure out if they can attend the event.

If they can, they’ve already achieved that “mental buy-in” they’ll need to keep reading and sign up! 

If they can’t, you’ll save yourself that disappointment that could damage your follower relationship by making them jump through hoops only to find out they can’t attend the event. 

4. Use Instagram Cursive Font In Short Captions

These fancy characters are best used sparingly. If you’ve ever seen a full paragraph of Instagram cursive font, it’s tough to read. So how do you write in cursive on Instagram in a way that won’t overwhelm your followers?

Keep it simple: Choose short but impactful sentences and phrases in your caption and change the Instagram font to cursive.

In fact, this is a great font to use for one-sentence captions or a dreamy song lyric!

5. Mix and Match Different Instagram Fonts for High Impact Captions

If you have multiple CTAs or actions your followers can take from your post, try highlighting them throughout your caption in different fonts.

For example, Download now, Click Get Tickets on my profile, or Questions? Tap the Contact Button!

Conclusion: How to Change Instagram Font on Your Captions + Bio

Before now, using different fonts for Instagram was kind of a headache. 🤕 Any time you longed to format Instagram copy with bolds, italics or that awesome fancy cursive, you’d have to use copy and paste fonts from web text generators.

While an Instagram font generator isn’t hard to use, it’s just one more step to include in your social media planning…and who needs ANOTHER step?

That’s why Tailwind’s built-in caption font formatting is such a time-saver for Instagram marketers! 🤩

With our latest feature, you can quickly customize your Instagram caption fonts. It’s officially the easiest way to change Instagram font and style – all in one screen!

And the best part is, after you’ve finished perfecting your Instagram caption (complete with your new fancy text), you can schedule your post in one click with our Instagram publishing tool.

So what are you waiting for? Get in there and start formatting. 😉

And if you’ve never used Tailwind for Instagram before, click the box below for a free trial of Tailwind for Instagram.

FAQs: How to Change Fonts on Instagram

  1. How do you change the font on your Instagram post?

    Changing the font you write with on Instagram isn’t possible within Instagram’s platform itself. However, it is possible to make the font look different by using Unicode symbols. It is easiest to do so by using a Unicode symbol tool like Tailwind’s Instagram scheduling tool. This saves you the time of tediously searching through Unicode symbols.

    There are thousands of different Unicode symbols, and many of them look very similar to English letters with different styles. By writing with these different characters, you can effectively change the font of your image descriptions, comments, and profile. It's possible to use a number of styles with these symbols, too.

  2. How do you change the font on an Instagram bio?

    An Instagram bio font can be changed in the same way as a post. If you are using the Tailwind Instagram scheduling tool, 
    1. Login to the app on your desktop computer.
    2. Begin writing a new post. Don’t publish it! 
    3. As you type your comment, select the text you want to change. 
    4. Choose a new font from the pop up controls that appear. 
    5. Copy and paste the text into your bio to use it! 
    This will allow you to change the font of your profile or parts of your profile to add emphasis and engage readers. 

  3. Can you bold things in Instagram captions?

    Instagram captions can be made bold using Unicode characters. With the Tailwind Instagram scheduling tool can make text appear as if it were bold with these characters. All you have to do is start typing a caption and then select the bolded style. It’s a good idea to make text like your call to action bold.

  4. Can you bold text in your Instagram bio?

    You can add bolded text to your Instagram bio by beginning to write a caption for a new post with Tailwind’s Instagram scheduling tool. By creating bold text with the tool, you can copy and paste the bolded text into your profile bio and save it. This is useful for emphasizing parts of your bio to draw a reader’s attention.

  5. How do you change the font of your Instagram profile name?

    To change your Instagram username font, you can use the Tailwind Instagram scheduling tool. Start by creating a new post. When you select some text you’ve written in the editor, you can choose a new font. You can then copy and paste this as your Instagram profile name. 

    However, it’s wise to be careful. Not all Unicode characters can be searched for with normal text. This may impact your profile’s search ranking. Some crawlers may be able to tell what alternative Unicode text says, and this can work in your favor. Most importantly, make sure that your username is easy to read. If it’s difficult to read, you may lose engagement. 

    Another important thing to remember is that special symbols created using this method may not be accessible to those who use screen readers. This text can’t be properly read out to users in most cases. 

Start a Free Trial of Tailwind for Instagram!
  • Schedule photos and videos directly to your Instagram feed with Auto Post.
  • Optimize every post for more engagement with SmartSchedule and Hashtag Finder.
  • Automatically hide your post’s hashtags in the first comment to keep your caption clean & clutter-free.
  • Make your posts more discoverable with user tagging & location tagging.
  • Analyze what's working across every post and profile with smart analytics.

No credit card required

Pin Me For Later 📌:

Writing an Instagram bot in Python

In order to reach a larger audience on Instagram, o get more likes and new followers, we turn to specialists: SocialCaptain, Kicksta, Instavast and other companies for help. They have automated tools that do all the work for you. We pay a lot of money for this - but you can get the same for free using InstaPy.

We will write a Python bot that automates your Instagram activities. As a result, you will get more likes and followers with minimal effort. In parallel, we will understand browser automation, the work of Selenium and template Page Object underlying InstaPy.

Instagram Policy

Make sure you read Instagram's Service Policy before you start.

Before we start automating anything, let's think about how a real user gets likes and follows on Instagram ?

Due to activity. A person posts, views the feed, likes and comments on other people's posts. Bots do the same but without wasting your time. You only set the selection criteria. nine0005

Bot settings are very important, because the results you get directly depend on them. It is important to select those profiles whose owners will be interested in your content. For example, if you sell women's clothing on Instagram, it would be reasonable to teach the bot to track women's accounts, as well as posts with the hashtags #beauty , #fashion , #clothing . This will increase the likelihood that your profile will be noticed by the target audience.

But how can this be done technically? The Instagram Developer API is limited and not suitable for our purposes. You should turn to browser automation. nine0005

It works very simply:

  1. You provide your credentials.
  2. Set criteria for selecting profiles and posts, as well as settings for comments.
  3. The bot opens the browser, goes to the site, logs in with your data and starts to follow the instructions received.

Let's get down to practice. First, let's write a bot that can log into your Instagram profile on its own. nine0005

For the first version of the bot, we will use Selenium, a tool that works under the hood of InstaPy, which we will move on to later.

First, install Selenium itself. Make sure you have Firefox browser and Firefox WebDriver installed on your computer. We will be working with this browser as the latest version of InstaPy does not have Chrome support.

You may also need to install geckodriver for Selenium to work.

1. Open the browser

Create a file with extension .py and paste the following code there:

instabot.py
 from time import sleep selenium import webdriver browser = webdriver. firefox() browser.get('https://www.instagram.com/') sleep(5) browser.close() 

First we import the required packages. Then the Firefox driver is initialized and the browser is launched. The bot types the address https://www.instagram.com/ in the address bar - the Instagram authorization page opens. After 5 seconds of waiting, the browser closes. Run the code and check how it works. We have just written a kind of "Hello world" in Selenium. nine0005

2. Open the authorization page

Let's add authorization. First, let's make a step-by-step algorithm of actions:

  1. Go to page https://www.instagram.com/.
  2. Click link Log in .
  3. Enter login and password.
  4. Press the button Log In ( Log In ).

Note

If https://www. instagram.com/ immediately opens an authorization page and there are no links with the text (Log in), just skip this step. nine0005

We have already completed the first point. Let's now find the authorization link on the page and click on it:

instabot.py
 from time import sleep selenium import webdriver browser = webdriver.firefox() browser.implicitly_wait(5) # set a five second delay # If Selenium can't find the element, it waits for everything to load and tries again browser.get('https://www.instagram.com/') # The following lines tell the bot to find a link with the text Log in and click on it. login_link = browser.find_element_by_xpath("//a[text()='Log in']") login_link.click() sleep(5) browser.close() nine0055 

We use XPath to find the right reference, but there are other methods.

Run the script and make sure it works. The login page should open in the browser.

3. Filling in the form

There are three important elements in the authorization form:

  • Login field;
  • Password field;
  • Button Login .

Let's find them, enter credentials and log in:

instabot.py
 from time import sleep selenium import webdriver browser = webdriver.firefox() browser.implicitly_wait(5) browser.get('https://www.instagram.com/') login_link = browser.find_element_by_xpath("//a[text()='Log in']") login_link.click() sleep(2) username_input = browser.find_element_by_css_selector("input[name='username']") password_input = browser.find_element_by_css_selector("input[name='password']") username_input.send_keys("") password_input.send_keys("") login_button = browser.find_element_by_xpath("//button[@type='submit']") login_button. click() sleep(5) browser.close() nine0055 

Set a two second delay for page loading. Find and fill in the required fields. At the end, look for and press the button to enter.

If you enter the correct data and run this script, it will automatically log into your Instagram account.

***

We're off to a great start, and if we want to, we can easily continue building the bot. Further actions are very similar to those already done: scroll down the feed, look for interesting posts according to certain criteria, look for a like button and click on it, look for a section with comments, etc.

The good news is that InstaPy can do all these steps for you. But before we start working with it, let's understand the basics - the Page Object pattern.

We have written a code for authorization - but how can we test it now? It could look something like this:

 def test_login_page(browser): browser. get('https://www.instagram.com/accounts/login/') username_input = browser.find_element_by_css_selector("input[name='username']") password_input = browser.find_element_by_css_selector("input[name='password']") username_input.send_keys("") password_input.send_keys("") login_button = browser.find_element_by_xpath("//button[@type='submit']") login_button.click() errors = browser.find_elements_by_css_selector('#error_message') assert len(errors) == 0 nine0055 

What is wrong with this code? It does not comply with the DRY principle and the ideas of clean code: the same fragments are duplicated both in the application and in the test.

In this context, code duplication is particularly bad, since Selenium depends on user interface elements, and they tend to change. If this happens, I would like to make changes only in one place, and not in a dozen. This is where the Page Object pattern comes in.

With this template you create 9 classes0123 page objects for the most important pages or page fragments that provide convenient interfaces for interaction.

We can refactor our code and create class HomePage and class LoginPage :

pages.py
 from time import sleep class LoginPage: def __init__(self, browser): self.browser = browser def login(self, username, password): username_input = self.browser.find_element_by_css_selector("input[name='username']") password_input = self.browser.find_element_by_css_selector("input[name='password']") username_input.send_keys(username) password_input.send_keys(password) login_button = browser.find_element_by_xpath("//button[@type='submit']") login_button.click() sleep(5) class HomePage: def __init__(self, browser): self. browser = browser self.browser.get('https://www.instagram.com/') def go_to_login_page(self): self.browser.find_element_by_xpath("//a[text()='Log in']").click() sleep(2) return LoginPage(self.browser) nine0055 

The logic has not changed, only now the home page and login page are represented as classes. They encapsulate all the actions required to find and process data in the user interface.

Note that when you navigate to another page using the page object method, a new page object is returned. Take a look at the return value of the go_to_log_in_page() function.

If we already had a class FeedPage , then the login() class method LoginPage would return an instance of the feed page ( return FeedPage() ).

Change the main code:

instabot. py
 from selenium import webdriver from pages import HomePage browser = webdriver.firefox() browser.implicitly_wait(5) homepage = homepage(browser) login_page = home_page.go_to_login_page() login_page.login("", "") browser.close() 

Now the program looks much simpler and clearer. Tests can also be rewritten:

 def test_login_page(browser): homepage = homepage(browser) login_page = home_page.go_to_login_page() login_page.login("", "") errors = browser.find_elements_by_css_selector('#error_message') assert len(errors) == 0 

If something changes in the interface, you won't have to change tests - and rightly so.

To learn more about the Page Object pattern, see the official documentation and Martin Fowler's article. nine0005

And we move on to creating a 2. 0 bot - using InstaPy.

First install InstaPy:

 $ python3 -m pip install instapy 

Virtual environments

It is good practice to use separate virtual environments for each project. This allows you to isolate dependencies.

Instagram authorization

Let's rewrite the code using InstaPy:

instabot2.py
 from instapy import InstaPy InstaPy(username="", password="").login() nine0055 

Substitute the correct username and password and run the script. Voila! One line of code - and the result is the same!

Actually not the same. Instapy performs many other actions: it checks the Internet connection, the status of the Instagram servers, etc. You can observe all this directly in the browser, as well as in the logs.

 INFO [2019-12-17 22:03:19] [username] -- Connection Checklist [1/3] (Internet Connection Status) INFO [2019-12-17 22:03:20] [username] - Internet Connection Status: ok INFO[2019-12-17 22:03:20] [username] - Current IP is "17.283.46.379" and it's from "Germany/DE" INFO [2019-12-17 22:03:20] [username] -- Connection Checklist [2/3] (Instagram Server Status) INFO [2019-12-17 22:03:26] [username] - Instagram WebSite Status: Currently Up 

Not bad for one line of code, right? Let's take decisive action!

Basic bot settings

Suppose your profile is dedicated to cars. You want the bot to interact with the profiles of people interested in cars. nine0005

Likes

For example, a bot can like posts with hashtags #bmw or #mercedes . This is the purpose of the like_by_tags() method :

instabot2. py
 from instapy import InstaPy session = InstaPy(username="", password="") session.login() session.like_by_tags(["bmw", "mercedes"], amount=5) # [1] 

We pass an array of tags to like and the number of posts for each tag to the method. In other words, the bot must give 10 likes - five for each of the two tags. nine0005

But look what happens in the logs after running the script:

 INFO [2019-12-17 22:15:58] [username] Tag [1/2] INFO [2019-12-17 22:15:58] [username] --> b'bmw' INFO [2019-12-17 22:16:07] [username] desired amount: 14 | top posts [disabled]: 9 | possible posts: 43726739 INFO [2019-12-17 22:16:13] [username] Like# [1/14] INFO [2019-12-17 22:16:13] [username] https://www.instagram.com/p/B6MCcGcC3tU/ INFO [2019-12-17 22:16:15] [username] Image from: b'mattyproduction' INFO[2019-12-17 22:16:15] [username] Link: b'https://www. instagram.com/p/B6MCcGcC3tU/' INFO [2019-12-17 22:16:15] [username] Description: b'Mal etwas anderes \xf0\x9f\x91\x80\xe2\x98\xba\xef\xb8\x8f Bald ist das komplette Video auf YouTube zu finden (n\xc3\xa4here Infos werden folgen). Vielen Dank an @patrick_jwki @thehuthlife und @christic_ f\xc3\xbcr das bereitstellen der Autos \xf0\x9f\x94\xa5\xf0\x9f\x98\x8d#carporn#cars#tuning#bagged#bmw#m2#m2competition# focusrs#ford#mk3#e92#m3#panasonic#cinematic#gh5s#dji#roninm#adobe#videography#music#bimmer#fordperformance#night#shooting#' INFO[2019-12-17 22:16:15] [username] Location: b'K\xc3\xb6ln, Germany' INFO [2019-12-17 22:16:51] [username] --> Image Liked! INFO [2019-12-17 22:16:56] [username] --> Not commented INFO [2019-12-17 22:16:57] [username] --> Not following INFO [2019-12-17 22:16:58] [username] Like# [2/14] INFO [2019-12-17 22:16:58] [username] https://www.instagram.com/p/B6MDK1wJ-Kb/ INFO [2019-12-17 22:17:01] [username] Image from: b'davs0' INFO [2019-12-17 22:17:01] [username] Link: b'https://www. instagram.com/p/B6MDK1wJ-Kb/' INFO[2019-12-17 22:17:01] [username] Description: b'Someone said cloud? \xf0\x9f\xa4\x94\xf0\x9f\xa4\xad\xf0\x9f\x98\x88 \xe2\x80\xa2\n\xe2\x80\xa2\n\xe2\x80\xa2\n\xe2 \x80\xa2\n#bmw #bmwrepost #bmwm4 #bmwm4gts #f82 #bmwmrepost #bmwmsport #bmwmperformance #bmwmpower #bmwm4cs #austinyellow #davs0 #mpower_official #bmw_world_ua #bimmerworld #bmwfans #bmwfamily #bimmers #bmwmwpost8 #bmwfans #bmwfamily #bimmers #bmwmwpost8 #bmwmpower #bmwm4cs #bmwmwpost8 #ultimated #m5f90 #m4f82 #bmwmafia #bmwcrew #bmwlifestyle' INFO [2019-12-17 22:17:34] [username] --> Image Liked! INFO[2019-12-17 22:17:37] [username] --> Not commented INFO [2019-12-17 22:17:38] [username] --> Not following 

By default, InstaPy will like the first nine posts in the feed, in addition to the amount parameter. In this case, the total number of likes is 14 per tag (9 + 5).

InstaPy logs every action: it mentions which post they liked, a link to it, description, location, whether they commented and followed the account.

You may have noticed that there are delays after almost every action. This is done on purpose so that Instagram does not ban your profile.

You can also specify post options that the bot should NOT like using the set_dont_like() method :

instabot2.py
 from instapy import InstaPy session = InstaPy(username="", password="") session.login() session.like_by_tags(["bmw", "mercedes"], amount=5) session.set_dont_like(["naked", "nsfw"]) nine0055 

The bot will now ignore posts that contain the words "naked" or "nsfw" (not safe/suitable for work) in their description.

Subscriptions

In addition to likes, the bot can subscribe to accounts. This is the function set_do_follow() :

instabot2.py
 from instapy import InstaPy session = InstaPy(username="", password="") session. login() session.like_by_tags(["bmw", "mercedes"], amount=5) session.set_dont_like(["naked", "nsfw"]) session.set_do_follow(True, percentage=50) nine0055 

If you run this script, the bot will subscribe to 50% of those users whose posts he likes. Again, every action will be logged.

Comments

Another InstaPy option is the ability to leave comments. To do this, you need to do two things. First enable commenting by calling set_do_comment() :

instabot2.py
 from instapy import InstaPy session = InstaPy(username="", password="") session.login() session.like_by_tags(["bmw", "mercedes"], amount=5) session.set_dont_like(["naked", "nsfw"]) session.set_do_follow(True, percentage=50) session.set_do_comment(True, percentage=50) nine0055 

Then specify what to write with set_comments() :

instabot2. py
 from instapy import InstaPy session = InstaPy(username="", password="") session.login() session.like_by_tags(["bmw", "mercedes"], amount=5) session.set_dont_like(["naked", "nsfw"]) session.set_do_follow(True, percentage=50) session.set_do_comment(True, percentage=50) session.set_comments(["Nice!", "Sweet!", "Beautiful :heart_eyes:"]) 
nine0260 Run the script and the bot will leave one of the three specified comments under half of the posts it has interacted with.

Closing the session

After you have done everything you want, you need to close the session by calling the end() method :

instabot2.py
 from instapy import InstaPy session = InstaPy(username="", password="") session.login() session.like_by_tags(["bmw", "mercedes"], amount=5) session.set_dont_like(["naked", "nsfw"]) session.set_do_follow(True, percentage=50) session. set_do_comment(True, percentage=50) session.set_comments(["Nice!", "Sweet!", "Beautiful :heart_eyes:"]) session.end() nine0055 

This command will close the browser, save the logs and prepare a report that you can see in the console.

Additional features of InstaPy

InstaPy is a large project that has many well-documented features. Let's take a look at some of the more useful ones.

Quotas

You can't scrape Instagram all day, the service will quickly notice it. Therefore, it is useful to set quotas for bot actions.

 session.set_quota_supervisor(enabled=True, peak_comments_daily=240, peak_comments_hourly=21) nine0055 

This code limits commenting limits per hour and per day. When the bot reaches them, it will stop commenting and wait for the quota period to expire.

The headless_browser argument

The argument specified in the name allows you to run the bot without a browser GUI. It is useful if you want to deploy a bot on a server where there is no or no need for an interface. Performance in this mode is higher, as there is less load on the processor.

 session = InstaPy(username='test', password='test', headless_browser=True) nine0055 

Note that the corresponding flag is set when the InstaPy object is initialized.

Artificial intelligence for message analysis

We have already learned to ignore messages that contain inappropriate words. But what if the description is normal, but the picture itself is inappropriate?

InstaPy bot can be integrated with ClarifApi, an image and video recognition tool:

 session. set_use_clarifai(enabled=True, api_key='') session.clarifai_check_img_for(['nsfw']) nine0055 

The bot will now ignore any image that ClarifApi considers NSFW. 5000 hits per month - free.

Number of followers

It often doesn't make sense to interact with accounts with a large number of followers. InstaPy gives you the option to set a bound on this amount so that the bot doesn't waste your machine's computing resources:

 session.set_relationship_bounds(enabled=True, max_followers=8500) 
nine0308 Now the bot will not interact with the posts of users who have more than 8.5 thousand subscribers.

Many other options and configurations can be found in the InstaPy documentation.

***

InstaPy is a flexible tool that allows you to easily and quickly automate user actions on Instagram. Its work is based on browser automation (Selenium) and the use of the Page Object pattern to facilitate working with web pages.

If you haven't started coding yet, read our post on how to create a virtual environment in Python. This will avoid problems with package dependencies. We also wrote about how real-time object recognition works - later on, the bot can be improved if you use your own model to analyze user photos. nine0005

You can get more useful information on our telegram channel "Pythonist's Library". We also recommend that you pay attention to the Python tutorial from the Programmer's Library.

Interesting, see the program of the course

from A to Z — instaved.ru

Promotion

Table of contents:

  • 1 What is a script?
  • 2 How are scripts used? nine0034
  • 3 Pros and cons of getting likes with scripts
  • 4 Alternative methods of promotion
  • 5 Conclusion

Many bloggers and entrepreneurs use Instagram as an advertising platform to attract the target audience. Recently, the administration of the social network has upgraded the algorithm of the news feed. Now new posts in it will be visible to a large number of users if they correspond to the interests of users. This makes many think about changing the approach to promoting their product. It's not enough to just post now. The main thing is to increase the demand for it. Instagram, of course, promises to return an updated chronological feed, but we still have to wait, but for now we are reading how to make a post popular. nine0005

One of the simplest solutions is to get likes. To do this, use scripts or services for promotion.

What is a script?

Scripts are pre-thought-out algorithms of actions (scenarios) that are aimed at solving a specific problem. Such codes are compiled using a programming language - scripting. Through the script, you can configure the automatic execution of a number of simple actions, which saves time and minimizes the likelihood of errors. Such programs are used in many fields of activity, but we will talk about their use for getting likes on Instagram. nine0005

How are scripts used?

Instagram does not stand still, developers are constantly updating protection algorithms and scam calculation for user safety. More recently, getting likes through a script based on the top was in great demand. The user was only required to send an id to the server where the top posts were stored, and likes began to arrive every second. However, now this method of promotion has become unavailable due to changes in the protection of the social network of some algorithms. But do not be upset! As soon as one script stops working, almost immediately the craftsmen create another, which appears in the public domain. nine0005

Probably everyone has heard about services where users can earn points by performing simple steps:

  • become a follower on Instagram, VK, OK, FB;
  • watch videos on YouTube;
  • Like and more.

The resulting likes or points can be spent on similar purposes. The algorithm of these actions is simple, and also available for mass understanding, but it requires free time. There is a popular script for getting likes on Instagram with the logical name “nakrutka_insta”. When launched, a black window with commands opens. You just need to paste the link with the promoted post, and in a few minutes the likes will start coming automatically. The basic version of this script is free, and the creator sells more advanced ones for money. nine0005

Pros and cons of cheating likes with scripts

Among the advantages of such a promotion are:

  • saving time;
  • high efficiency;
  • availability, ease of use.

Cons:

  • possible ban from the administration;
  • cheated subscribers are often not interested in the promoted product.

Important! To avoid blocking, limit the number of likes you get! nine0399

Alternative methods of promotion

Many popular scripts quickly break down due to mass use, so consider Instagram scrapers as alternative methods of promotion.

Explain what it is for a very long time. The main thing is that they work! The principle of operation is as follows:

  • the user needs to specify an account with a large number of subscribers;
  • the program creates a database;
  • opens user accounts; nine0034
  • signs "live" people and puts likes on their behalf automatically!

There are many such services now. There are paid and free versions. Among the most high-quality and effective are:

  1. Pamagram winds up likes and subscribers during a given period. It is convenient that by suspending the promotion, the time is frozen and promotion can be continued at a convenient time for you.
  2. Instaplus combines mass following / liking and allows you to create a target audience database using filters. nine0034
  3. Tooligram collects a database of potential subscribers on its own, based on hashtags and geolocation of the target audience.

In this way, you can both wind up subscribers and get hold of likes.


Learn more