oak 4 mesi fa
parent
commit
e43ffda458

+ 0 - 4
builder/lists/index.html

@@ -38,8 +38,6 @@
   <meta property="og:title" content="幸福空間 - 台灣最大的室內設計、設計師與設計個案影音平台" />
   <meta property="og:type" content="website" />
   <meta property="og:locale" content="zh_TW" />
-  
-  
 
   <title>幸福空間 - 室內設計、裝潢、居家生活、影音平台</title>
 
@@ -63,8 +61,6 @@
   <link rel="stylesheet" href="../../css/reset.css" />
   <link rel="stylesheet" href="../../css/lists.css" />
   <link rel="stylesheet" href="../../css/all.css" />
-  <link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.hhh.com.tw/builder/lists/" />
-  <link rel="canonical" href="https://hhh.com.tw/builder/lists/" />
   <!-- 結構化資料 -->
   <script type="application/ld+json">
       {

+ 0 - 2
cases/lists/index.html

@@ -61,8 +61,6 @@
   <link rel="stylesheet" href="../../css/reset.css" />
   <link rel="stylesheet" href="../../css/lists.css" />
   <link rel="stylesheet" href="../../css/all.css" />
-    <link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.hhh.com.tw/cases/lists/" />
-  <link rel="canonical" href="https://hhh.com.tw/cases/lists/" />
   <!-- 結構化資料 -->
   <script type="application/ld+json">
       {

File diff suppressed because it is too large
+ 0 - 0
cases/lists/json/cases_lists_data.json


+ 0 - 2
columns/lists/index.html

@@ -61,8 +61,6 @@
   <link rel="stylesheet" href="../../css/reset.css" />
   <link rel="stylesheet" href="../../css/lists.css" />
   <link rel="stylesheet" href="../../css/all.css" />
-    <link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.hhh.com.tw/columns/lists/" />
-  <link rel="canonical" href="https://hhh.com.tw/columns/lists/" />
   <!-- 結構化資料 -->
   <script type="application/ld+json">
       {

File diff suppressed because it is too large
+ 0 - 0
columns/lists/json/columns_lists_data.json


+ 0 - 2
designers/lists/index.html

@@ -61,8 +61,6 @@
   <link rel="stylesheet" href="../../css/reset.css" />
   <link rel="stylesheet" href="../../css/lists.css" />
   <link rel="stylesheet" href="../../css/all.css" />
-  <link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.hhh.com.tw/designers/lists/" />
-  <link rel="canonical" href="https://hhh.com.tw/designers/lists/" />
   <!-- 結構化資料 -->
   <script type="application/ld+json">
       {

+ 85 - 0
genjson/gen_json_cases_list_data.py

@@ -0,0 +1,85 @@
+
+####################################use for all ,not use in crontab
+
+import os
+from typing import Optional
+from dataset.util import ResultIter
+from datetime import tzinfo
+import datetime
+import mysql.connector
+from mysql.connector import Error
+import dataset
+import json
+from pytube import extract
+import requests
+import json 
+
+hhhMBPath = '../hhh-home-mb'
+hhhPCPath = '../hhh-home-pc'
+
+#connstr = 'mysql://hhh7796hhh:lYmWsu^ujcA1@hhh-v57.cmab1ctkglka.ap-northeast-2.rds.amazonaws.com:3306/xoops?charset=utf8mb4'
+#2022/12/13 change
+connstr = 'mysql://hhh7796hhh:lYmWsu^ujcA1@ec2-3-35-26-49.ap-northeast-2.compute.amazonaws.com:3306/xoops?charset=utf8mb4'
+
+""" db = dataset.connect(
+    'mysql://hhh7796hhh:lYmWsu^ujcA1@hhh-v57.cmab1ctkglka.ap-northeast-2.rds.amazonaws.com:3306/xoops?charset=utf8mb4') """
+#        charset='utf8',
+#        collation='utf8_unicode_ci'
+
+#2022/12/13 change
+connobj = {
+    'host': 'ec2-3-35-26-49.ap-northeast-2.compute.amazonaws.com',
+    'database': 'xoops',
+   'user': 'hhh7796hhh',
+   'password': 'lYmWsu^ujcA1',
+    'use_unicode': True   
+    #'charset': 'utf8',
+    #'collation': 'utf8_unicode_ci'
+
+}
+
+ #connobj = {
+    # 'host': 'hhh-v57.cmab1ctkglka.ap-northeast-2.rds.amazonaws.com',
+     #'database': 'xoops',
+     #'user': 'hhh7796hhh',
+     #'password': 'lYmWsu^ujcA1',
+     #'use_unicode': True
+    ##'charset': 'utf8',
+     ##'collation': 'utf8_unicode_ci'
+ #}
+
+# def ExecuteQuery(isql):
+#     with mysql.connector.connect(**connobj) as connection :
+#         with connection.cursor(dictionary=True) as cursor:
+#     # connection.set_charset_collation('utf8','utf8_general_ci')
+#             #cursor = connection.cursor(dictionary=True)
+#             cursor.execute(isql)
+#             return cursor.fetchall()
+
+# records = ExecuteQuery("SELECT hcolumn_id FROM _hcolumn where onoff=1")
+# list_use = []
+# for i in records:
+#     list_use.append(i['hcolumn_id'])
+# #print(list_use)
+# for j in list_use:
+while True:
+    try:
+        a=requests.get('https://m3.hhh.com.tw:18673/case_search?page=1&page_size=18&order_by=new')
+        break
+    except:
+        print('bad:',j)
+        time.sleep(5)
+
+d=a.json()
+print(d)
+with open('../cases/lists/json/cases_lists_data.json','w+',encoding="utf-8") as f:
+    json.dump(d, f)
+
+cmd="""curl -X POST "https://api.cloudflare.com/client/v4/zones/8cb58022ad5743cfd9f088d5e3a261eb/purge_cache" -H "X-Auth-Email: web.dept.hhh@gmail.com"  -H "X-Auth-Key:63e51d9a1638d66afcbfc3320aabec52304de" -H "Content-Type: application/json" --data '{"files":["https://hhh.com.tw/hhh-test/json/cases_lists_data.json"]}'"""
+print(cmd)
+os.system(cmd)
+    #if str(j)=='5':
+    #    break
+
+
+

+ 85 - 0
genjson/gen_json_columns_list_data.py

@@ -0,0 +1,85 @@
+
+####################################use for all ,not use in crontab
+
+import os
+from typing import Optional
+from dataset.util import ResultIter
+from datetime import tzinfo
+import datetime
+import mysql.connector
+from mysql.connector import Error
+import dataset
+import json
+from pytube import extract
+import requests
+import json 
+
+hhhMBPath = '../hhh-home-mb'
+hhhPCPath = '../hhh-home-pc'
+
+#connstr = 'mysql://hhh7796hhh:lYmWsu^ujcA1@hhh-v57.cmab1ctkglka.ap-northeast-2.rds.amazonaws.com:3306/xoops?charset=utf8mb4'
+#2022/12/13 change
+connstr = 'mysql://hhh7796hhh:lYmWsu^ujcA1@ec2-3-35-26-49.ap-northeast-2.compute.amazonaws.com:3306/xoops?charset=utf8mb4'
+
+""" db = dataset.connect(
+    'mysql://hhh7796hhh:lYmWsu^ujcA1@hhh-v57.cmab1ctkglka.ap-northeast-2.rds.amazonaws.com:3306/xoops?charset=utf8mb4') """
+#        charset='utf8',
+#        collation='utf8_unicode_ci'
+
+#2022/12/13 change
+connobj = {
+    'host': 'ec2-3-35-26-49.ap-northeast-2.compute.amazonaws.com',
+    'database': 'xoops',
+   'user': 'hhh7796hhh',
+   'password': 'lYmWsu^ujcA1',
+    'use_unicode': True   
+    #'charset': 'utf8',
+    #'collation': 'utf8_unicode_ci'
+
+}
+
+ #connobj = {
+    # 'host': 'hhh-v57.cmab1ctkglka.ap-northeast-2.rds.amazonaws.com',
+     #'database': 'xoops',
+     #'user': 'hhh7796hhh',
+     #'password': 'lYmWsu^ujcA1',
+     #'use_unicode': True
+    ##'charset': 'utf8',
+     ##'collation': 'utf8_unicode_ci'
+ #}
+
+# def ExecuteQuery(isql):
+#     with mysql.connector.connect(**connobj) as connection :
+#         with connection.cursor(dictionary=True) as cursor:
+#     # connection.set_charset_collation('utf8','utf8_general_ci')
+#             #cursor = connection.cursor(dictionary=True)
+#             cursor.execute(isql)
+#             return cursor.fetchall()
+
+# records = ExecuteQuery("SELECT hcolumn_id FROM _hcolumn where onoff=1")
+# list_use = []
+# for i in records:
+#     list_use.append(i['hcolumn_id'])
+# #print(list_use)
+# for j in list_use:
+while True:
+    try:
+        a=requests.get('https://m3.hhh.com.tw:18673/column_search?page=1&page_size=18&order_by=new')
+        break
+    except:
+        print('bad:',j)
+        time.sleep(5)
+
+d=a.json()
+print(d)
+with open('../columns/lists/json/columns_lists_data.json','w+',encoding="utf-8") as f:
+    json.dump(d, f)
+
+cmd="""curl -X POST "https://api.cloudflare.com/client/v4/zones/8cb58022ad5743cfd9f088d5e3a261eb/purge_cache" -H "X-Auth-Email: web.dept.hhh@gmail.com"  -H "X-Auth-Key:63e51d9a1638d66afcbfc3320aabec52304de" -H "Content-Type: application/json" --data '{"files":["https://hhh.com.tw/hhh-test/json/columns_lists_data.json"]}'"""
+print(cmd)
+os.system(cmd)
+    #if str(j)=='5':
+    #    break
+
+
+

+ 0 - 2
videos/lists/index.html

@@ -61,8 +61,6 @@
   <link rel="stylesheet" href="../../css/reset.css" />
   <link rel="stylesheet" href="../../css/lists.css" />
   <link rel="stylesheet" href="../../css/all.css" />
-   <link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.hhh.com.tw/videos/lists/" />
-  <link rel="canonical" href="https://hhh.com.tw/videos/lists/" />
   <!-- 結構化資料 -->
   <script type="application/ld+json">
       {

Some files were not shown because too many files changed in this diff