+ Reply to Thread
Results 1 to 11 of 11

Macro to scan websites for blog?

  1. #1
    Forum Contributor
    Join Date
    05-07-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    213

    Macro to scan websites for blog?

    Hello everyone. On the test attachment. Is there a way a macro can scan the websites in column A to see if their website has a blog?

    The macro would scan the website and its navigation menus for the word "blog". Then in column B next to the corresponding website write "Yes" or "No"
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-14-2019
    Location
    Turkey
    MS-Off Ver
    Office 2010 - 32 Bit
    Posts
    75

    Re: Macro to scan websites for blog?

    Try this;

    Please Login or Register  to view this content.

    .

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    2,986

    Re: Macro to scan websites for blog?


    Duplicate thread, cross posting,

  4. #4
    Forum Contributor
    Join Date
    05-07-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    213

    Re: Macro to scan websites for blog?

    Quote Originally Posted by Haluk View Post
    Try this;

    Please Login or Register  to view this content.

    .
    Hello Haulk. This is what I'm looking for. THANK YOU. However can you tell me a little about the logic?

    For example on the first test website(comfortspecialist.info) it returned a yes, but that website does not have a blog that I can see.

  5. #5
    Registered User
    Join Date
    02-14-2019
    Location
    Turkey
    MS-Off Ver
    Office 2010 - 32 Bit
    Posts
    75

    Re: Macro to scan websites for blog?

    Actually, the code does not look for the web sites if they are housing a "blog" or not but, it just searches the word "blog" in the contents of the source file of the related URL...... just as you have stated in your first message.

    So, in this case; the source of the URL "http://www.comfortspecialist.info/" is containing the word "Blog" 3 times as seen in the picture attached below.

    .Attachment 627899
    Last edited by Haluk; 06-11-2019 at 02:52 PM.

  6. #6
    Forum Contributor
    Join Date
    05-07-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    213

    Re: Macro to scan websites for blog?

    I see. Would it be possible to only scan what's actively showing on the website?

  7. #7
    Registered User
    Join Date
    02-14-2019
    Location
    Turkey
    MS-Off Ver
    Office 2010 - 32 Bit
    Posts
    75

    Re: Macro to scan websites for blog?

    See this;

    Please Login or Register  to view this content.
    .

  8. #8
    Forum Contributor
    Join Date
    05-07-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    213

    Re: Macro to scan websites for blog?

    Quote Originally Posted by Haluk View Post
    See this;

    Please Login or Register  to view this content.
    .
    This did the first website (http://www.comfortspecialist.info/) correctly. However on entry number 11 (http://www.overflowheatingcooling.com/) it returned a yes when there is no blog on that website.

  9. #9
    Registered User
    Join Date
    02-14-2019
    Location
    Turkey
    MS-Off Ver
    Office 2010 - 32 Bit
    Posts
    75

    Re: Macro to scan websites for blog?

    Actually, the web page you mentioned ("http://www.overflowheatingcooling.com/") contains the word "blog" also ..... it is stated in the privacy policies section.

    The following revised code will show you where the word "blog" is mentioned in the web page, starting from 80 characters before and going on for 120 characters where it finds the first match for the word "Blog" or "blog" as seen on the screen (not the HTML source code, plain text of the web page itself).

    Please Login or Register  to view this content.

    .
    Last edited by Haluk; 06-12-2019 at 02:36 PM.

  10. #10
    Forum Contributor
    Join Date
    05-07-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    213

    Re: Macro to scan websites for blog?

    Quote Originally Posted by Haluk View Post
    Actulally, the web page you mentioned ("http://www.overflowheatingcooling.com/")also contains the word "blog" also ..... it is stated in the privacy policies section.

    The following revised code will show you where the word "blog" is mentioned in the web page.

    Please Login or Register  to view this content.

    .
    Oh I see it in the source code however when I go to http://www.overflowheatingcooling.com/ the homepage doesn't actively have the word blog.

    Is there a way for the code to only put the word "Yes" if the homepage itself has the word blog?

    An Idea. Not sure it can be done via VB. But firefox ect. "Find on this page" function would work for what I'm looking for.

  11. #11
    Registered User
    Join Date
    02-14-2019
    Location
    Turkey
    MS-Off Ver
    Office 2010 - 32 Bit
    Posts
    75

    Re: Macro to scan websites for blog?

    This is all that can be done for the time being ....

    I am sure, you will get more then 95% effiency with this code if you try a number of URL's which you think they have a "real blog" on their site.

    Have luck ...

    .
    Last edited by Haluk; 06-12-2019 at 02:06 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1