EasySpider
EasySpider copied to clipboard
如何提取<a>标签的href属性的值
大神您好,我在使用您的软件时遇到困扰我的问题
1 比如 /html/body/div[1]/div[1]/div[1]/div[3]/div[1]/div[1]/div[3]/div[2]/a[1] 但提取不到链接地址 /html/body/div[1]/div[1]/div[1]/div[3]/div[1]/div[1]/div[3]/div[2]/a[1]/@href 这条语句可以正确匹配到数据,软件该如何设置才能输出上述 Xpath 的数据 2 运行循环点击该图片进入二级页面采集数据时运行一段时间软件会自动退出。采集的数据不完全有缺失
采集的网址为 https://www.gamestorrents.fm/juegos-pc/page/1/----https://www.gamestorrents.fm/juegos-pc/page/337/
关键页面结构为
<div class="col-md-2 w3l-movie-gride-agile">
<a href="https://www.gamestorrents.fm/juegos-pc/uru-complete-chronicles-engi-know/" class="hvr-shutter-out-horizontal">
<img style="background-image: url('https://www.gamestorrents.fm/wp-content/uploads/portadas/URU-Complete-Chronicles-[ENG][I-KnoW]-(Poster).jpg')" src="https://www.gamestorrents.fm/wp-content/themes/GamesTorrent/css/images/portada_background.png" class="img-responsive lapinio" alt="Juegos PC - URU Complete Chronicles [ENG][I KnoW]" title="Juegos PC - URU Complete Chronicles [ENG][I KnoW]">
<span class="miklonio">Aventuras</span>
<span class="pc_games_cracker">I_KnoW </span>
<span class="last_flags"><img class="flagens" src="https://www.gamestorrents.fm/wp-content/themes/GamesTorrent/css/images/flags/eng.png" title="Idioma English" alt="Idioma English"></span>
</a>
<div class="pintinia mid-1 agileits_w3layouts_mid_1_home">
<div class="w3l-movie-text">
<h6 class="game_name">
<a href="https://www.gamestorrents.fm/juegos-pc/uru-complete-chronicles-engi-know/" title="URU Complete Chronicles">URU Complete Chronicles</a>
</h6>
</div>
</div>
</div>
Are you using FormProvider
? https://react-hook-form.com/docs/useformcontext
Yes, the "Form" component is the form provider on the library, it is matching the shadcn docs, didn't change anything.
And passing all the values returned from useForm
?
const form = useForm()
<Form {...form}>
...
</Form>
I'm getting this error as well. Same situation: brand new project, followed the docs.
In the same boat here
same
Make sure you import "Form" from the UI file, not from react-hook-form
Make sure you import "Form" from the UI file, not from
react-hook-form
Yeah, I am and the issue still persists sadly. All components generated from the latest version of the CLI.
EDIT: I'm sorry I'm surrendering my licence to use a computer right now.
import { Controller, Form, useForm } from 'react-hook-form';
Make sure you import "Form" from the UI file, not from react-hook-form
solved for me! thanks
Make sure you import "Form" from the UI file, not from
react-hook-form
Thank you.
Make sure you import "Form" from the UI file, not from
react-hook-form
🤝
Make sure you import "Form" from the UI file, not from
react-hook-form
This solved my problem! Thank you!
Make sure you import "Form" from the UI file, not from
react-hook-form
Arrghh! Thank you!
Make sure you import "Form" from the UI file, not from
react-hook-form
Thank You , Life save
Anyone else starting to wonder if this Form component should have been called FormWrapper given we still need the <form >
element inside anyway. Especially given how many of us are accidentally importing the react-hook-form version 🤣
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.
Make sure you import "Form" from the UI file, not from
react-hook-form
Thank you man, you're live saver !!!