Home > Software engineering >  VBA to realize the automatic extraction baidu encyclopedia the content of the movie
VBA to realize the automatic extraction baidu encyclopedia the content of the movie

Time:11-30

Website is: https://baike.baidu.com/item/Pacific rim: thunder again/22038038? Fr=Aladdin
Need to extract the inside of the content such as "Chinese name", automatically fill in on the homemade Excel file (as attachment), if there is no information is replaced with "/"


The innerText can find a Chinese name, but just don't know how to remove the next node of dt dd the innerText, has tried to children or siblings, is to get the dd the innerText "Pacific rim: thunder again".

The Pacific rim: thunder again

CodePudding user response:

Don't search for nodes, direct search character interception
Newline & lt; Dd & gt; Line breaks
Newline & lt;/dd>
Between the two rows of signature is the content of the

CodePudding user response:

Just started learning VBA, can write the code for me? thx

CodePudding user response:

reference 1st floor bakw response:
don't search for nodes, direct search character interception
Newline & lt; Dd & gt; Line breaks
Newline & lt;/dd>
Between the two rows of signature is the content of the


Just started learning VBA, can write the code for me? thx

CodePudding user response:


Is this? I only do the individual case, as long as shown on the wikipedia entries can be caught

CodePudding user response:

All commented On the Error Resume Next statement, running in the VBA IDE,
The error and then click the debugging, the cursor will stop error in the statement,
Or
In doubt may have a logical error statements in advance to set breakpoints, run through the breakpoint interrupt,

At this point can be used in the immediate window
? The variable name
Or
? The function name () function parameter
Or
Process (parameters)
Auxiliary debugging,

CodePudding user response:

reference 4 floor qq_25650269 response:

Is this? I only do the individual case, as long as shown on the wikipedia entries can be caught


I just want to achieve such effect, thank you, I can give you the code I consult?

CodePudding user response:

reference 4 floor qq_25650269 response:

Is this? I only do the individual case, as long as shown on the wikipedia entries can be caught


I just want to achieve such effect, thank you, I can give you the code I consult?

CodePudding user response:

I just want to achieve such effect, thank you, I can give you the code I consult?
  •  Tags:  
  • VBA
  • Related