A page has a lot of Weibo a Weibo there are many layers of div I want to get the data for each of the two div's in the microblog:
Text content
These two div's are siblings.
I'm going to catch the contents of class=content and the IMG src;
It is important to take into account that the second div is not required some of the tweets have pictures some don't
Reply to discussion (solution)
Suggest you use Phpquery bar, two days ago looked a bit fine ... After mastering the method, you don't need to think about the regular expressions.
Suggest you use Phpquery bar, two days ago looked a bit fine ... After mastering the method, you don't need to think about the regular expressions.
Really, it's okay. Dochehoun Moderator
There are two more questions that I choose to use. Content to crawl the contents it will display all the content contents of the entire page as a single piece of content, which makes it impossible to distinguish where it is.
And one is how to make it read the next page.
Younger brother New please Huang Moderator
Suggest you use Phpquery bar, two days ago looked a bit fine ... After mastering the method, you don't need to think about the regular expressions.
Really, it's okay. Dochehoun Moderator
There are two more questions that I choose to use. Content to crawl the contents it will display all the content contents of the entire page as a single piece of content, which makes it impossible to distinguish where it is.
And one is how to make it read the next page.
Younger brother New please Huang Moderator
Huang Moderator .... When you have multiple classes, you can take a closer look at the first few.
As to how to read the next page to be based on different pages to do the specific operation ...
Phpquery and jquery Use the same syntax, and jquery will be able to use Phpquery
If you don't know, just go to the Web site and learn.
Suggest you use Phpquery bar, two days ago looked a bit fine ... After mastering the method, you don't need to think about the regular expressions.
Really, it's okay. Dochehoun Moderator
There are two more questions that I choose to use. Content to crawl the contents it will display all the content contents of the entire page as a single piece of content, which makes it impossible to distinguish where it is.
And one is how to make it read the next page.
Younger brother New please Huang Moderator
Think of the Huangdao Lord ... Eastern Evil