Skip to content

Commit

Permalink
Docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
tychxn authored Feb 5, 2020
1 parent 365d132 commit 45834f5
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions area_id/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
## area参数自助生成
# 地址id如何获取?

>该脚本能生成下单所需的area参数
## 方法一

👉运行脚本,根据提示逐级选择区域即可。
在本文件夹中根据地址查询对应的文件。

## 方法二

在商品页面(例如 https://item.jd.com/1178879.html) 打开开发者工具,在 Console 中执行以下 Javascript 代码:

```js
var el = document.getElementsByClassName("ui-area-text")[0]
var area_name = el.getAttribute("title")
var area_id = el.getAttribute("data-id").replace(/-/g, "_")
console.log(area_name)
console.log(area_id)
```

## 方法三

运行本文件夹中的 Python 脚本,根据提示逐级选择区域。感谢 @6r6 提供脚本~

```sh
python select_area_id.py
```
python get_area_id.py
```

0 comments on commit 45834f5

Please sign in to comment.