Python阿里下拉框关键词连爆挖掘法

​阿里下拉框的关键词,一直是关键词拓展的利器,只要在搜索框中输入一个关键词,就可以得到一批相关词。只要是搜索引擎,都有个小技巧,可瞬间提升上百倍的挖掘效率。并且通过Python实现后,完全可用于大规模关键词的批量挖掘

重要说明:
例如“利用搜索引擎过滤不相关词”,做百度SEO的领域,Z神(公号:SEO前线)就已经写过详细的逻辑;
例如“批量挖掘百度下拉框关键词”,张亚楠(公号:SEO技术流)就已经写过百度下拉框关键词的连爆挖掘方法;
(PS:连爆挖掘这个名字是我取的,显得屌炸天;好写文案)

—————————————-入门版—————————————-

首先,在Chrome的Network中,可以获取到阿里国际站搜索下拉框提示的API地址:

https://connectkeyword.alibaba.com/lenoIframeJson.htm?iframe_delete=true&varname=intelSearchData&keyword=virgin%20hair&searchType=product_en&cateId=66030104&cookieId=&buckettest=&version=2&locale=en_US&callback=jQuery18304141310574479504_1587521207172&ctoken=fljdckmyq2oo&dmtrack_pageid=7060243a0bb57e7a5e9fa6b41719fa32d211bd8f94&_=1587521222417

具体代码实现如下:

def get_sug(word):
    url = 'https://connectkeyword.alibaba.com/lenoIframeJson.htm?iframe_delete=true&varname=intelSearchData&keyword=%s&searchType=product_en&cateId=66030104&cookieId=&buckettest=&version=2&locale=en_US&callback=jQuery18304141310574479504_1587521207172&ctoken=fljdckmyq2oo&dmtrack_pageid=7060243a0bb57e7a5e9fa6b41719fa32d211bd8f94&_=1587521222417' % word

    r = requests.get(url,timeout=10)  # 请求API接口,取消了HTTPS验证
    html = r.text  # 获取返回的内容
    # print(html)
    re_data=re.compile(r'keywords:\'(.*?)\'')
    for i in re.findall(re_data,html):
        print(i)
​
get_sug('virgin hair')

输出结果:
virgin hair
virgin hair bundles
virgin hair cuticle aligned hair
virgin hair ponytail
virgin hair extension
virgin hair wholesale 9a grade
virgin hair vendors paypal accept
virgin hair wigs
virgin hair dropshipping
virgin hair bundles with lace closure

—————————————-进阶版—————————————-

这里有个小技巧,就是在关键词后面输入w,会出现跟拼音以w开头的一系列关键词,比如“virgin hair w”,会出现“virgin hair wholesale 9a grade”,”virgin hair wigs“,“virgin hair closure”等关键词。因此,当我们把a~z遍历一遍,会出现更多关键词。

升级后,代码实现如下:

def get_more_sug(word):
    all_words = []

    for i in 'abcdefghijklmnopqrstuvwxyz':  
        all_words += get_sug(word+' '+i)  # 遍历字母表 | 利用了上一个函数

    return list(set(all_words))  # 去重

print (get_more_sug('virgin hair'))

输入结果为:

