Tham khảo tài liệu '100 thủ thuật cao cấp với công cụ tìm kiếm google part 9', công nghệ thông tin, tin học văn phòng phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 330 100 THÚ THUẬT CAO CẤP VỚI CÓNG cụ TÌM KIÊM GOOGLE groupname Spelling Spelling Spelling Fill in placeholder values since it doesn t matter. CAVEAT All creative lines must be spelled correctly. See Adwords editorial guidelines print STDERR Creating a placeholder ad. agent- current_form- value adGroupName agent- current_form- value agent- current_form- value agent- current_form- va1ue agent- current_form- value agent- current_form- value Sagent- click save print STDERR ok n On Keywords page print STDERR Plugging in your keywords. agenb currentjorm- value keywords keyword_string agent- click save print STDERR ok n On Price Table Page but no values are in the table print STDERR Recalculating keyword values. agent- click recalculate print STDERR ok n Now on Price Table page and the table now has values. print STDERR Gleaning keyword values and building you a csv. n n my p HTML TableContentParser- new my Stables p- parse agent- content Table with the values is has its class attribute set to report. my @report_tables grep exists _- lclass and _- class eq report Stables Assuming that Google on has on report table per page. my Stable report_tables 0 Make CSV object out here instead of having loop make X of them. my csv Text CSV- new Get the rows of cells out of Stable s convoluted structure. TODO naming of variables here is odd but check out Dumper @row_cell_objs . my @row_cell_objs grep I _- celìsl I @ table- rows I CHƯƠNG 7. QUẢNG CÁO 331 my @data_cells map _ cells I @row_cell_objs foreach my row table- headersl @data_cells I Just being safe here with references. iff ref Srow eq ARRAY Eliminate title cell and cells in rightmost column. They contain only links. my @table_cells grep I not exists _- class or _- classl ne rightcolumn I @ row my @data map I _- ldatal @table_cells foreach data I Remove HTML tags and surrounding whitespace. s A g s A s sAs sA lt g Number of clicks .