Skip to content

Instantly share code, notes, and snippets.

View uluQulu's full-sized avatar
🚙
Coding ...

Şəhriyar Cəfər Qulu uluQulu

🚙
Coding ...
  • Azərbaycan
View GitHub Profile
@uluQulu
uluQulu / get_active_users.py
Created February 14, 2018 19:41
Get all of the active users by scrolling to the bottom
def get_active_users(browser, username, posts, logger):
"""Returns a list with users who liked the latest posts"""
browser.get('https://www.instagram.com/' + username)
sleep(2)
total_posts = formatNumber(browser.find_element_by_xpath(
"//span[contains(@class,'_t98z6')]//span").text)
# if posts > total user posts, assume total posts
@uluQulu
uluQulu / get_links.py
Last active February 18, 2018 16:04
Standalone link grabber
@uluQulu
uluQulu / follow_by_tags.py
Last active February 20, 2018 01:26
sleep delay added to follow_by_tags() method
def follow_by_tags(self,
tags=None,
amount=50,
media=None,
skip_top_posts=True,
use_smart_hashtags=False):
if self.aborting:
return self
inap_img = 0
@uluQulu
uluQulu / instapy_time_break.py
Created February 20, 2018 09:39
instapy for cormo
"""OS Modules environ method to get the setup vars from the Environment"""
import csv
import json
import logging
from math import ceil
import os
from datetime import datetime
from sys import maxsize
import random
@uluQulu
uluQulu / print_log_writer.py
Created February 20, 2018 13:54
`entry_data` handling for kevin
"""Module only used to log the number of followers to a file"""
from datetime import datetime
from selenium.common.exceptions import WebDriverException
def log_follower_num(browser, username, logfolder):
"""Prints and logs the current number of followers to
a seperate file"""
browser.get('https://www.instagram.com/' + username)
@uluQulu
uluQulu / like_util.py
Created February 27, 2018 01:04
like util for stainless steel xD
import re
import random
"""Module that handles the like features"""
from math import ceil
from re import findall
from selenium.webdriver.common.keys import Keys
from .time_util import sleep
from .util import update_activity
@uluQulu
uluQulu / comment_engine.py
Created March 27, 2018 11:27
Comment problem with updating reactJS
from random import choice
from .time_util import sleep
from .util import update_activity
from .util import add_user_to_blacklist
from selenium.common.exceptions import WebDriverException
import emoji
from selenium.webdriver.common.keys import Keys
def get_comment_input(browser):
@uluQulu
uluQulu / get_links_for_location.py
Last active April 11, 2018 02:01
location link grabber function for @dimahadghi
@uluQulu
uluQulu / get_active_users.py
Created April 11, 2018 15:02
enhanced function of getting active users from the latest n posts for @ortetgafernando
def get_active_users(browser, username, posts, boundary, logger):
"""Returns a list with usernames who liked the latest n posts"""
browser.get('https://www.instagram.com/' + username)
sleep(2)
total_posts = format_number(browser.find_element_by_xpath(
"//span[contains(@class,'_t98z6')]//span").text)
# if posts > total user posts, assume total posts
@uluQulu
uluQulu / directors_list.py
Last active April 16, 2018 00:26
code for @belac_
# Build a dictionary containing the specified movie collection
movie_dict = {
'2005' : [('Munich', 'Steven Speilberg')],
'2006' : [('The Prestige', 'Christopher Nolan'), ('The Departed', 'Martin Scorsese')],
'2007' : [('Into the Wild', 'Sean Penn')],
'2008' : [('The Dark Knight', 'Christopher Nolan')],
'2009' : [('Mary and Max', 'Adam Elliot')],
'2010' : [('The King\'s Speech', 'Tom Hooper')],
'2011' : [('The Artist', 'Michel Hazanavicius'), ('The Help', 'Tate Taylor')],
'2012' : [('Argo', 'Ben Affleck')],