+ 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
    215

    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
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    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
    9,831

    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
    215

    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
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    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
    215

    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
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    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
    215

    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
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    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
    215

    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
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    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)

Similar Threads

  1. Macro to scan websites on list for blog?
    By wonderd in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-07-2019, 12:28 PM
  2. [SOLVED] Macro: Auto Open/Login to Websites
    By Jim Clayton in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-14-2018, 12:42 AM
  3. RFID Time and date stamp on scan and off scan
    By forey89 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2015, 06:46 AM
  4. VBA/macro for scraping prices from multiple websites
    By tylersfd2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-03-2015, 07:51 PM
  5. Link websites with the macro
    By richankur in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2015, 09:25 AM
  6. Scan-in, Scan-out tool inventory with barcode scanner
    By rycr023 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2014, 11:52 AM
  7. Macro to control ie and search some websites.
    By HarryCallaghan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2013, 09:54 AM

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