in reply to Re^2: Use perl script to get google scholar results for a query
in thread Use perl script to get google scholar results for a query

Do you want mean something like this? This is from the examples folder of the module, except search_generic..

#!/usr/bin/env perl use strict; use warnings; use Data::Dump; use My::Google::Scholar; my $scholar = My::Google::Scholar->new( { num => 100, as_subj => 'eng' }); # dd $scholar; my $papers = $scholar->search_generic( 'p53' ); dd $papers; for my $p (@$papers ) { print "Title \"", $p->title(), "\", cited by ", $p->cited_by(), " +\n"; } __END__ [ bless({ _authors => ["WS E"], _cited_by => 7891, _pub => "Deiry, T Tokino, VE Velculescu, DB Levy\x{2026} - Ce +ll, 1993 - Elsevier ", _title => "< i> WAF1</i>, a potential mediator of p53 tumor sup +pressio", _type => "ARTICLE", _url => "http://www.sciencedirect.com/science/article/pii/009 +286749390500P", }, "My::Google::Scholar::Paper"), bless({ _authors => ["MS Greenblatt", "WP Bennett", "M Hollstein", "CC Ha +rris"], _cited_by => 3737, _pub => "Cancer research, 1994 - AACR ", _title => "[C] Mutations in the p53 tumor suppressor gene: clue +s to cancer etiology and molecular pathogenesi", _type => "CITATIONC", _url => "http://cancerres.aacrjournals.org/content/54/18/4855 +.short", }, "My::Google::Scholar::Paper"), bless({ _authors => ["AJ Levine", "J Momand", "CA Finlay"], _cited_by => 3987, _pub => "Nature, 1991 - test.europepmc.org ", _title => "The p53 tumour suppressor gene", _type => "ARTICLE", _url => "http://test.europepmc.org/abstract/MED/2046748", }, "My::Google::Scholar::Paper"), bless({ _authors => ["MHG Kubbutat", "SN Jones", "KH Vousden"], _cited_by => 2512, _pub => "Nature, 1997 - nature.com ", _title => "Regulation of p53 stability by Mdm", _type => "ARTICLE", _url => "http://www.nature.com/nature/journal/v387/n6630/abs/ +387299a0.html", }, "My::Google::Scholar::Paper"), bless({ _authors => ["WS E"], _cited_by => 1800, _pub => "Deiry, SE Kern, J Pietenpol - Nat. Genet, 1992 - res +earchgate.net ", _title => "[PDF] p53 binding sites in transposon", _type => "PDFPDF", _url => "http://www.researchgate.net/publication/221976854_P5 +3_binding_sites_in_transposons/file/9fcfd5080518409cd7.pdf", }, "My::Google::Scholar::Paper"), bless({ _authors => ["AR Clarke", "CA Purdie", "DJ Harrison", "RG Morris" +, "CC Bir"], _cited_by => 2357, _pub => "Nature, 1993 - nature.com ", _title => "Thymocyte apoptosis induced by p53-dependent and ind +ependent pathway", _type => "ARTICLE", _url => "http://www.nature.com/nature/journal/v362/n6423/abs/ +362849a0.html", }, "My::Google::Scholar::Paper"), bless({ _authors => ["M Toshiyuki", "JC Reed"], _cited_by => 3871, _pub => "Cell, 1995 - Elsevier ", _title => "[HTML] Tumor suppressor p53 is a direct transcriptio +nal activator of the human< i> bax</i> gen", _type => "HTMLHTML", _url => "http://www.sciencedirect.com/science/article/pii/009 +2867495904123", }, "My::Google::Scholar::Paper"), bless({ _authors => ["SW Lowe", "EM Schmitt", "SW Smith", "BA Osborne", " +T Jacks"], _cited_by => 2880, _pub => "Nature, 1993 - nature.com ", _title => "p53 is required for radiation-induced apoptosis in m +ouse thymocyte", _type => "ARTICLE", _url => "http://www.nature.com/nature/journal/v362/n6423/abs/ +362847a0.html", }, "My::Google::Scholar::Paper"), bless({ _authors => ["T Miyashita", "S Krajewski", "M Krajewska", "HG Wan +"], _cited_by => 2050, _pub => "Oncogene, 1994 - europepmc.org ", _title => "Tumor suppressor p53 is a regulator of bcl-2 and bax + gene expression in vitro and in vivo", _type => "ARTICLE", _url => "http://europepmc.org/abstract/MED/8183579", }, "My::Google::Scholar::Paper"), bless({ _authors => ["SJ Baker", "S Markowitz", "ER Fearon", "JK Willso"] +, _cited_by => 1751, _pub => "Science, 1990 - sciencemag.org ", _title => "Suppression of human colorectal carcinoma cell growt +h by wild-type p5", _type => "ARTICLE", _url => "http://www.sciencemag.org/content/249/4971/912.short +", }, "My::Google::Scholar::Paper"), bless({ _authors => ["M Hollstein", "D Sidransky", "B Vogelstein", "CC Ha +rris"], _cited_by => 7527, _pub => "Science, 1991 - sciencemag.org ", _title => "p53 mutations in human cancer", _type => "ARTICLE", _url => "http://www.sciencemag.org/content/253/5015/49.short" +, }, "My::Google::Scholar::Paper"), bless({ _authors => ["SW Lowe", "S Bodis", "A McClatchey", "L Remingto"], _cited_by => 1544, _pub => "Science, 1994 - sciencemag.org ", _title => "p53 status and the efficacy of cancer therapy in viv +", _type => "ARTICLE", _url => "http://www.sciencemag.org/content/266/5186/807.short +", }, "My::Google::Scholar::Paper"), bless({ _authors => ["E Yonis"], _cited_by => 2100, _pub => "Rouach, D Resnftzky, J Lotem, L Sachs\x{2026} - 1991 + - nature.com ", _title => "Wild-type p53 induces apoptosis of myeloid leukaemic + cells that is inhibited by interleukin-", _type => "ARTICLE", _url => "http://www.nature.com/nature/journal/v352/n6333/abs/ +352345a0.html", }, "My::Google::Scholar::Paper"), bless({ _authors => ["M Scheffner", "BA Werness", "JM Huibregtse", "AJ Le +vin"], _cited_by => 3284, _pub => "Cell, 1990 - Elsevier ", _title => "The E6 oncoprotein encoded by human papillomavirus t +ypes 16 and 18 promotes the degradation of p5", _type => "ARTICLE", _url => "http://www.sciencedirect.com/science/article/pii/009 +2867490904098", }, "My::Google::Scholar::Paper"), bless({ _authors => ["Y Haupt", "R Maya", "A Kazaz", "M Oren"], _cited_by => 3095, _pub => "Nature, 1997 - tu030174.ip.tsinghua.edu.cn ", _title => "[PDF] Mdm2 promotes the rapid degradation of p5", _type => "PDFPDF", _url => "ftp://tu030174.ip.tsinghua.edu.cn/pub0/study/04.%E7% +94%9F%E7%89%A9%E8%AF%BE%E4%BB%B6/molecular%20biology%20of%20the%20gen +e/%E7%AC%AC%E4%BA%8C%E6%AC%A1%E4%B8%8A%E8%AF%BE%E8%AF%BE%E4%BB%B6%E4% +BB%A5%E5%8F%8A%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE/Mdm2_rapid_degrada +tion_Nature_387296a0.pdf", }, "My::Google::Scholar::Paper"), bless({ _authors => ["AJ Levine"], _cited_by => 6866, _pub => "cell, 1997 - Cell Press ", _title => "[C] p53, the cellular gatekeeper for growth and divi +sio", _type => "CITATIONC", }, "My::Google::Scholar::Paper"), bless({ _authors => ["J Momand", "GP Zambetti", "DC Olson", "D Georg"], _cited_by => 2623, _pub => "Cell, 1992 - Elsevier ", _title => "The< i> mdm-2</i> oncogene product forms a complex w +ith the p53 protein and inhibits p53-mediated transactivatio", _type => "ARTICLE", _url => "http://www.sciencedirect.com/science/article/pii/009 +286749290644R", }, "My::Google::Scholar::Paper"), bless({ _authors => ["B Vogelstein", "D Lane", "AJ Levine"], _cited_by => 4980, _pub => "Nature, 2000 - nature.com ", _title => "Surfing the p53 networ", _type => "ARTICLE", _url => "http://www.nature.com/nature/journal/v408/n6810/full +/408307a0.html", }, "My::Google::Scholar::Paper"), bless({ _authors => ["MB Kastan", "Q Zhan", "WS E"], _cited_by => 3028, _pub => "Deiry, F Carrier, T Jacks\x{2026} - Cell, 1992 - Els +evier ", _title => "A mammalian cell cycle checkpoint pathway utilizing +p53 and< i> GADD45</i> is defective in ataxia-telangiectasi", _type => "ARTICLE", _url => "http://www.sciencedirect.com/science/article/pii/009 +2867492905932", }, "My::Google::Scholar::Paper"), bless({ _authors => ["SW Lowe", "HE Ruley", "T Jacks", "DE Housman"], _cited_by => 3027, _pub => "Cell, 1993 - Elsevier ", _title => "p53-dependent apoptosis modulates the cytotoxicity o +f anticancer agent", _type => "ARTICLE", _url => "http://www.sciencedirect.com/science/article/pii/009 +2867493907197", }, "My::Google::Scholar::Paper"), ] Title "< i> WAF1</i>, a potential mediator of p53 tumor suppressio", c +ited by 7891 Title "[C] Mutations in the p53 tumor suppressor gene: clues to cancer + etiology and molecular pathogenesi", cited by 3737 Title "The p53 tumour suppressor gene", cited by 3987 Title "Regulation of p53 stability by Mdm", cited by 2512 Title "[PDF] p53 binding sites in transposon", cited by 1800 Title "Thymocyte apoptosis induced by p53-dependent and independent pa +thway", cited by 2357 Title "[HTML] Tumor suppressor p53 is a direct transcriptional activat +or of the human< i> bax</i> gen", cited by 3871 Title "p53 is required for radiation-induced apoptosis in mouse thymoc +yte", cited by 2880 Title "Tumor suppressor p53 is a regulator of bcl-2 and bax gene expre +ssion in vitro and in vivo", cited by 2050 Title "Suppression of human colorectal carcinoma cell growth by wild-t +ype p5", cited by 1751 Title "p53 mutations in human cancer", cited by 7527 Title "p53 status and the efficacy of cancer therapy in viv", cited by + 1544 Title "Wild-type p53 induces apoptosis of myeloid leukaemic cells that + is inhibited by interleukin-", cited by 2100 Title "The E6 oncoprotein encoded by human papillomavirus types 16 and + 18 promotes the degradation of p5", cited by 3284 Title "[PDF] Mdm2 promotes the rapid degradation of p5", cited by 3095 + Title "[C] p53, the cellular gatekeeper for growth and divisio", cited + by 6866 Title "The< i> mdm-2</i> oncogene product forms a complex with the p53 + protein and inhibits p53-mediated transactivatio", cited by 2623 Title "Surfing the p53 networ", cited by 4980 Title "A mammalian cell cycle checkpoint pathway utilizing p53 and< i> + GADD45</i> is defective in ataxia-telangiectasi", cited by 3028 Title "p53-dependent apoptosis modulates the cytotoxicity of anticance +r agent", cited by 3027

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^4: Use perl script to get google scholar results for a query
by Anonymous Monk on Apr 08, 2014 at 15:46 UTC
    Thats extremely helpful and now the module makes a lot more sense to me. The one last night I would like to do is to print the "preview" of the text that matches the query from within the articles. On google scholar output HTML I think that this is the

    <div class="gs_rs"

    For example, on the top hit for the query 'p53' in google scholar this preview text appears (below title and authors and above the 'Cited by etc links) as Abstract The ability of p53 to activate transcription from specific sequences suggests that genes induced by p53 may mediate its biological role as a tumor suppressor. Using a subtractive hybridization approach, we identified a gene, named WAF1, whose induction ...

    Would you recommend just going for a regex approach or is there a better way using the module. Thanks again, this has help a ton.

      "Would you recommend just going for a regex approach or is there a better way using the module?"

      To be honest: I don't know or i'm not sure - as you like :-(

      Before reading your post i wasn't even aware didn't know anything about Google_Scholar.

      I searched a little bit and then played around with My::Google::Scholar.

      I also needed to install the dependencies of the module as well as the right Perl version.

      I would recommend that you write some code and come back when you run into problems.

      If so, help is guaranteed ;-)

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

        Can you elaborate how you got access to "My::Google::Scholar" to use it? I'm new to downloading Perl modules off Google Code. Installing off of CPAN didn't work. The source code file isn't availible for downnload from Google Code. When I checked it out with svn and did the whole perl/make install process I got the error that I didn't have write permissions. So, what were the steps you did to use it this module?