Latest recipes tagged "urllib2" Code RecipesPython script to login to a website and convert required html page to pdf (Python) 2015-07-29T18:28:25-07:00Emil george james <p style="color: grey"> Python recipe 579081 by <a href="/recipes/users/4191910/">Emil george james</a> (<a href="/recipes/tags/bs4/">bs4</a>, <a href="/recipes/tags/pyhon/">pyhon</a>, <a href="/recipes/tags/pyqt4/">pyqt4</a>, <a href="/recipes/tags/python_scripts/">python_scripts</a>, <a href="/recipes/tags/urllib2/">urllib2</a>). </p> <p>This login script will allow you to login a website with python. After logging in, You now have access to all the pages for “members only” accessed with python and it can convert the required pages to pdf format save automatically in your /home/.</p> <p>In this script i use anna university official website to get the exam result after that it convert the result page into pdf format and save to /home/.</p> <p>Modules used :</p> <ol> <li><p>urllib2</p></li> <li><p>BeautifulSoup(bs4)</p></li> <li><p>requests</p></li> <li><p>sys</p></li> <li><p>PyQt4</p></li> </ol> <p><a href="" rel="nofollow"></a></p> Music Downloader with Wx GUI! (Python) 2013-11-05T02:52:29-08:00Christian Careaga <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="" rel="nofollow"></a></p> <p>if you want you can checkout the Github page:</p> <p><a href="" rel="nofollow"></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="" rel="nofollow"></a></p> Music Downloader (Python) 2013-05-25T06:52:51-07:00Christian Careaga <p style="color: grey"> Python recipe 578530 by <a href="/recipes/users/4186639/">Christian Careaga</a> (<a href="/recipes/tags/download/">download</a>, <a href="/recipes/tags/downloader/">downloader</a>, <a href="/recipes/tags/music/">music</a>, <a href="/recipes/tags/program/">program</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/python_scripts/">python_scripts</a>, <a href="/recipes/tags/selenium/">selenium</a>, <a href="/recipes/tags/urllib/">urllib</a>, <a href="/recipes/tags/urllib2/">urllib2</a>). </p> <p>A Python Program i wrote that downloads music from the web</p> Multithreading Downloader Class (Python) 2012-07-22T07:44:20-07:00Itay Brandes <p style="color: grey"> Python recipe 578220 by <a href="/recipes/users/4182927/">Itay Brandes</a> (<a href="/recipes/tags/downloader/">downloader</a>, <a href="/recipes/tags/multithread/">multithread</a>, <a href="/recipes/tags/multithreading/">multithreading</a>, <a href="/recipes/tags/urllib/">urllib</a>, <a href="/recipes/tags/urllib2/">urllib2</a>, <a href="/recipes/tags/urlopen/">urlopen</a>). </p> <p>Garbs files from the web using multithreading in an attempt to enhance transfer rate.</p> ActiveState recipe statistics (Python) 2011-06-02T14:52:50-07:00Kaan Ozturk <p style="color: grey"> Python recipe 577732 by <a href="/recipes/users/4178179/">Kaan Ozturk</a> (<a href="/recipes/tags/html/">html</a>, <a href="/recipes/tags/regular_expressions/">regular_expressions</a>, <a href="/recipes/tags/statistics/">statistics</a>, <a href="/recipes/tags/urllib2/">urllib2</a>, <a href="/recipes/tags/web/">web</a>). Revision 2. </p> <p>Downloads "All Recipe Authors" pages in ActiveState, uses regular expressions to parse author name and number of their recipes on each page. Finally, it displays the recipe submission distribution (the count of how many authors have submitted how many recipes each).</p> Random URL (Python) 2010-09-12T22:23:09-07:00FB36 <p style="color: grey"> Python recipe 577389 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>). </p> <p>Finds and displays a random webpage from the Internet. (Warning: It may take a while!)</p> Website Text Search (Python) 2010-09-11T17:32:01-07:00FB36 <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:00FB36 <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> Downloading website's favicon (Python) 2010-03-15T13:40:29-07:00Łukasz Fidosz <p style="color: grey"> Python recipe 577114 by <a href="/recipes/users/4173347/">Łukasz Fidosz</a> (<a href="/recipes/tags/favicon/">favicon</a>, <a href="/recipes/tags/urllib2/">urllib2</a>, <a href="/recipes/tags/websites/">websites</a>). </p> <p>Downloading favicon of the website and save it to file, if website doesn't have favicon using default one.</p> Simple Web Crawler (Python) 2009-08-18T13:21:49-07:00manuelaraoz <p style="color: grey"> Python recipe 576884 by <a href="/recipes/users/4171484/">manuelaraoz</a> (<a href="/recipes/tags/crawler/">crawler</a>, <a href="/recipes/tags/htmlparser/">htmlparser</a>, <a href="/recipes/tags/urllib2/">urllib2</a>). </p> <p>A simple class that starts in a url and follows links to a desired depth.</p> Pastebin Upload (Python) 2013-05-26T10:54:25-07:00Joe Smith <p style="color: grey"> Python recipe 576805 by <a href="/recipes/users/4168055/">Joe Smith</a> (<a href="/recipes/tags/code/">code</a>, <a href="/recipes/tags/post/">post</a>, <a href="/recipes/tags/source/">source</a>, <a href="/recipes/tags/urllib2/">urllib2</a>). Revision 2. </p> <p>A little script I made for some buddies and I. We are constantly collaborating on code. This scrips takes a source code file as it's parameter and uploads it to <a href="" rel="nofollow"></a> or any sub domain of pastebin. I integrated it with the righ click window in windows. Without that integration the script wouldn't be as cool! Hope others find it useful.</p>