Python 如何解决Selenium异常:;无效参数';url';必须是字符串“;
我正在尝试使用python的insta scrape库,特别是获取instagram概要文件的所有帖子的方法 这是指向库页面的链接: 这是指向图书馆文档的链接,特别是对于方法get_posts: 我的简单代码是: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
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。您需要安装解析器库吗?
您可能需要安装解析器库。