You can try the example. You can now see how the script goes through all the posts and store them into the outputDirectory. Python 9gagDownloader.py myExportFile.csv outputDirectory Now that you have the CSV in place, fire up a console and run the 9gagDownloader.py script like this: This will start the download of a CSV file containing all the information needed for later. Once you are done with scrolling and no new posts are collected anymore, you can initiate the download by copy and pasting the code from 9gagExtractor.js into the console. You can see which posts are captured in the console log. Enter the URL in the input field at the top of the page and press enter. This will start collecting posts available on the screen. Note, the script will check for new posts on the screen every 0.5 seconds.Ĭopy and paste the complete code from 9gagCollector.js into the browser console and press Enter. You can see which posts have been collected so far in the console.Īfter you executed the script make sure that you scroll all the way down. This script will only download posts which have been loaded(!). This is done by opening the Browser Console (press F12) on the page where you want to download the posts. Simply run pip install requests after installing Python 3.x or by running pip install < requirements.txt.įor 9gagCollector.js and 9gagExtractor.js you only need:įirst of all we have to collect a list of all posts which shall be downloaded later. Requirements:įor 9gagDownloader.py you need the following: The caption of the posts will be used as filenames. These two scripts allows you to download posts from.
0 Comments
Leave a Reply. |