Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import json
|
|
4 |
|
5 |
app = Flask(__name__)
|
6 |
|
|
|
7 |
# Headers for you.com API
|
8 |
headers = {
|
9 |
"cookie": "uuid_guest=12653d55-2f42-4fbd-98bb-33edf8714123; uuid_guest_backup=12653d55-2f42-4fbd-98bb-33edf8714123; AF_DEFAULT_MEASUREMENT_STATUS=true; _ga=GA1.1.1620651973.1726065059; afUserId=26bc0a6c-f7b2-42bb-a950-16348632bbff-p; FPID=FPID2.2.rnWEp46VSGiozCeyM8uHn6Con89GxAFIKMqggZYT0wc%3D.1726065059; FPAU=1.2.1152748874.1726065189; DSR=eyJhbGciOiJSUzI1NiIsImtpZCI6IlNLMmpJbnU3SWpjMkp1eFJad1psWHBZRUpQQkFvIiwidHlwIjoiSldUIn0.eyJhbXIiOlsib2F1dGgiXSwiYXV0aDBJZCI6bnVsbCwiZHJuIjoiRFNSIiwiZW1haWwiOiJhbGhvb3JzaG9wcEBnbWFpbC5jb20iLCJleHAiOjE3NTc1MTQ3OTcsImdpdmVuTmFtZSI6IkFsaG9vciIsImlhdCI6MTcyNjA2NTE5NywiaXNzIjoiUDJqSW50dFJNdVhweVlaTWJWY3NjNEM5WjBSVCIsImxhc3ROYW1lIjoiU2hvcHAiLCJuYW1lIjoiQWxob29yIFNob3BwIiwicGljdHVyZSI6Imh0dHBzOi8vbGgzLmdvb2dsZXVzZXJjb250ZW50LmNvbS9hL0FDZzhvY0x5U3YxS3BqTEcyc1Mybjhsa3A3MGpJZGJ3VkNFMWpaM0Q5ZDhzdFI2bldvUlVvdz1zOTYtYyIsInN0eXRjaElkIjpudWxsLCJzdWIiOiJVMmx2ZXVFbTU0RmY3cDRBUXB5NU5FTURteXplIiwidGVuYW50SW52aXRhdGlvbiI6bnVsbCwidGVuYW50SW52aXRlciI6bnVsbCwidXNlcklkIjoiVTJsdmV1RW01NEZmN3A0QVFweTVORU1EbXl6ZSIsInZlcmlmaWVkRW1haWwiOnRydWV9.p5kyNNqq1ELBZ8AGhI6SsRccE_XPK04qE1DhBWI06D1MEksoETLlolHtr8yGUYABGMRtmnhGpiohkEsmaroia7ezQYe4z_vYbepnE0IsuhsH4H6BL8mBogPER6VrmeaEvgNzOGiqGNspMZkkNKPP46f5cZQfFYhPgVD2H_hhC2WlRhwzmA_KBOxSXDnHsuFYIv51aqkAyzUguL_IdG7CajMGkMBf4noTE_6IuBS18_tTUsTgcgMqecFbKfySSOSWMgLUIpZUI4_lNWP7shsvkDI7xsuATrGf7Ci08PyEo0UMmI44EduiZGuCRONuDlFrAYpkeGPZugBlr7SNaBYBVA; cf_clearance=AK7TQPxcsdpZipu2JajNb2pK1vMt8o7qG9YubF.3ltk-1727005917-1.2.1.1-6gpuUnk60M1itXRWZAf3xZyH5QaRTHSpCHXsZHx9zgSPOtJykF.1izJMMtQ69EB_0UajH5t8zW1wQO9cSvIdUv3N0IstSKJtN9OC3ijAF8EybbFNtUC.rlA2vevPjpVsR2N7NHGVuXR4OuMgZN9R3BcrhTjU3gpFJOiAZQlxImijFSA8mO7.BaxcU7X3e2w4HZB4c27lgzBM2oIBz12dMUVG0SB0_tDOHtAxpBltosI092lRuORu80C_3u6BfZZMYEjIuWKV3PqI0noMOb1jKIvUvb4jOBQ59sXqtvIgW2Xy1P6nyAmBd1enh5RXFVWTm0JQgv2TlfSoNSCIGPhu6FafbLYPxsaYrBtMEiCMlPOOoxezPuCBk0FeikQJsGu7U7r3D7GnhQZuiaHSpab3Nw; _clck=3hwjik%7C2%7Cfpe%7C0%7C1715; tdl_youpro=1020fccf1fab5bf2b1df65da9b6afb; safesearch_guest=Moderate; __cf_bm=uWp_2WLYSSHuuzntNdNUc_PmGQeJznDrQB8_2MU1x_Y-1731161652-1.0.1.1-XUzWj5B5kHJXH3x5cSEhon4sBylGd7e_3p346rNC_caRlEQYG9FEVbzJH_i5Uhv.3e0BJHVwUDB9ywcqiYG.pyQODExMNs_kTHywQFL.qdc; _cfuvid=c3P8i6gmopU4e4uMKNJmW42pnZlHaS.vtHB31WlfWrM-1731161652616-0.0.1.1-604800000; youpro_subscription=false; ab.storage.deviceId.dcee0642-d796-4a7b-9e56-a0108e133b07=g%3Abd7f481f-f2a4-2851-c570-f915decb5bd2%7Ce%3Aundefined%7Cc%3A1726065048731%7Cl%3A1731247844430; ab.storage.userId.dcee0642-d796-4a7b-9e56-a0108e133b07=g%3AU2lveuEm54Ff7p4AQpy5NEMDmyze%7Ce%3Aundefined%7Cc%3A1726065077561%7Cl%3A1731247844431; you_subscription=freemium; safesearch_b2a2fdf678a327a1f0d04c5a6944ed5165725553bb48ef436dd66c7908778261=Moderate; ld_context=%7B%22kind%22%3A%22user%22%2C%22key%22%3A%2212653d55-2f42-4fbd-98bb-33edf8714123%22%2C%22email%22%3A%22alhoorshopp%40gmail.com%22%2C%22country%22%3A%22FR%22%2C%22userAgent%22%3A%22Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F130.0.0.0%20Safari%2F537.36%22%2C%22secUserAgent%22%3A%22%5C%22Chromium%5C%22%3Bv%3D%5C%22130%5C%22%2C%20%5C%22Google%20Chrome%5C%22%3Bv%3D%5C%22130%5C%22%2C%20%5C%22Not%3FA_Brand%5C%22%3Bv%3D%5C%2299%5C%22%22%7D; youchat_personalization=true; youchat_smart_learn=true; daily_query_date=Sun%20Nov%2010%202024; _gcl_au=1.1.1532377395.1731247864; AF_SYNC=1731247870198; FPLC=Ch%2FKQHoC2NzzKJU%2Brw%2B6GvuHXQtDuIpn5jh1JqVumvhLNgkHCClz2HsmW%2FR%2BE2HwsqpKPHOdahm8NOFH4aYH0MIZF10pNLYoo9rOnKFH7o30b%2BlhBpd7ooIm300Nsw%3D%3D; _gtmeec=eyJlbSI6ImEwNDQwMmZkOTI4NGQ2NGY3NWM3ZTY5YzIxY2NmZGZjNDhhZDIzNzc5MDJiYmNlYj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EtMDhUMTQ6MjQ6NTJaIiwic3R5dGNoSWQiOm51bGwsInN1YiI6IlUybHZldUVtNTRGZjdwNEFRcHk1TkVNRG15emUiLCJ0ZW5hbnRJbnZpdGF0aW9uIjpudWxsLCJ0ZW5hbnRJbnZpdGVyIjpudWxsLCJ1c2VySWQiOiJVMmx2ZXVFbTU0RmY3cDRBUXB5NU5FTURteXplIiwidmVyaWZpZWRFbWFpbCI6dHJ1ZX0.WENvUj_r0MWLswS8blsSaB_mjGaWTSph83fYwTG6QAlGrRfnHAl6Tsbe7OVr4OmBdDWDma4kD_hfLq5dkR5YAhFeF7d1gvgD5wWjNBFFRdkUVJQwlJj9nSRnMPzteIGV0Ylp4xnAJGh_jWHieH_Jsv9Ki7TUFUUg4mMhp-CInur9eoZ6LIU0yRVR36_k-jDxz5COoe59nOAwV334DjHXGUgXmS61P0lu9d_t6sCTQIOfqzCPkNL1U2W20BfFVYX-uaYqPP8bHrKZc-gDLqzWmjar9UNF2HEHpKjciKlQpRoRVljO45c6zsQQUTmIaLkX1J6WiuWAf4sVcyJoy7VXsg; daily_query_count=10; total_query_count=10; _ga_2N7ZM9C56V=GS1.1.1731247871.3.1.1731248475.0.0.53253675; ab.storage.sessionId.dcee0642-d796-4a7b-9e56-a0108e133b07=g%3A8d743f0e-6468-492d-af13-cc8c6c73d54e%7Ce%3A1731250275904%7Cc%3A1731247844430%7Cl%3A1731248475904", # truncated for brevity
|
|
|
4 |
|
5 |
app = Flask(__name__)
|
6 |
|
7 |
+
|
8 |
# Headers for you.com API
|
9 |
headers = {
|
10 |
"cookie": "uuid_guest=12653d55-2f42-4fbd-98bb-33edf8714123; uuid_guest_backup=12653d55-2f42-4fbd-98bb-33edf8714123; AF_DEFAULT_MEASUREMENT_STATUS=true; _ga=GA1.1.1620651973.1726065059; afUserId=26bc0a6c-f7b2-42bb-a950-16348632bbff-p; FPID=FPID2.2.rnWEp46VSGiozCeyM8uHn6Con89GxAFIKMqggZYT0wc%3D.1726065059; FPAU=1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=AK7TQPxcsdpZipu2JajNb2pK1vMt8o7qG9YubF.3ltk-1727005917-1.2.1.1-6gpuUnk60M1itXRWZAf3xZyH5QaRTHSpCHXsZHx9zgSPOtJykF.1izJMMtQ69EB_0UajH5t8zW1wQO9cSvIdUv3N0IstSKJtN9OC3ijAF8EybbFNtUC.rlA2vevPjpVsR2N7NHGVuXR4OuMgZN9R3BcrhTjU3gpFJOiAZQlxImijFSA8mO7.BaxcU7X3e2w4HZB4c27lgzBM2oIBz12dMUVG0SB0_tDOHtAxpBltosI092lRuORu80C_3u6BfZZMYEjIuWKV3PqI0noMOb1jKIvUvb4jOBQ59sXqtvIgW2Xy1P6nyAmBd1enh5RXFVWTm0JQgv2TlfSoNSCIGPhu6FafbLYPxsaYrBtMEiCMlPOOoxezPuCBk0FeikQJsGu7U7r3D7GnhQZuiaHSpab3Nw; _clck=3hwjik%7C2%7Cfpe%7C0%7C1715; tdl_youpro=1020fccf1fab5bf2b1df65da9b6afb; safesearch_guest=Moderate; __cf_bm=uWp_2WLYSSHuuzntNdNUc_PmGQeJznDrQB8_2MU1x_Y-1731161652-1.0.1.1-XUzWj5B5kHJXH3x5cSEhon4sBylGd7e_3p346rNC_caRlEQYG9FEVbzJH_i5Uhv.3e0BJHVwUDB9ywcqiYG.pyQODExMNs_kTHywQFL.qdc; _cfuvid=c3P8i6gmopU4e4uMKNJmW42pnZlHaS.vtHB31WlfWrM-1731161652616-0.0.1.1-604800000; youpro_subscription=false; ab.storage.deviceId.dcee0642-d796-4a7b-9e56-a0108e133b07=g%3Abd7f481f-f2a4-2851-c570-f915decb5bd2%7Ce%3Aundefined%7Cc%3A1726065048731%7Cl%3A1731247844430; ab.storage.userId.dcee0642-d796-4a7b-9e56-a0108e133b07=g%3AU2lveuEm54Ff7p4AQpy5NEMDmyze%7Ce%3Aundefined%7Cc%3A1726065077561%7Cl%3A1731247844431; you_subscription=freemium; safesearch_b2a2fdf678a327a1f0d04c5a6944ed5165725553bb48ef436dd66c7908778261=Moderate; ld_context=%7B%22kind%22%3A%22user%22%2C%22key%22%3A%2212653d55-2f42-4fbd-98bb-33edf8714123%22%2C%22email%22%3A%22alhoorshopp%40gmail.com%22%2C%22country%22%3A%22FR%22%2C%22userAgent%22%3A%22Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F130.0.0.0%20Safari%2F537.36%22%2C%22secUserAgent%22%3A%22%5C%22Chromium%5C%22%3Bv%3D%5C%22130%5C%22%2C%20%5C%22Google%20Chrome%5C%22%3Bv%3D%5C%22130%5C%22%2C%20%5C%22Not%3FA_Brand%5C%22%3Bv%3D%5C%2299%5C%22%22%7D; youchat_personalization=true; youchat_smart_learn=true; daily_query_date=Sun%20Nov%2010%202024; _gcl_au=1.1.1532377395.1731247864; AF_SYNC=1731247870198; FPLC=Ch%2FKQHoC2NzzKJU%2Brw%2B6GvuHXQtDuIpn5jh1JqVumvhLNgkHCClz2HsmW%2FR%2BE2HwsqpKPHOdahm8NOFH4aYH0MIZF10pNLYoo9rOnKFH7o30b%2BlhBpd7ooIm300Nsw%3D%3D; _gtmeec=eyJlbSI6ImEwNDQwMmZkOTI4NGQ2NGY3NWM3ZTY5YzIxY2NmZGZjNDhhZDIzNzc5MDJiYmNlYjk2MDMwYWFkZTk1NzdlYmYiLCJjdCI6IjJhNWNhYzcwZTlmMTFhM2I0MmY2YmI0YjQzMmE0ZmUxNmE2ZWNlNDQ1ZjgzZTFiMjJmODQ4M2RkZTA3MGY2OGUiLCJzdCI6ImVhZGUxZTEyNjhlMjhlMzVhNGI3MWM2OTQyNjBjMDIyNGRhNGQ2NWZmZGI0MzVlNTA4MTM0NmZlYTQxMzVhODgiLCJ6cCI6IjJkN2RkY2Q0MTljMDM0OWUwN2QxZDU4NjVjMGJhMTRkODVhMjNlZWM3Yjc3NDU5NDVkNzhmOWJjZjMwZjA2YjAiLCJjb3VudHJ5IjoiNjdhZDhmNDFh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RnMPzteIGV0Ylp4xnAJGh_jWHieH_Jsv9Ki7TUFUUg4mMhp-CInur9eoZ6LIU0yRVR36_k-jDxz5COoe59nOAwV334DjHXGUgXmS61P0lu9d_t6sCTQIOfqzCPkNL1U2W20BfFVYX-uaYqPP8bHrKZc-gDLqzWmjar9UNF2HEHpKjciKlQpRoRVljO45c6zsQQUTmIaLkX1J6WiuWAf4sVcyJoy7VXsg; daily_query_count=10; total_query_count=10; _ga_2N7ZM9C56V=GS1.1.1731247871.3.1.1731248475.0.0.53253675; ab.storage.sessionId.dcee0642-d796-4a7b-9e56-a0108e133b07=g%3A8d743f0e-6468-492d-af13-cc8c6c73d54e%7Ce%3A1731250275904%7Cc%3A1731247844430%7Cl%3A1731248475904", # truncated for brevity
|