Source code | Collection WB bib

Many friends privately messaged me, wanting to crawl scarves that certain bloggers 'liked' and 'forwarded' , arrange!

1. In the market, crawling the blog posts that some bib bloggers have liked and reposted requires the following requirements:

  1. Market research: Sometimes brands or companies need to know hot topics or popular articles in a certain field, so they need to collect articles that have been liked and reposted by corresponding bib bloggers.

  2. Competitive product analysis: By collecting the articles liked and reposted by bloggers of competing bibs, we can understand the promotion and marketing strategies of competing products, as well as consumers’ feedback on competing products.

  3. Form industry insights: By collecting articles liked and forwarded by well-known bib bloggers in a certain field, we can understand trends, market dynamics and hot spots in this field, and provide industry insights for relevant companies.

  4. Data analysis: analyze and process the collected data, dig out valuable information and rules, and provide data support for enterprises to formulate marketing strategies.

  5. ......

2. Portraits of personnel who need such data for big data analysis:

  1. Social media marketing: marketers can learn about users' hobbies and consumption habits by crawling blog posts liked and forwarded by bib bloggers, so as to formulate more targeted marketing strategies.

  2. Brand word-of-mouth management: The brand side can understand users' attitudes and feedback on the brand by crawling bloggers' likes and reposts, and respond to users' doubts and questions in a timely manner.

  3. Market research: Market researchers can learn users' comments and opinions on a product or service by crawling bloggers' likes and reposts, and provide a basis for corporate decision-making.

  4. Public opinion monitoring: Public relations personnel can understand the public's attitude and reaction to a certain event or topic by crawling blog posts liked and reposted by bib bloggers, and formulate corresponding crisis management strategies.

  5. Intelligence collection: intelligence personnel can learn about the activity track, behavior habits and other information of an organization or individual by crawling the blog posts that bib bloggers have liked and reposted, so as to provide a basis for subsequent intelligence analysis.

  6. Students' end-of-term homework: realize the function of scarf crawler, etc.

  7. ......

3. Data format

Crawling results are in csv format (Excel can open and operate)

  1. The CSV file format is very simple, and data can be directly imported and exported in almost all spreadsheet software.

  2. Easy to use, small storage space, convenient to transfer data information between different software.

4. What are the attribute fields?

Bib ID, time, publisher UID, publisher nickname, account authentication, bib original link, bib text, picture link, video link, IP territory, number of reposts, number of comments, number of likes, data type .

5. Sample results

6. Code running environment

# -*- coding: utf-8 -*-# 运行环境           Python3.6+

7. How to use the code

After opening the code file with the compiler, you only need to modify two places to run it;

The first place is the value of the cookie in the replacement code; the second place is the value of the uid in the replacement code. (You can quickly search for the location of cookies and uid in the code by ctrl+F positioning shortcut key)

### 替换成登录后的 cookie,cookie = '将单引号中内容,替换成登录后的 cookie'### uid 是围脖用户的唯一标识uid = '将单引号中内容,替换成要爬取的某博主的'

How to find your own [cookie] and the uid of the user to be crawled? Please refer to: How to get cookie and user UID

 

Supongo que te gusta

Origin blog.csdn.net/wodegeCSDN/article/details/131153097
Recomendado
Clasificación