Could you tell me if I can use regular expressions to match my life or death? a page has many Weibo posts and a microblog contains many layers of divs. I want to get the two divs in each microblog. data:
Text content
The two divs are of the same level.
I want to catch the content in class = content and the src of img;
Note that the second DIV is not necessary. some Weibo posts have images and some do not have them.
Reply to discussion (solution)
We recommend that you use phpquery. it's pretty good to have a look at it two days ago... you don't need to think about those regular expressions after you have mastered the method.
We recommend that you use phpquery. it's pretty good to have a look at it two days ago... you don't need to think about those regular expressions after you have mastered the method.
Thank you, moderator.
There are two other questions that I choose to use. content to capture the content, it will display all the class content on the entire page as a content, so there is no way to tell where it is a content.
Another is how to make it read the next page.
The younger brother asks the yellow moderator to give me some advice.
We recommend that you use phpquery. it's pretty good to have a look at it two days ago... you don't need to think about those regular expressions after you have mastered the method.
Thank you, moderator.
There are two other questions that I choose to use. content to capture the content, it will display all the class content on the entire page as a content, so there is no way to tell where it is a content.
Another is how to make it read the next page.
The younger brother asks the yellow moderator to give me some advice.
When there are multiple classes, you can take the first few of them for careful research.
As for how to read the next page, specific operations should be performed based on different pages...
Phpquery uses the same syntax as jquery, and jquery can use phpquery.
If you cannot figure it out, go to the w3c website to learn more.
We recommend that you use phpquery. it's pretty good to have a look at it two days ago... you don't need to think about those regular expressions after you have mastered the method.
Thank you, moderator.
There are two other questions that I choose to use. content to capture the content, it will display all the class content on the entire page as a content, so there is no way to tell where it is a content.
Another is how to make it read the next page.
The younger brother asks the yellow moderator to give me some advice.
Think of the Huangdao Main ...... Dongxie