['virgin hair packaging', 'virgin hair viet nam', 'virgin hair cream', 'virgin hair extensions free sample', 'virgin hair lace wig', 'virgin hair full lace vendors 10a', 'virgin hair serum', 'virgin hair double drawn', 'virgin hair packaging bags', 'virgin hair reviews', 'virgin hair silk top full lace wigs hidden knots', 'virgin hair clip in', 'virgin hair vendors 9a', 'virgin hair vietnam', 'virgin hair cuticle aligned hair', 'virgin hair indian wig', 'virgin hair vietnamese', 'virgin hair vendors paypal accept', 'virgin hair lots wholesale', 'virgin hair extensions 10a grade', 'virgin hair indian', 'virgin hair vendor factory prices', 'virgin hair body wave', 'virgin hair bundles paypal dropshipping', 'virgin hair lace frontal 13 by 6', 'virgin hair vender', 'virgin hair indian curly', 'virgin hair indian from india', 'virgin hair indonesia', 'virgin hair raw', 'virgin hair bundles 10a', 'virgin hair wholesale 9a grade', 'virgin hair filipino', 'virgin hair with closure', 'virgin hair extensions wigs', 'virgin hair wholesale suppliers uk', 'virgin hair eyelashes', 'virgin hair lace front wig', 'virgin hair double drawn clip', 'virgin hair free sample', 'virgin hair remy', 'virgin hair straight', 'virgin hair v part lace closure', 'virgin hair frontal', 'virgin hair weave', 'virgin hair guangdong china', 'virgin hair vendors 10a', 'virgin hair wigs', 'virgin hair treatment', 'virgin hair bundles', 'virgin hair packaging box', 'virgin hair lace wig vendors', 'virgin hair dropshipping', 'virgin hair with closure vendors', 'virgin hair extention packaging', 'virgin hair bundle with frontal', 'virgin hair raw unprocessed', 'virgin hair bundles brazilian', 'virgin hair removal cream', 'virgin hair russian blonde', 'virgin hair super double drawn', 'virgin hair wigs kosher', 'virgin hair toupee', 'virgin hair deep wave', 'virgin hair india wholesale', 'virgin hair indian extensions', 'virgin hair curly', 'virgin hair full lace platinum wigs', 'virgin hair promotion', 'virgin hair fantasy wigs', 'virgin hair fertilizer', 'virgin hair loose wave', 'virgin hair wholesale from temple', 'virgin hair full lace wigs 8a', 'virgin hair dubai', 'virgin hair ponytail', 'virgin hair extension brazilian', 'virgin hair vendors 10a process', 'virgin hair extension', 'virgin hair wholesale overseas', 'virgin hair bundles with lace closure', 'virgin hair steam processed', 'virgin hair cuticle align', 'virgin hair lace frontal', 'virgin hair bulk wholesale', 'virgin hair drawstring ponytail', 'virgin hair extension double weft', 'virgin hair extensions vendors', 'virgin hair wholesale 10a grade', 'virgin hair bundles straight', 'virgin hair cambodian hair', 'virgin hair paypal', 'virgin hair packaging satin bags', 'virgin hair cuticle aligned hair henan china', 'virgin hair clip ins', 'virgin hair silk base free part closure', 'virgin hair bundels', 'virgin hair lace', 'virgin hair extentions']

—————————————-深度—————————————-

将上面的思路延展一下,如果在关键词后输入两个单词,就会出现以这2个字母为拼音开头的一系列关键词,比如“virgin hair wb”,会出现“virgin hair body wave”,“virgin hair bulk wholesale”。因此,我们又做了升级。

def get_most_sug(word):
    all_words = []

    for i in 'abcdefghijklmnopqrstuvwxyz': 
        for j in 'abcdefghijklmnopqrstuvwxyz': 
            all_words += get_sug(word+' '+i+j)

    return list(set(all_words))  # 去重
print (get_most_sug('virgin hair'))

然后出现了更多关键词

