<s> """<STR_LIT>""" <EOL> from googleads import dfp <EOL> def main ( client ) : <EOL> content_service = client . GetService ( '<STR_LIT>' , version = '<STR_LIT>' ) <EOL> network_service = client . GetService ( '<STR_LIT>' , version = '<STR_LIT>' ) <EOL> custom_targeting_service = client . GetService ( <EOL> '<STR_LIT>' , version = '<STR_LIT>' ) <EOL> network = network_service . getCurrentNetwork ( ) <EOL> key_id = network [ '<STR_LIT>' ] <EOL> values = [ <EOL> { <EOL> '<STR_LIT:key>' : '<STR_LIT>' , <EOL> '<STR_LIT:value>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:value>' : key_id <EOL> } <EOL> } , <EOL> { <EOL> '<STR_LIT:key>' : '<STR_LIT>' , <EOL> '<STR_LIT:value>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:value>' : '<STR_LIT>' <EOL> } <EOL> } <EOL> ] <EOL> category_filter_query = ( '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> category_filter_statement = dfp . FilterStatement ( <EOL> category_filter_query , values , <NUM_LIT:1> ) <EOL> response = custom_targeting_service . getCustomTargetingValuesByStatement ( <EOL> category_filter_statement . ToStatement ( ) ) <EOL> if '<STR_LIT>' in response : <EOL> category_custom_targeting_value_id = ( response [ '<STR_LIT>' ] [ '<STR_LIT:id>' ] ) <EOL> content_values = [ <EOL> { <EOL> '<STR_LIT:key>' : '<STR_LIT:status>' , <EOL> '<STR_LIT:value>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:value>' : '<STR_LIT>' <EOL> } <EOL> } <EOL> ] <EOL> content_query = '<STR_LIT>' <EOL> content_statement = dfp . FilterStatement ( content_query , content_values ) <EOL> while True : <EOL> response = content_service . getContentByStatementAndCustomTargetingValue ( <EOL> content_statement . ToStatement ( ) , <EOL> category_custom_targeting_value_id ) <EOL> if '<STR_LIT>' in response : <EOL> for content_item in response [ '<STR_LIT>' ] : <EOL> print ( '<STR_LIT>' <EOL> '<STR_LIT>' % ( content_item [ '<STR_LIT:id>' ] , content_item [ '<STR_LIT:name>' ] , <EOL> content_item [ '<STR_LIT:status>' ] ) ) <EOL> content_statement . offset += dfp . SUGGESTED_PAGE_LIMIT <EOL> else : <EOL> break <EOL> print '<STR_LIT>' % response [ '<STR_LIT>' ] <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> dfp_client = dfp . DfpClient . LoadFromStorage ( ) <EOL> main ( dfp_client ) </s>
