Any way to look if a given keyword is in the Source Code of a website using Google ?

Kierkegaard

Junior Member
Joined
Jul 29, 2022
Messages
131
Reaction score
59
Hey there !

Don't know how to explain this very well but for SEO purpose I want to search using Google all websites containing for example this given piece of HTML in these HTML DOM: "wp-comments-post.php"

Complete line is:
<form action="http://www.wb-amenagements.fr/wp-comments-post.php" method="post" id="commentform" class="comment-form"> (not my website and this is just an example so no matter, dont worry !).

Obviously I just want to make a Python bot that scrap day and night SERP looking for websites where I can build backlinks in the comment section.

I know there is a lot of Google Search Operators but I can't retrieve one that allow me search not into the plain text of a page but in the DOM of it..

Thanks a lot for helping me ! :)
 
Hmmmmm but for my case I want to make my own tool for that and just was looking for a "simple" way to search for this. I ask because I just don't remember how to search this kind of thing in Google, pretty sure a search operator can do that !
 
You can do this on publicwww site. Copy and paste the source there. But there is a limit of number of rows to be shown to free users.
 
Something like this would work on publicwww.com

Code:
<form action="wp-comments-post.php" method="post" id="commentform" class="comment-form">

A python with all the keywords in your niche
can search the keyword on google and go to all the sites one by one and search for this code.
Longer but free.
 
Thanks everybody with your answers ! I prefer go with a DIY solution like @akaseo suggest !
I post here my progress because it can help someone else..:

I manage to find an interesting request (because just go for scrap all websites in a niche is just super super giant and Im like only interested about Wordpress websites because it is the kind of CMS easy to autopost comment with a bot (easier to start with a bot made for one type of website first but Im open to suggestions).
The request is site:.com inurl:dontknowwhattoputherebecausethatdidntmeananything + “laisser un commentaire” + wordpress
I'm sure I can easily upgrade this request, for the moment I meet essentialy websites with comments blocked or in verification mode.


The bot will go to scrap all websites from the SERP of this request and look if these HTML contain: method="post" id="commentform" class="comment-form" if yes so it will check the language of website: lang="fr-FR" (looking only for french websites) and if it got it it will test comment and see if there is a nofollow rule on the <a href> or not..

Don't know to how to check the website topic, I mean, I want to scrapp and collect a biiiiig collection of potentiel backlinks websites to sell backlinks on Fiver or else but I need to gather them by Topic because its more relevant for SEO boost.
 
The bot will go to scrap all websites from the SERP of this request and look if these HTML contain: method="post" id="commentform" class="comment-form" if yes so it will check the language of website: lang="fr-FR" (looking only for french websites) and if it got it it will test comment and see if there is a nofollow rule on the <a href> or not..
That's the way I would do it too.

Don't know to how to check the website topic, I mean, I want to scrapp and collect a biiiiig collection of potentiel backlinks websites to sell backlinks on Fiver or else but I need to gather them by Topic because its more relevant for SEO boost.
There are a few categorization APIs available eg: https://website-categorization.whoisxmlapi.com/api
But they tend to be far too broad IMO. Majestic also provides some topical information if you're planning to include third party metrics as part of your data.
 
Back
Top