[HELP] How do I write a python script

aka_ab

Regular Member
Joined
Dec 1, 2017
Messages
262
Reaction score
92
Is it possible to write a python script that:
1) Mass downloads videos with tags from a site
2) Uploads the videos in openload
3) Embed the videos in my wordpress site and assign tags to it

If yes, how do I start.I have some knowledge in selenium...
 
You can start by learning more about selenium and python :)
The main problem is when i upload the videos to openload, I cannot retain the tags! How can I relate the tags to the respective videos while embedding?
Also, is BeautifulSoup a better option than selenium?
 
You're not giving enough details to give you an answer.
Selenium is a web automation (browser) framework while beautiful soup is a parsing library, two different things, but they have few things in common.
 
You're not giving enough details to give you an answer.
Selenium is a web automation (browser) framework while beautiful soup is a parsing library, two different things, but they have few things in common.
I have already written a script using selenium to download videos from a site. But I am not able to get the tags with it! Even if I manage to get the tags, the video I downloaded must first uploaded in the video hosting and the embed code must be placed in my site. And the program should be able to assign tags to respective videos.
 
You should learn about webrequests instead.
 
I have already written a script using selenium to download videos from a site. But I am not able to get the tags with it! Even if I manage to get the tags, the video I downloaded must first uploaded in the video hosting and the embed code must be placed in my site. And the program should be able to assign tags to respective videos.

Based on this, I assume that you've already downloaded a bunch of videos without fetching the tags. Let's say that you've fetched the tags when you downloaded the videos, you have to save the tags somewhere along with video's title or video's name to keep track, and this could be either *.txt file or local database or something else, your choice. It should be something like this:

video1.mp4 - tag1, tag2, tag3, tag4, tag5
video2.mp4 - tag6, tag7, tag8, tag9, tag10

Of course, you might need to store the videos' titles in this too! Or you use the file's name as the video's title. Your choice, actually.

After that, you upload into video hosting and wait for a long timeeeeee until it's finished, get the URL or whatever the embed code and put into your site. It's a really long process, but this is usually how it's done.

SEOBeginner
 
Based on this, I assume that you've already downloaded a bunch of videos without fetching the tags. Let's say that you've fetched the tags when you downloaded the videos, you have to save the tags somewhere along with video's title or video's name to keep track, and this could be either *.txt file or local database or something else, your choice. It should be something like this:

video1.mp4 - tag1, tag2, tag3, tag4, tag5
video2.mp4 - tag6, tag7, tag8, tag9, tag10

Of course, you might need to store the videos' titles in this too! Or you use the file's name as the video's title. Your choice, actually.

After that, you upload into video hosting and wait for a long timeeeeee until it's finished, get the URL or whatever the embed code and put into your site. It's a really long process, but this is usually how it's done.

SEOBeginner
Yes, that is what i was looking for...Can it be fully automated? When it is embedded it must use the tags from file!
 
Also, is BeautifulSoup a better option than selenium?

It depends on the context. In some cases you have no choice but to use selenium. That choice is basically dictated by wether or not the page executes javascript in order to render the content or accomplish the task your after. A good rule of thumb is to start with requests and beautiful soup, then move on to selenium when you see the former option won't work. With these kinds of things, you should know pretty quickly. If you are every trying to automate something that doesn't want to be automated (bot protection for example, searching google or making accounts) everything becomes more difficult.
 
It depends on the context. In some cases you have no choice but to use selenium. That choice is basically dictated by wether or not the page executes javascript in order to render the content or accomplish the task your after. A good rule of thumb is to start with requests and beautiful soup, then move on to selenium when you see the former option won't work. With these kinds of things, you should know pretty quickly. If you are every trying to automate something that doesn't want to be automated (bot protection for example, searching google or making accounts) everything becomes more difficult.
Thanks!
 
Yes, that is what i was looking for...Can it be fully automated? When it is embedded it must use the tags from file!
Yes, it CAN be fully automated. How good will the script be? That's another story. It depends on the developer, haha.
 
Back
Top