<s> """<STR_LIT>""" <EOL> from pyquery import PyQuery as pq <EOL> import urllib <EOL> import codecs <EOL> text_file = codecs . open ( "<STR_LIT>" , encoding = '<STR_LIT:utf-8>' , mode = "<STR_LIT:w>" ) <EOL> d = pq ( url = '<STR_LIT>' , opener = lambda url , ** kw : urllib . urlopen ( url ) . read ( ) ) <EOL> for e in d ( "<STR_LIT>" ) . items ( ) : <EOL> package_name = e ( "<STR_LIT:a>" ) . html ( ) <EOL> package_link = e ( "<STR_LIT:a>" ) [ <NUM_LIT:0> ] . attrib [ '<STR_LIT>' ] <EOL> if '<STR_LIT:..>' in package_link : <EOL> package_link = package_link . replace ( "<STR_LIT:..>" , '<STR_LIT>' ) <EOL> dd = pq ( url = package_link , opener = lambda url , ** kw : urllib . urlopen ( url ) . read ( ) ) <EOL> package_description = dd ( "<STR_LIT>" ) . html ( ) <EOL> text_file . write ( "<STR_LIT>" % ( package_name , package_link , package_description ) ) <EOL> index += <NUM_LIT:1> </s>
