Scrape Titles of Top100 Google Search Results for a keyword?

 
Hostwinds

Results 1 to 14 of 14
I now use copy+paste mostly but its a tedious job, is there any easier way ...
  1. #1
    meinewelt is offline Junior Member
    Join Date
    Jan 2012
    Posts
    151
    Thanks
    58
    Thanked 58 Times in 34 Posts

    Default Scrape Titles of Top100 Google Search Results for a keyword?

    I now use copy+paste mostly but its a tedious job, is there any easier way to do it? Thanks!

  2. #2
    meinewelt is offline Junior Member
    Join Date
    Jan 2012
    Posts
    151
    Thanks
    58
    Thanked 58 Times in 34 Posts

    Default Re: Scrape Titles of Top100 Google Search Results for a keyword?

    is there no bot that does it? like search for a keyword in google, use first 100 results and extract the titles?

  3. #3
    jacky2002r is offline Junior Member
    Join Date
    Jan 2009
    Posts
    103
    Thanks
    39
    Thanked 70 Times in 30 Posts

    Default Re: Scrape Titles of Top100 Google Search Results for a keyword?

    Download SEO4Firefox or SEOQuake Plugin in Firefox and then use it to scrape Google search results with Title & URL. Cheers

  4. The Following User Says Thank You to jacky2002r For This Useful Post:

    meinewelt (01-10-2013)

  5. #4
    regme is offline Newbies
    Join Date
    Jun 2012
    Posts
    46
    Thanks
    4
    Thanked 10 Times in 6 Posts

    Default Re: Scrape Titles of Top100 Google Search Results for a keyword?

    PHP fucntion preg_match with right regexp can do it in seconds. Can wright it for you tomorrow.

  6. #5
    regme is offline Newbies
    Join Date
    Jun 2012
    Posts
    46
    Thanks
    4
    Thanked 10 Times in 6 Posts

    Default Re: Scrape Titles of Top100 Google Search Results for a keyword?

    Ok, thats what you need. save it with <? .. ?> on hosting with PHP support and run with usage tag key. For example
    http://yoursite.com/get_titles.php?key=lolcats
    PHP Code:

    $keyword_p
    =urlencode($_GET['key']);
    $input=file_get_contents("http://www.google.com/search?q=".$keyword_p."&hl=en&tbs=qdr:m&lr=&sa=X&tbo=1&num=100");
    $regexp "<li class=\"g\"><h3(.*)<\/h3>";

    if(
    preg_match_all("/$regexp/siU"$input$matchesPREG_SET_ORDER)) {

        foreach(
    $matches as $match)     {

            
    $text=$match[0];

            
    $text=strip_tags($text);

            echo 
    $text.'<br>';    }



  7. The Following 4 Users Say Thank You to regme For This Useful Post:

    Franam (07-22-2013), frankweerasinghe (07-22-2013), iTalent (07-15-2013), meinewelt (01-10-2013)

  8. #6
    nanavlad's Avatar
    nanavlad is online now Jr. VIP
    Join Date
    Dec 2009
    Posts
    1,963
    Thanks
    840
    Thanked 677 Times in 491 Posts

    Default Re: Scrape Titles of Top100 Google Search Results for a keyword?

    theres a bot called blog commenting *****

    I think I saw it on the forum. but it scrapes the top 100 or so results from google

  9. #7
    elviswong's Avatar
    elviswong is offline Senior Member
    Join Date
    Nov 2011
    Posts
    869
    Thanks
    143
    Thanked 211 Times in 135 Posts
    Blog Entries
    3

    Default Re: Scrape Titles of Top100 Google Search Results for a keyword?

    Quote Originally Posted by meinewelt View Post
    is there no bot that does it? like search for a keyword in google, use first 100 results and extract the titles?
    Yes i got one !

    EDITED:
    Do you need the urls of the top 100 search of a given keyword ?
    Last edited by elviswong; 01-10-2013 at 08:29 AM.
    --------------> GET THE PORNHUB-ADDMEFAST-AUTOBLOG-STUMBLEUPON-SKYPE-WANELO BOTS HERE <----------
    Along with many other bots. Get an edge on others.....


  10. #8
    meinewelt is offline Junior Member
    Join Date
    Jan 2012
    Posts
    151
    Thanks
    58
    Thanked 58 Times in 34 Posts

    Default Re: Scrape Titles of Top100 Google Search Results for a keyword?

    thankyou so much everyone!

    @regme very kind! you are my php hero now
    Last edited by meinewelt; 01-11-2013 at 10:15 AM.

  11. #9
    regme is offline Newbies
    Join Date
    Jun 2012
    Posts
    46
    Thanks
    4
    Thanked 10 Times in 6 Posts

    Default Re: Scrape Titles of Top100 Google Search Results for a keyword?

    Quote Originally Posted by meinewelt View Post
    thankyou so much everyone!

    @regme very kind! is there a little syntax error in the $keyword_p. line tho?! it seems to produce an error
    It's ok, problem in IP.

    Try this code, if it will not work i'll give you link on script installed on my server.

    PHP Code:
    $keyword_p=urlencode($_GET['key']);$ch curl_init('http://www.google.com/search?q='.trim($keyword_p).'&hl=en&lr=&sa=X&tbo=1&num=100');curl_setopt($chCURLOPT_RETURNTRANSFERtrue);curl_setopt($chCURLOPT_COOKIESESSIONtrue);curl_setopt($chCURLOPT_COOKIEJARdirname (__FILE__)."/cookie.txt");curl_setopt($chCURLOPT_COOKIEFILEdirname (__FILE__)."/cookie.txt");$input curl_exec($ch);

    $regexp "<li class=\"g\"><h3(.*)<\/h3>";
    if(
    preg_match_all("/$regexp/siU"$input$matchesPREG_SET_ORDER)) {
        foreach(
    $matches as $match)     {
            
    $text=$match[0];
            
    $text=strip_tags($text);
            echo 
    $text.'<br>';    }


  12. The Following 2 Users Say Thank You to regme For This Useful Post:

    iTalent (07-15-2013), meinewelt (01-11-2013)

  13. #10
    iTalent is offline Newbies
    Join Date
    Jul 2013
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thumbs up Re: Scrape Titles of Top100 Google Search Results for a keyword?

    Hi, Regme your script worked wonderfully.

    Can u please change this to scrape titles of ezinearticles instead of google

  14. #11
    meinewelt is offline Junior Member
    Join Date
    Jan 2012
    Posts
    151
    Thanks
    58
    Thanked 58 Times in 34 Posts

    Default Re: Scrape Titles of Top100 Google Search Results for a keyword?

    i now get error "Not Found" am probably doing something wrong

    I think there is a big need for a bot that will automatically create in spin format titles (sentences) for keywords from search, so you dont have to fill in manually in senuke and all the other tools ))

    coders feel free to use my idea but i appreciate free license by PM can also beta test

  15. #12
    vodkaa is offline Junior Member
    Join Date
    May 2013
    Posts
    104
    Thanks
    7
    Thanked 20 Times in 9 Posts

    Default Re: Scrape Titles of Top100 Google Search Results for a keyword?

    You should be using a DOM parser for this sort of thing not regex. Try using this: hxxp://simplehtmldom.sourceforge.net/

  16. #13
    regme is offline Newbies
    Join Date
    Jun 2012
    Posts
    46
    Thanks
    4
    Thanked 10 Times in 6 Posts

    Default Re: Scrape Titles of Top100 Google Search Results for a keyword?

    Google sometimes change sourcecoe of search page. Try change string
    $regexp = "<li class=\"g\"><h3(.*)<\/h3>";
    to
    $regexp = "<li class=\"g\">(.*)<\/h3>";

  17. The Following User Says Thank You to regme For This Useful Post:

    meinewelt (07-22-2013)

  18. #14
    Join Date
    Apr 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Scrape Titles of Top100 Google Search Results for a keyword?

    Quote Originally Posted by nanavlad View Post
    theres a bot called blog commenting *****

    I think I saw it on the forum. but it scrapes the top 100 or so results from google

    yes i was also searching for same, but now i forgot the name of that software which can also useful for some top 100 competitor backlink, if you remind the name of that software which scrape the top 100 from google source please inform me

SE Rocket


★Guardians Of The Galaxy Network★ Super Homepage Links | No SERP Rise = 100% Refund!!!

Similar Threads

  1. How can i scrape urls of google search results?
    By jake3340 in forum Black Hat SEO Tools
    Replies: 15
    Last Post: 04-10-2013, 02:06 PM
  2. Replies: 0
    Last Post: 02-22-2011, 11:15 AM
  3. Software to scrape Google search results?
    By simpleonlinetest in forum Link Building
    Replies: 3
    Last Post: 04-08-2010, 07:03 AM
  4. Software to scrape Google search results?
    By simpleonlinetest in forum Black Hat SEO Tools
    Replies: 0
    Last Post: 03-28-2010, 02:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


 



BlackHatWorld on Twitter BlackHatWorld on FaceBook


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109