网络爬虫与数据收集工具-利用VMLogin账号多开防关联指纹浏览器实现

VMlogin防关联指纹浏览器,最新网络爬虫与数据收集工具,用占用资源更少的虚拟浏览器配置文件取代您的若干设备或虚拟机。现成的、开发迅速的浏览器指纹管理工具供您使用。自动化允许您在VMLogin的浏览器配置文件中自动执行任务。从创建简单的自动化脚本到复杂的Web爬虫,可以搜索、收集Web数据并与之交互。

VMLogin 可以生成多个独一无二指纹浏览器,每个浏览器都是不同的硬件设备,浏览器之间相互物理隔离。 通过在每个 VMLogin 浏览器中自配一个固定的静态 IP 地址,来实现全球网站多平台多帐号登录。 这样每个配置好的 VMLogin 浏览器就是目标国家地区的设备硬件了。

VMLogin多开防关联浏览器自动化基于Selenium WebDriver

通常情况下,如果您运行Selenium代码,首先将连接到Chrome驱动,然后设置您所需要的功能。而将VMLogin与Selenium代码结合使用时,您无需这样操作。您将使用Web Driver程序,通过本地端口连接到Vmlogin应用或某浏览器配置文件,设置所需功能,在预定义的浏览器配置文件中执行Selenium命令。

支持的语言:

Selenium框架提供了多种可搭配使用的语言,因此VMLogin自动化也可以在多种编码语言上运行。但是目前,我们仅为Java和Python供技术支持。

Selenium浏览器自动化的API:java和Python 案例:https://www.vmlogin.cc/blog/279.html

定义VMLogin端口:

您需要提前定义软件端口以使用Selenium自动化。以下是定义端口的方法:

在软件《我的帐户》中打开启用浏览器自动化设置,并在监听端口中设置能使用端口,这里默认是35000,另外你也可以设置一个访问密码。

随后,您就可以通过定义的端口连接到VMLogin了。

接口还可以传入代理服务器信息,如果传入代理信息会覆盖配置文件里的代理信息,这种覆盖是临时性的,不会真的修改配置文件,只对自动化接口有效:

//127.0.0.1:35000/api/v1/profile/start?automation=true&profileId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&proxytype=socks5&proxyserver=ip&proxyport=1080&proxyusername=&proxypassword=

Proxy类型可能是这三种:

proxytype=socks5

proxytype=socks4

proxytype=http

代理用户名和密码可以不传为空。

Python Case:

from selenium import webdriver

from selenium.webdriver.firefox import options

import requests

mla_profile_id = ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’

mla_url = ‘http://127.0.0.1:35000/api/v1/profile/start?automation=true&profileId=’+mla_profile_id

resp = requests.get(mla_url)

json = resp.json()

print(json[‘value’])

chrome_options = Options()

chrome_options.add_experimental_option(“debuggerAddress”, json[‘value’][7:])

chrome_driver = r”chromedriver.exe”

#http://chromedriver.storage.googleapis.com/79.0.3945.36/chromedriver_win32.zip

#download chromedriver file, put in python catalog

driver = webdriver.Chrome(chrome_driver, chrome_options=chrome_options)

driver.get(‘https://www.baidu.com/’)

executor_url = driver.command_executor._url

session_id = driver.session_id

print(executor_url)

print(session_id)

print(‘ok it is done’)

driver.quit()

可登陆VMLogin官网了解详情哦,注册可免费试用测试!https://www.vmlogin.cc

  • 网络爬虫工具
  • 数据采集工具
  • 数据收集工具

本软件不包含代理IP,需要用户自行购买第三方:YiLuProxy