Upgrade Python3 version and FB API version
dblume

dblume commited on 2025-08-29 16:29:58
Showing 2 changed files, with 3 additions and 3 deletions.

... ...
@@ -1,4 +1,4 @@
1
-#!/home/dblume/opt/python-3.9.6/bin/python3
1
+#!/home/dblume/opt/python-3.12.9/bin/python3
2 2
 
3 3
 import yaml
4 4
 import sys
... ...
@@ -1,4 +1,4 @@
1
-#!/home/dblume/opt/python-3.9.6/bin/python3
1
+#!/home/dblume/opt/python-3.12.9/bin/python3
2 2
 #
3 3
 # Testing without affecting the yaml file and saving the updated one aside:
4 4
 # cp techcrunch.yaml techcrunch.yaml_back; ./techcrunch.py; \
... ...
@@ -387,7 +387,7 @@ def Get_fb_stats(url_string):
387 387
 
388 388
     try:
389 389
         encoded = urllib.parse.urlencode({'access_token': facebook_token})
390
-        url = 'https://graph.facebook.com/v2.11/?id=%s&fields=engagement&%s'
390
+        url = 'https://graph.facebook.com/v23.0/?id=%s&fields=engagement&%s'
391 391
         f = urllib.request.urlopen(url % (urllib.parse.quote_plus(url_string), encoded))
392 392
         data = f.read()
393 393
         f.close()
394 394