MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

insta_monitering/insta_datafetcher.py:106–117  ·  view source on GitHub ↗
(self, user, tags, type, productId)

Source from the content-addressed store, hash-verified

104
105class MoniteringClass:
106 def __init__(self, user, tags, type, productId):
107 try:
108 self.mon = pymongo.MongoClient(host=config.host, port=config.mongoPort)
109 db = self.mon[productId + ":" + user + ":insta"]
110 self._collection = db[tags]
111 if type == "hashtags":
112 self._url = "https://www.instagram.com/explore/tags/" + tags + "/?__a=1"
113 if type == "profile":
114 self._url = "https://www.instagram.com/" + tags + "/?__a=1"
115 except Exception as err:
116 print(f"exception {err}")
117 print("error::MointeringClass.__init__>>", sys.exc_info()[1])
118
119 def _dataProcessing(self, data):
120 loop = asyncio.get_event_loop()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected