Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: cs@zip.com.au Newsgroups: comp.lang.python Subject: Re: Python text file fetch specific part of line Date: Fri, 29 Jul 2016 08:17:25 +1000 Lines: 17 Message-ID: References: <20160728221725.GA26530@cskk.homeip.net> Reply-To: python-list@python.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Trace: news.uni-berlin.de KbciAnVGvALJ/1b02zEOjAh5uvEig+8PZ/tqTdnf4IIg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:text': 0.04; 'subject:Python': 0.05; 'subject:file': 0.07; 'cc:addr:python- list': 0.09; 'xml.': 0.09; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'imdb': 0.16; 'message- id:@cskk.homeip.net': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:io': 0.16; 'received:optusnet.com.au': 0.16; 'received:psf.io': 0.16; 'received:syd.optusnet.com.au': 0.16; 'section?': 0.16; 'simpson': 0.16; 'soup': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'parse': 0.22; 'text,': 0.22; 'txt': 0.22; 'cheers,': 0.22; 'cc:no real name:2**0': 0.22; 'tried': 0.24; 'plain': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'raw': 0.27; 'format,': 0.27; 'url:software': 0.29; 'task': 0.30; 'getting': 0.33; 'received:com.au': 0.33; 'file': 0.34; 'list': 0.34; 'skip:> 10': 0.35; 'quite': 0.35; 'but': 0.36; 'possible': 0.36; 'subject:: ': 0.37; 'method': 0.37; 'charset:us-ascii': 0.37; 'from:no real name:2**0': 0.60; 'your': 0.60; 'provide': 0.61; 'here.': 0.62; 'sample': 0.63; 'beautiful': 0.66; 'cameron': 0.66; 'here': 0.66; 'header:Reply-To:1': 0.67; 'reply-to:no real name:2**0': 0.71; 'reply-to:addr:python.org': 0.84; 'to:addr:gordon': 0.84 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=kPLexIa+XrsL4mdc8kxeNA==:117 a=kPLexIa+XrsL4mdc8kxeNA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=cAmyUtKerLwA:10 a=pGLkceISAAAA:8 a=fGO4tVQLAAAA:8 a=0x2vhHYrAAAA:8 a=vrnE16BAAAAA:8 a=Tgb-yU9JwG8rT3VK_-4A:9 a=CjuIK1q_8ugA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 a=lhOh31jNlvCVFaAdFuvQ:22 a=jKTDQKFe_9NOjXLEHhtL:22 a=D4O83h6meWPcCEhhlUO6:22 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20160728221725.GA26530@cskk.homeip.net> X-Mailman-Original-References: Xref: csiph.com comp.lang.python:111999 On 28Jul2016 19:28, Gordon Levi wrote: >Arshpreet Singh wrote: >>I am writing Imdb scrapper, and getting available list of titles from IMDB >>website which provide txt file in very raw format, Here is the one part of >>file(http://pastebin.com/fpMgBAjc) as the file provides tags like >>Distribution Votes,Rank,Title I want to parse title names, I tried with >>readlines() method but it returns only list which is quite heterogeneous, is >>it possible that I can parse each value comes under title section? > >Beautiful Soup will make your task much easier >. Did you look at his sample data? Plain text, not HTML or XML. Beautiful Soup is not what he needs here. Cheers, Cameron Simpson