本地API接口进行常规自动化操作

1. 启动接口添加参数 notifications=2 可以禁止网站通知提示框。

http://127.0.0.1:35000/api/v1/profile/start?profileId=xxxxxxxxxxx&skiplock=true&notifications=2

2. 鼠标点击:GET传参x,y坐标为鼠标点击的坐标,页面可视的左上角为0,0基点。

http://127.0.0.1:35000/api/v1/profile/page/mouseclick?x=400&y=500&profileId=xxxx

返回例:

{"status":"OK","success":true,"value":"{}"}

如果 success = true 表示执行成功


3. 鼠标滚轮:GET传参x,y坐标为鼠标所在的坐标,deltaY为滚轮上下滚动值,负数是上向滚动,正数是向下滚动。

http://127.0.0.1:35000/api/v1/profile/page/mousewheel?x=400&y=500&deltaX=0&deltaY=50&profileId=xxxx

返回例:

{"status":"OK","success":true,"value":"{}"}

如果 success = true 表示执行成功


4. 页面信息查询:GET传参profileId配置文件ID,可以读取当前页的网址,标题,是否加载完成信息。

http://127.0.0.1:35000/api/v1/profile/page/pagestate?profileId=xxxx

返回例1

{"status":"OK","value":"","success":true,"baseURI":"https://cn.bing.com/","readyState":"interactive","title":"必应"}

返回例2

{"status":"OK","value":"","success":true,"baseURI":"https://cn.bing.com/","readyState":"complete","title":"必应"}

如果success=true表示执行成功,baseURI为当前页网址,readyState为complete页面加载完成。title为标题


5. 前进

http://127.0.0.1:35000/api/v1/profile/historyforward?profileId=xxxx

6. 后退

http://127.0.0.1:35000/api/v1/profile/historyback?profileId=xxxx

7. 优化代理检测接口(添加主动超时参数 timeout 毫秒,超时自动返回)

http://127.0.0.1:35000/api/v1/proxy/test?proxytype=socks5&proxyserver=127.0.0.1&proxyport=1080&proxyusername=&proxypassword=&timeout=8000

表示如果测试代理8秒没结果就不等了,失败返回。

8. 刷新页面

http://127.0.0.1:35000/api/v1/profile/refresh?profileId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

9.当前标签打开指定网址

http://127.0.0.1:35000/api/v1/profile/openurl?profileId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&url=www.vmlogin.com.cn

10. 获取网页源代码

http://127.0.0.1:35000/api/v1/profile/source?profileId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx


11. 客户端重启接口

http://127.0.0.1:35000/api/v1/client/restart

12. 测试代理的接口

http://127.0.0.1:35000/api/v1/proxy/test?proxytype=socks5&proxyserver=127.0.0.1&proxyport=1080&proxyusername=&proxypassword=

proxytype可用参数:socks5/socks4/http/https

{"status":"ERROR","value":"Failed to test the proxy server."}
{"status":"OK","value":"country:HK\r\ncity:Central\r\nregion:HCW\r\ntz:Asia\/Hong_Kong\r\n

http://127.0.0.1:35000/api/v1/proxy/test?proxytype=socks5&proxyserver=127.0.0.1&proxyport=1080&proxyusername=&proxypassword=&urlindex=0

url_index  =  0    lumtest (Lumi的检测IP地址)

url_index  =  1    VMLogin (VMLogin自己库,支持IPV6检测)

url_index  =  2    ip-api.com (ip-api库)

13. 设置:若密码遭遇了数据泄露,发出警告    enable=false 关闭警告

http://127.0.0.1:35000/api/v1/profile/browser/password_manager_leak_detection?profileId=xxxxxx&enable=false


14. 导入地址API:

① http://127.0.0.1:35000/api/v1/profile/addresses/import

② POST  

③ profileId

④ body (JSON need base64 encode):  

⑤ [{"name_on_card":"vmlogin","nickname":"vmlogin","card_number":"1111123456789","expiration_month":8,"expiration_year":2023}]


15. 导入付款方式API:

① http://127.0.0.1:35000/api/v1/profile/credit_cards/import

② POST

③ profileId

④ body (JSON need base64 encode): 

⑤ [{"organization":"vmlogin ltd","street_address":"vmlogin  100","district":"Shushan","city":"hefei","province":"Anhui","zipcode":"230088","country_code":"CN","number":"13988888","full_name":"dawang",

"email":"cs@vmlogin.us"}]