|
|
@@ -1,14 +1,18 @@
|
|
|
#!/usr/bin/python3
|
|
|
|
|
|
-# $Id: blogsiread.py,v 1.3 2022/09/02 05:06:33 springm Exp springm $
|
|
|
-# $Revision: 1.3 $
|
|
|
-# $Date: 2022/09/02 05:06:33 $
|
|
|
+# $Id: blogsiread.py,v 1.4 2022/09/29 04:42:00 springm Exp springm $
|
|
|
+# $Revision: 1.4 $
|
|
|
+# $Date: 2022/09/29 04:42:00 $
|
|
|
# $Log: blogsiread.py,v $
|
|
|
+# Revision 1.4 2022/09/29 04:42:00 springm
|
|
|
+# Summary: works, but LFI gets on top too often
|
|
|
+#
|
|
|
# Revision 1.3 2022/09/02 05:06:33 springm
|
|
|
# Summary: photoplacegallery hash jetzt vom Titel der ersten Ausstellung
|
|
|
#
|
|
|
|
|
|
|
|
|
+
|
|
|
"""
|
|
|
* if yes
|
|
|
* read the spring2life linklist on blogger,
|
|
|
@@ -175,13 +179,14 @@ def lfionlinede(b, domain, i):
|
|
|
# logger.debug(f"{b[1]}")
|
|
|
with urllib.request.urlopen(b[1]) as response:
|
|
|
html = response.read()
|
|
|
- m.update(html)
|
|
|
+ p = re.search('titlebox30 cu-pointer[\'"] onclick=[\'"]window.location\s*=\s*[\'"](https://.*?)[\'"][\'"]>\s*<h1.*?>(.*?)</h1', html.decode('utf-8'), re.MULTILINE | re.DOTALL)
|
|
|
+ string2hash = f"""p[2]"""
|
|
|
+ m.update(string2hash.encode('utf-8'))
|
|
|
hash = (m.hexdigest())
|
|
|
if not domain in meta_values: # first run
|
|
|
meta_values[domain] = { 'hash': '1' } # fake value
|
|
|
if not meta_values[domain]['hash'] == hash: # Unterschiedliche Hashes
|
|
|
meta_values[domain]['hash'] = hash
|
|
|
- p = re.search('titlebox30 cu-pointer[\'"] onclick=[\'"]window.location\s*=\s*[\'"](https://.*?)[\'"][\'"]>\s*<h1.*?>(.*?)</h1', html.decode('utf-8'), re.MULTILINE | re.DOTALL)
|
|
|
if p:
|
|
|
logger.debug(f"search result {p[1]} {p[2]}")
|
|
|
string2hash = f"""p[2]"""
|