['virgin hair viet nam', 'virgin hair human', 'virgin hair cream', 'virgin hair raw', 'virgin hair lace', 'virgin hair afro kinky dropshipping', 'virgin hair fantasy wigs', 'virgin hair bundles with lace closure', 'virgin hair jerry curl', 'virgin hair with closure vendors', 'virgin hair dropshipping', 'virgin hair vendor factory prices', 'virgin hair korea', 'virgin hair tape in balayag', 'virgin hair double drawn', 'virgin hair lace frontal 13 by 6', 'virgin hair toupee', 'virgin hair paypal', 'virgin hair kinky', 'virgin hair one donor', 'virgin hair bags with drawstring', 'virgin hair bundle with frontal', 'virgin hair boxes', 'virgin hair bulk wholesale', 'virgin hair vender', 'virgin hair super double drawn', 'virgin hair removal cream', 'virgin hair toppers', 'virgin hair treatment', 'virgin hair extensions free sample', 'virgin hair with the pink', 'virgin hair gel', 'virgin hair lots wholesale', 'virgin hair frontal', 'virgin hair wigs kosher', 'virgin hair by grace hair', 'virgin hair bundles straight', 'virgin hair human curly', 'virgin hair wholesale suppliers uk', 'virgin hair black color', 'virgin hair with closure', 'virgin hair eyelashes', 'virgin hair indonesia', 'virgin hair by dy hair vendors', 'virgin hair wigs', 'virgin hair cuticle align', 'virgin hair xuchang', 'virgin hair blonde hair bulk', 'virgin hair fertilizer', 'virgin hair natural', 'virgin hair packaging box', 'virgin hair bundels', 'virgin hair weft kinki', 'virgin hair full lace vendors 10a', 'virgin hair bundles brazilian', 'virgin hair wigs raw', 'virgin hair wholesale 9a grade', 'virgin hair guangdong china', 'virgin hair extention packaging', 'virgin hair lace wig vendors', 'virgin hair brazilian hair in namibia', 'virgin hair vendors paypal accept', 'virgin hair no synthetic', 'virgin hair steam processed', 'virgin hair blonde', 'virgin hair wigs blonde', 'virgin hair reviews', 'virgin hair weave', 'virgin hair weft', 'virgin hair malaysian kinky curly', 'virgin hair packaging bags', 'virgin hair extentions', 'virgin hair v part lace closure', 'virgin hair water wave', 'virgin hair free sample', 'virgin hair promotion', 'virgin hair lace wig', 'virgin hair curly', 'virgin hair mink', 'virgin hair filipino', 'virgin hair indian from india', 'virgin hair indian', 'virgin hair cuticle aligned hair henan china', 'virgin hair with lace closure', 'virgin hair yaki', 'virgin hair loose wave', 'virgin hair wigs curly kinky', 'virgin hair raw unprocessed', 'virgin hair cuticle aligned hair', 'virgin hair drawstring ponytail', 'virgin hair vietnam', 'virgin hair packaging satin bags', 'virgin hair extension', 'virgin hair remy', 'virgin hair bundles paypal dropshipping', 'virgin hair silk top full lace wigs hidden knots', 'virgin hair double drawn clip', 'virgin hair lace front wig', 'virgin hair vietnamese', 'virgin hair extensions vendors', 'virgin hair ponytail', 'virgin hair indian wig', 'virgin hair bundles', 'virgin hair brazilian', 'virgin hair clip in', 'virgin hair ombre', 'virgin hair bangkok', 'virgin hair bundles peruvian', 'virgin hair cambodian hair', 'virgin hair silk base free part closure', 'virgin hair straight', 'virgin hair extensions wigs', 'virgin hair serum', 'virgin hair full lace wigs 8a', 'virgin hair indian extensions', 'virgin hair russian blonde', 'virgin hair vendors 10a', 'virgin hair extension brazilian', 'virgin hair body wave', 'virgin hair body wave cuticle aligned hair', 'virgin hair indian curly', 'virgin hair dubai', 'virgin hair vendors 9a', 'virgin hair wholesale overseas', 'virgin hair lace frontal', 'virgin hair unprocessed', 'virgin hair human indian', 'virgin hair wholesale from temple', 'virgin hair extension double weft', 'virgin hair wigs lace front', 'virgin hair bundles 10a', 'virgin hair glueless full lace wigs', 'virgin hair vendors 10a process', 'virgin hair clip ins', 'virgin hair wholesale 10a grade', 'virgin hair full lace platinum wigs', 'virgin hair india wholesale', 'virgin hair grade 10a guangzhou', 'virgin hair qingdao', 'virgin hair packaging', 'virgin hair deep wave', 'virgin hair extensions 10a grade', 'virgin hair kilograms', 'virgin hair wavy', 'virgin hair bob lace wig']

这里还有一些技巧和思路拓展:

  • 如果用作批量跑词,还需要简单包装下,比如关键词循环,数据保存等。
  • 实际应用中,字母单循环的性价比更高),速度和词数都比较可观。字母双循环,速度慢,词量也并没有那么高。

6 thoughts on “Python阿里下拉框关键词连爆挖掘法”

Leave a Comment