Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/354.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何解决Selenium异常:;无效参数';url';必须是字符串“;_Python_Selenium_Selenium Webdriver_Selenium Chromedriver - Fatal编程技术网

Python 如何解决Selenium异常:;无效参数';url';必须是字符串“;

Python 如何解决Selenium异常:;无效参数';url';必须是字符串“;,python,selenium,selenium-webdriver,selenium-chromedriver,Python,Selenium,Selenium Webdriver,Selenium Chromedriver,我正在尝试使用python的insta scrape库,特别是获取instagram概要文件的所有帖子的方法 这是指向库页面的链接: 这是指向图书馆文档的链接,特别是对于方法get_posts: 我的简单代码是: options = Options() options.add_argument('--headless') driver = webdriver.Chrome(options=options) insta_profile = Profile('https://www.instag

我正在尝试使用python的insta scrape库,特别是获取instagram概要文件的所有帖子的方法

这是指向库页面的链接:

这是指向图书馆文档的链接,特别是对于方法get_posts:

我的简单代码是:

options = Options()
options.add_argument('--headless')
driver = webdriver.Chrome(options=options)
insta_profile = Profile('https://www.instagram.com/molteni_matteo/')
insta_profile.scrape()
list_post = insta_profile.get_posts(webdriver=driver, amount=None,
                                      login_first=False, login_pause=60,
                                      max_failed_scroll=300, scrape=False, scrape_pause=5)
for profile_post in list_post:
    print(profile_post)
但它给了我一个错误:


如何解决这个问题?

这实际上是python模块中的一个bug,Profile不能正确地接受url。 您可以通过设置

insta_profile.url=”https://www.instagram.com/molteni_matteo/“


打电话之前请先发帖子

谢谢你,伙计。出现此问题,但我遇到以下错误:
bs4.FeatureNotFound:找不到具有您请求的功能的树生成器:lxml。您需要安装解析器库吗?
您可能需要安装解析器库。