Popular recipes tagged "meta:requires=beautifulsoup"http://code.activestate.com/recipes/tags/meta:requires=beautifulsoup/2016-02-18T17:26:50-08:00ActiveState Code RecipesBatch download all the pinned pictures in your Pinterest board to a local folder (Python) 2016-02-18T17:26:50-08:00Alfred Wanghttp://code.activestate.com/recipes/users/4193275/http://code.activestate.com/recipes/580611-batch-download-all-the-pinned-pictures-in-your-pin/ <p style="color: grey"> Python recipe 580611 by <a href="/recipes/users/4193275/">Alfred Wang</a> (<a href="/recipes/tags/batch/">batch</a>, <a href="/recipes/tags/download/">download</a>, <a href="/recipes/tags/picture/">picture</a>, <a href="/recipes/tags/pinterest/">pinterest</a>). </p> <p>Batch download all the pinned pictures in your Pinterest board to a local folder. Be noted: you have to keep your internet browser signed in your Pinterest account first.</p> Convert HTML text to PDF with Beautiful Soup and xtopdf (Python) 2015-01-28T22:20:53-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/579014-convert-html-text-to-pdf-with-beautiful-soup-and-x/ <p style="color: grey"> Python recipe 579014 by <a href="/recipes/users/4173351/">Vasudev Ram</a> (<a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/format/">format</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/pdfwriter/">pdfwriter</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/reportgeneration/">reportgeneration</a>, <a href="/recipes/tags/reporting/">reporting</a>, <a href="/recipes/tags/reportlab/">reportlab</a>, <a href="/recipes/tags/xtopdf/">xtopdf</a>). </p> <p>This recipe shows how to convert the text in an HTML document to PDF. It uses the Beautiful Soup and xtopdf Python libraries. Beautiful Soup is a library for HTML parsing and content extraction. xtopdf is a library for PDF creation from other formats, including text and many others.</p> Python script to find linux distros details from distrowatch (Python) 2015-07-29T18:24:23-07:00Emil george jameshttp://code.activestate.com/recipes/users/4191910/http://code.activestate.com/recipes/579038-python-script-to-find-linux-distros-details-from-d/ <p style="color: grey"> Python recipe 579038 by <a href="/recipes/users/4191910/">Emil george james</a> (<a href="/recipes/tags/beautifulsoup/">beautifulsoup</a>, <a href="/recipes/tags/internet/">internet</a>, <a href="/recipes/tags/module/">module</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/url/">url</a>, <a href="/recipes/tags/web/">web</a>). </p> <p>this script is a simlpe python script to find linux distros details from distrowatch using beautifulsoup,urllib2 modules.The script finds distros distribution details from <a href="http://distrowatch.com" rel="nofollow">distrowatch.com</a> when the distribution name is called as argument.</p> Music Downloader with Wx GUI! (Python) 2013-11-05T02:52:29-08:00Christian Careagahttp://code.activestate.com/recipes/users/4186639/http://code.activestate.com/recipes/578681-music-downloader-with-wx-gui/ <p style="color: grey"> Python recipe 578681 by <a href="/recipes/users/4186639/">Christian Careaga</a> (<a href="/recipes/tags/beautifulsoup/">beautifulsoup</a>, <a href="/recipes/tags/downloader/">downloader</a>, <a href="/recipes/tags/gui/">gui</a>, <a href="/recipes/tags/music/">music</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/urllib/">urllib</a>, <a href="/recipes/tags/urllib2/">urllib2</a>, <a href="/recipes/tags/wxpyton/">wxpyton</a>). </p> <p>Just type in a song and the artist and the program will get the YouTube video, convert it to an mp3 then download it! It has a high quality function and a medium quality function and also the user can choose the directory and name they want the file to be saved to!</p> <p>It is the first time I've used threads and my second time with WxPython! I used BeautifulSoup for the scraping and I'm pretty familiar with that.just thought id share it with you guys and see if you have any feedback or suggestions!</p> <p>also you may get an error saying self.convhtml doesn't exist just wait then retry</p> <p>Here is a link to an screenshot:</p> <p><a href="http://adf.ly/XJaoU" rel="nofollow">http://adf.ly/XJaoU</a></p> <p>if you want you can checkout the Github page:</p> <p><a href="http://adf.ly/XGL6P" rel="nofollow">http://adf.ly/XGL6P</a></p> <p>also you will need to make a folder called Files and put a file called dir.txt and in the file write /Files. this is where the music will be downloaded to!</p> <p>I just made the .exe so you can just use that and its easier! Here: <a href="http://adf.ly/XRjRH" rel="nofollow">http://adf.ly/XRjRH</a></p> Send Messages to millions of facebook Users (Python) 2013-07-08T04:33:58-07:00AJay Kumarhttp://code.activestate.com/recipes/users/4187119/http://code.activestate.com/recipes/578594-send-messages-to-millions-of-facebook-users/ <p style="color: grey"> Python recipe 578594 by <a href="/recipes/users/4187119/">AJay Kumar</a> (<a href="/recipes/tags/facebook/">facebook</a>). </p> <p>This script will allow you to send Messages to people who have a username on facebook from an email id you specify in the script.Although message will not be sent to their inbox,if you're not a friend but it will be sent to other category.</p> handling embedded email images in python (Python) 2012-03-02T12:43:51-08:00Gregory Nicholashttp://code.activestate.com/recipes/users/4180332/http://code.activestate.com/recipes/578058-handling-embedded-email-images-in-python/ <p style="color: grey"> Python recipe 578058 by <a href="/recipes/users/4180332/">Gregory Nicholas</a> (<a href="/recipes/tags/appengine/">appengine</a>, <a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/embedded_image/">embedded_image</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>this code finds all embedded images in the email and replaces them with an appropriate img tag.</p> Show all the telecommuting jobs from the Python Job Board (Python) 2011-12-09T07:38:28-08:00Victor Yanghttp://code.activestate.com/recipes/users/627255/http://code.activestate.com/recipes/577979-show-all-the-telecommuting-jobs-from-the-python-jo/ <p style="color: grey"> Python recipe 577979 by <a href="/recipes/users/627255/">Victor Yang</a> (<a href="/recipes/tags/html/">html</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/screenscrape/">screenscrape</a>). </p> <p>It is running as a cronjob on a VPS(Virutal Private Server). The output html can be served by any web server. </p> handling embedded email images in python (Python) 2011-10-26T15:31:45-07:00Simeon Shpizhttp://code.activestate.com/recipes/users/4178609/http://code.activestate.com/recipes/577923-handling-embedded-email-images-in-python/ <p style="color: grey"> Python recipe 577923 by <a href="/recipes/users/4178609/">Simeon Shpiz</a> (<a href="/recipes/tags/appengine/">appengine</a>, <a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/embedded_image/">embedded_image</a>, <a href="/recipes/tags/python/">python</a>). Revision 2. </p> <p>this code finds all embedded images in the email and replaces them with an appropriate img tag.</p> Twitter incremental backup in YAML format - by HTML get and parse (Python) 2011-09-24T18:09:00-07:00Robert Lujohttp://code.activestate.com/recipes/users/4044016/http://code.activestate.com/recipes/577877-twitter-incremental-backup-in-yaml-format-by-html-/ <p style="color: grey"> Python recipe 577877 by <a href="/recipes/users/4044016/">Robert Lujo</a> (<a href="/recipes/tags/backup/">backup</a>, <a href="/recipes/tags/twitter/">twitter</a>, <a href="/recipes/tags/yaml/">yaml</a>). </p> <p>Yet another script for backing up Twitter posts (statuses). More information can be found <a href="http://robert-lujo.com/post/10603896621/twitter-backup">here</a>.</p> <p>The script is based on <a href="http://code.activestate.com/recipes/576594/" rel="nofollow">http://code.activestate.com/recipes/576594/</a>, <a href="http://movingtofreedom.org/2009/03/18/python-script-for-backing-up-twitter-statuses/." rel="nofollow">http://movingtofreedom.org/2009/03/18/python-script-for-backing-up-twitter-statuses/.</a></p> Wiki Recent Changes Checker (Python) 2010-12-28T07:27:25-08:00Ryhttp://code.activestate.com/recipes/users/4176376/http://code.activestate.com/recipes/577522-wiki-recent-changes-checker/ <p style="color: grey"> Python recipe 577522 by <a href="/recipes/users/4176376/">Ry</a> (<a href="/recipes/tags/beautifulsoup/">beautifulsoup</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/ubuntu/">ubuntu</a>, <a href="/recipes/tags/wiki/">wiki</a>). </p> <p>Basic script that will check and see if there have been any recent changes to a Wikimedia. Used for low use Wikimedia sites to keep an eye on them. I run this whenever my box starts and it will open the browser along with a few other windows that open.</p> Website Text Search (Python) 2010-09-11T17:32:01-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577388-website-text-search/ <p style="color: grey"> Python recipe 577388 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/html/">html</a>, <a href="/recipes/tags/http/">http</a>, <a href="/recipes/tags/url/">url</a>, <a href="/recipes/tags/urllib2/">urllib2</a>, <a href="/recipes/tags/web/">web</a>). Revision 2. </p> <p>Searches a website recursively for the given text string and prints all URLs containing it.</p> Image Downloader (Python) 2014-02-24T03:49:51-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577385-image-downloader/ <p style="color: grey"> Python recipe 577385 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/html/">html</a>, <a href="/recipes/tags/http/">http</a>, <a href="/recipes/tags/url/">url</a>, <a href="/recipes/tags/urllib2/">urllib2</a>, <a href="/recipes/tags/web/">web</a>). Revision 4. </p> <p>Finds and downloads all images from any given URL.</p> <p>Important note:</p> <p>If your download location path has spaces then put quotes around it!</p> Retrieve Dell Warranty Information for all machines in AD Domain (Python) 2010-02-18T15:51:28-08:00Kenneth Keiterhttp://code.activestate.com/recipes/users/4173089/http://code.activestate.com/recipes/577056-retrieve-dell-warranty-information-for-all-machine/ <p style="color: grey"> Python recipe 577056 by <a href="/recipes/users/4173089/">Kenneth Keiter</a> (<a href="/recipes/tags/active_directory_scripts/">active_directory_scripts</a>, <a href="/recipes/tags/ad/">ad</a>, <a href="/recipes/tags/dell/">dell</a>, <a href="/recipes/tags/domain/">domain</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/warranty/">warranty</a>, <a href="/recipes/tags/windows/">windows</a>). </p> <p>This snippet retrieves warranty information for all Dell machines in a domain and outputs a CSV of the results. </p> <p>Should be run on a machine joined to an active directory or NT4 domain. May need to be updated to parse Dell's website if they update it (since they have no service tag API).</p> bier-soup.py, a small example of BeautifulSoup (Python) 2009-07-24T05:59:43-07:00denishttp://code.activestate.com/recipes/users/4168005/http://code.activestate.com/recipes/576841-bier-souppy-a-small-example-of-beautifulsoup/ <p style="color: grey"> Python recipe 576841 by <a href="/recipes/users/4168005/">denis</a> (<a href="/recipes/tags/beautifulsoup/">beautifulsoup</a>, <a href="/recipes/tags/bier/">bier</a>). Revision 3. </p> <p>bier-soup.py reads html tables like those in <a href="http://www.bier1.de" rel="nofollow">http://www.bier1.de</a> and writes plain text files, as a small example of BeautifulSoup</p> Simple Web Crawler (Python) 2011-01-31T21:57:58-08:00James Millshttp://code.activestate.com/recipes/users/4167757/http://code.activestate.com/recipes/576551-simple-web-crawler/ <p style="color: grey"> Python recipe 576551 by <a href="/recipes/users/4167757/">James Mills</a> (<a href="/recipes/tags/crawler/">crawler</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/parsing/">parsing</a>, <a href="/recipes/tags/web/">web</a>). Revision 2. </p> <p>NOTE: This recipe has been updated with suggested improvements since the last revision.</p> <p>This is a simple web crawler I wrote to test websites and links. It will traverse all links found to any given depth.</p> <p>See --help for usage.</p> <p>I'm posting this recipe as this kind of problem has been asked on the Python Mailing List a number of times... I thought I'd share my simple little implementation based on the standard library and BeautifulSoup.</p> <p>--JamesMills</p> Backup/download your tweets or anyone's tweets. (Python) 2008-12-25T10:08:07-08:00Zach Seiftshttp://code.activestate.com/recipes/users/4168562/http://code.activestate.com/recipes/576594-backupdownload-your-tweets-or-anyones-tweets/ <p style="color: grey"> Python recipe 576594 by <a href="/recipes/users/4168562/">Zach Seifts</a> (<a href="/recipes/tags/tweets/">tweets</a>, <a href="/recipes/tags/twitter/">twitter</a>). Revision 3. </p> <p>A quick script that lets you download all of your tweets and write them to a text file. </p> Search Google scholar (Python) 2007-07-13T15:20:12-07:00Yusdi Santosohttp://code.activestate.com/recipes/users/4068334/http://code.activestate.com/recipes/523047-search-google-scholar/ <p style="color: grey"> Python recipe 523047 by <a href="/recipes/users/4068334/">Yusdi Santoso</a> . </p> <p>This code allows you to search Google scholar from Python code. The result is returned in a nice dictionary format with each field addressed by its key.</p>