(self, userdata, media_post, top_post)
| 165 | print("error::Monitering.insertFunction>>", sys.exc_info()[1]) |
| 166 | |
| 167 | def _lastProcess(self, userdata, media_post, top_post): |
| 168 | mainlist = [] |
| 169 | try: |
| 170 | for i in userdata: |
| 171 | for j in media_post: |
| 172 | if i["code"] == j["code"]: |
| 173 | tempdict = j.copy() |
| 174 | tofind = ["owner", "location"] |
| 175 | for z in tofind: |
| 176 | try: |
| 177 | tempdict[z + "data"] = i["data"][z] |
| 178 | except Exception as e: |
| 179 | print(f"exception : {e}") |
| 180 | pass |
| 181 | mainlist.append(tempdict) |
| 182 | self._insertFunction(tempdict.copy()) |
| 183 | for k in top_post: |
| 184 | if i["code"] == k["code"]: |
| 185 | tempdict = k.copy() |
| 186 | tofind = ["owner", "location"] |
| 187 | for z in tofind: |
| 188 | try: |
| 189 | tempdict[z + "data"] = i["data"][z] |
| 190 | except Exception as err: |
| 191 | print(f"Exception :{err}") |
| 192 | pass |
| 193 | mainlist.append(tempdict) |
| 194 | self._insertFunction(tempdict.copy()) |
| 195 | except Exception as err: |
| 196 | print(f"Exception : {err}") |
| 197 | print("error::lastProcess>>", sys.exc_info()[1]) |
| 198 | |
| 199 | def request_data_from_instagram(self): |
| 200 | try: |
no test coverage detected