Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spider
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
selection-new
spider
Commits
6078b1ae
Commit
6078b1ae
authored
Feb 12, 2026
by
Peng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
637db4a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
sp_serch_term_spider.py
py_spider/amazon_spider/sp_serch_term_spider.py
+0
-0
to_keyword_pg.py
py_spider/amzon_parse_db_html/to_keyword_pg.py
+30
-0
No files found.
py_spider/amazon_spider/sp_serch_term_spider.py
0 → 100644
View file @
6078b1ae
py_spider/amzon_parse_db_html/to_keyword_pg.py
0 → 100644
View file @
6078b1ae
# import pandas as pd
#
# file_path = r"C:\Users\ASUS\Downloads\Result_65.xlsx"
# df = pd.read_excel(file_path)
#
# # 去掉列名可能存在的空格(很常见:'keywordId ' 这种)
# df.columns = df.columns.str.strip()
#
# # 按原始列名映射到数据库字段名
# rename_map = {
# "keywordId": "keyword_id",
# "keywordText": "search_term",
# "adGroupId": "adgroupid",
# "campaignId": "campaignid",
# "adId": "adid",
# "sku": "sku",
# }
#
# df = df.rename(columns=rename_map)
#
# # 只保留表里需要的6列,并按表结构排序
# need_cols = ["search_term", "keyword_id", "adgroupid", "campaignid", "adid", "sku"]
# df = df[need_cols]
#
# print(df.columns)
# print(df.head())
# from utils.secure_db_client import get_remote_engine
# engine = get_remote_engine('us', 'postgresql_14')
# engine.to_sql(df,'sp_search_term_syn', if_exists='append')
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment