privateone commited on
Commit
018d7ce
·
verified ·
1 Parent(s): 20f291e

Update FileStream/bot/plugins/FileHandlers/callback.py

Browse files
FileStream/bot/plugins/FileHandlers/callback.py CHANGED
@@ -1,7 +1,10 @@
 
 
1
  import math
2
  import json
3
  import asyncio
4
  import datetime
 
5
 
6
  from pyrogram import filters, Client, raw, types,enums
7
  from pyrogram.errors import FloodWait
@@ -126,9 +129,11 @@ async def cb_data(bot: Client, update: CallbackQuery):
126
  #print(f"ANY SEARCH :{title} YEAR :{year} IMDB Response :{res}")
127
  #print("TMDB",search_tmdb_any(title, year))
128
  #print(f"IMDB ID :{get_imdb_id['results'][0]['id']}")
129
- print(f"\n** GET_ID {get_imdb_id}")
 
130
  res=json.loads(imdb.get_by_id(get_imdb_id['results'][0]['id']))
131
- print(f"\n** IMDB Response :{res}")
 
132
  instruction = {
133
  "privacy_type": "PUBLIC",
134
  "user_id": user_id,
@@ -226,6 +231,10 @@ async def cb_data(bot: Client, update: CallbackQuery):
226
  disable_web_page_preview=True,
227
  parse_mode=ParseMode.MARKDOWN)
228
  except Exception as e:
 
 
 
 
229
  print(f"An error occurred: at Temp Upload {str(e)}")
230
  await FileStream.send_message(
231
  chat_id=Telegram.ULOG_GROUP,
 
1
+ import os
2
+ import sys
3
  import math
4
  import json
5
  import asyncio
6
  import datetime
7
+ from pprint import pprint
8
 
9
  from pyrogram import filters, Client, raw, types,enums
10
  from pyrogram.errors import FloodWait
 
129
  #print(f"ANY SEARCH :{title} YEAR :{year} IMDB Response :{res}")
130
  #print("TMDB",search_tmdb_any(title, year))
131
  #print(f"IMDB ID :{get_imdb_id['results'][0]['id']}")
132
+ print(f"\n** GET_ID :")
133
+ pprint(get_imdb_id)
134
  res=json.loads(imdb.get_by_id(get_imdb_id['results'][0]['id']))
135
+ print(f"\n** IMDB Response :")
136
+ pprint(res)
137
  instruction = {
138
  "privacy_type": "PUBLIC",
139
  "user_id": user_id,
 
231
  disable_web_page_preview=True,
232
  parse_mode=ParseMode.MARKDOWN)
233
  except Exception as e:
234
+ exc_type, exc_obj, exc_tb = sys.exc_info()
235
+ fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
236
+ print(exc_type, fname, exc_tb.tb_lineno)
237
+
238
  print(f"An error occurred: at Temp Upload {str(e)}")
239
  await FileStream.send_message(
240
  chat_id=Telegram.ULOG_GROUP,