Use Python to realize a one-stop automatic video account making money
August 26, 2022
Click on the " Python Artificial Intelligence Technology " above to follow, star or stick to the top Pushed on time at 22:24, delivered as soon as possibleReply to the " big gift package " in the background and send you special benefits
Hello everyone, I am Python artificial intelligence technology
Abstract of this article:
Through simple Python technology, 10,000 videos that can be passed through the video number to be deduplicated are realized, so as to obtain the video number traffic.
Suppose a video has 100 exposures and 10,000 videos, that is, 100w exposures. Winning by quantity will make you no longer worry about traffic.
The codes that appear in this article will be provided to you in full at the end of the article, so that you can start making money projects through the [copy + paste] method.
Friends who pay attention to Wangzhuan should have some understanding of video account delivery. Similar to other platforms, you can publish a video, introduce a product, and hang a recommended purchase link. When a user buys a product through your promotion link, you can Going to money, it's intuitive, isn't it.
From other big V bloggers on the Internet, I took some pictures of the income of making video accounts with goods
Why is everyone starting to roll up video numbers now? The main reason is that the video account has begun to release traffic, and the WeChat traffic is so large, so there are obvious dividends, which is a good opportunity for ordinary people.
Well, if you promote how awesome and worthwhile the video account is, this is the place to go. Personally, I am more optimistic.
Knowing the background, let's talk back to the technology.
Can we take advantage of technology to get a head start on video accounts?
Of course you can, and you can get some traffic through the content in my book ("Python Office Automation"). Next, I will combine some of the knowledge points mentioned in "Python Office Automation" to actually combat a project that can get traffic. , the flow is about the same as cash.
Where is the traffic?
By simply summarizing the content discussed by seniors and experts, we can draw some valuable conclusions:
1. Content that has been popular on other platforms will inevitably become popular again on the video account.
2. We can use the quantity to combat the uncertainty of the platform traffic recommendation algorithm.
3. The short video platform will de-emphasize the content, but will not de-emphasize the sound.
Then using technology to manually generate videos that have undergone platform repeatability verification in batches is a good solution. Combining the previous three conclusions, we can get the following specific steps:
Observe the popular videos on other platforms, such as funny jokes on Douyin, beautiful dancers, etc., and divide and organize the production steps of these videos.
Use the program to generate silent videos in batches according to the production steps, and publish them in multiple accounts, to counteract the uncertainty of the platform algorithm with quantity, and make the acquisition of traffic a deterministic thing.
To get the sound from the same kind of video, because the platform will not de-emphasize the sound, you can use it directly and match it to your own video. Because it is a similar video, there will be no strong sense of violation.
From a variety of popular videos, I found a more difficult example as a demonstration. Based on this example, I wrote the code. When you follow my code to develop your own project, it will be simpler, isn't it very considerate?
Here, I choose to generate a chat video, similar to the following picture:
Searching for this kind of video on Douyin, you will find that the likes are very high, and the exposure must be incredible.
Hmmmm, I know that there are other popular ones recently, such as videos of traditional Chinese medicine , videos of naming , and videos of data display .
These categories are very popular, and traditional Chinese medicine videos have been popular on the video account in the past few weeks, and many friends around have made money on it.
However, this article is a technical article, so I still choose to generate a more difficult chat and funny video, understand the principle of generating this type of video, and you will experience the pleasure of killing chickens with a knife when generating other videos.
Let’s take a look at the difficulties of generating chat and funny videos:
To obtain high-quality funny chat data, you need to use crawler technology, and high-quality chat data is usually chat pictures, so you need to use OCR (text recognition) technology to get the content in the picture
Generate WeChat chat pictures based on funny chat data, not just simple stitching of pictures
Get a lot of similar videos on Douyin, get the sound in the video, and need crawler technology
Compared with other types of videos, chat videos are more difficult to generate. For example, traditional Chinese medicine videos do not need to use OCR technology. It is enough to crawl pictures of old Chinese medicine practitioners, and then simply stitch them into videos. The same is true for other types of videos.
Now, let's do it step by step.
retrieve data
The first step, we need to obtain data, simple Baidu: keywords such as [funny dialogue], [funny jokes] will search for websites, but the content of these websites is of low quality, and many have no logic or lack of data.
Another way of thinking, searching for pictures of [Funny Chat Conversation], you can get relatively high-quality conversation data, as shown below:
These pictures are generally derived from real chat data, so the quality is relatively high, and it is indeed more interesting.
After finding the data, we can write code to crawl it down. To implement this crawler program in Python, first of all, you need a little Python foundation. These contents can be found in Chapters 2 and 3 of the book "Python Office Automation". get.
After reading the basic part, you can directly see the content related to automatically obtaining website information in the book (the first subsection of Chapter 9 of "Python Office Automation").
After this section, you will get the background knowledge of crawler and you can start writing code.
Don't worry, here I have prepared the code for crawling Baidu pictures for you (the complete project code is at the end of the article).
With the knowledge of chapters 2, 3, and 9 in the book, it is not a big problem to understand the code. Although the knowledge is only that, but to use it flexibly, you still need to practice more.
The obtained pictures are as follows:
If we want to generate TCM videos, the same is true. Search for [Traditional Chinese Medicine Master] in Baidu Pictures, and then crawl the pictures.
Compared with traditional Chinese medicine videos, chat videos are more difficult. Obtaining chat pictures is only the first step. We also need to extract text information from pictures. For other types of videos, after obtaining pictures, videos can be generated directly. .
After the chat picture is obtained, it is necessary to extract the information from the picture. We can find the OCR-related interface on the Internet. Here I use an OCR project I developed: imgocr.
Based on the imgocr project, you do not need to find a third-party OCR API, because the OCR model built into the project:
The imgocr project involves operations such as reading and saving image files. See Chapter 8 of "Python Office Automation" to better understand these codes.
After running this project, you can get this effect.
At this point, high-quality chat data is ready.
Generate chat video
Videos are all composed of pictures, as long as a batch of pictures is generated, and then the pictures are spliced together, it becomes a video.
So how do we convert chat data into chat pictures? And chat is a dynamic process, that is, you say a sentence, I reply, so you can't directly generate a complete picture, but you need to generate a picture in the chat, and then stitch it together.
First of all, we need to find a tool for producing WeChat chat pictures, Baidu search [WeChat chat picture generation], we can find many tools to generate WeChat chat pictures, many WeChat merchants will use such tools to generate chat screenshots of customer transactions:
Based on the content of Chapter 9 of "Python Office Automation", you can automatically control the browser, and then obtain the generated WeChat screenshots.
Suppose there are 10 dialogues in a picture, then we need to generate 10 pictures, and then use these 10 pictures to generate videos. Now we want to generate 1w videos, then we need to request this website 10w times, because the website belongs to someone else, There are usually limits that keep us from making large requests. then what should we do?
If you have read Chapter 9 of the book, you will know that the website is mainly constructed of HTML, CSS and JS. Download these files to the local, you will also Similar sites are available.
You can manually save the files used by the website one by one, or you can use the program to save them with one click. It is recommended to use a browser plug-in called Save All Resources, which allows you to save all the elements of the website with one click. When "referencing" other people's websites, Very useful tool.
I found a tool website generated by WeChat chat, used Save All Resources to scrape all the website information, and then used Python to build the website. The code is as follows:
Run the code, and you can get a website of WeChat chat generation tool locally. In addition, search the top technology background of the official account and reply "API interface" to get a surprise gift package.
How you use your website is up to you. WeChat search public number: Java project selection, reply: java to receive information.
The " Four Great Books " of Deep Learning for Python Programmers :
These four books are really good! We all know that there are too many materials for machine learning and deep learning. In the face of massive resources, we often fall into the confusion of "no way to start". And not all books are high-quality resources, and wasting a lot of time is not worth the effort. I recommend these good books to everyone and give a brief introduction.
ways to obtain:
1. Scan the code to follow this official account2. Backstage reply keyword: famous book
▲Long press to scan to follow and reply to the famous book to get it