<gh_stars>1-10
import requests
from lxml import etree

from fofaPlug.vip_cookies import load_cookie


def url_xpath(url):
    headers = load_cookie.out_cookie()
    resp = requests.get(url, headers=headers)
    html = etree.HTML(resp.text)
    # print(resp.text)
    div = html.xpath('//*[@id="__layout"]/div/div[2]/div[1]/div[2]/div[2]/div[2]/div')[0:10]
    list_all = []
    for div_list in div:
        data1 = div_list.xpath('./div[1]/div[1]/span[2]/a/text()')
        data2 = div_list.xpath('./div[2]/div[1]/p[1]/text()')
        data3 = div_list.xpath('./div[2]/div[1]/p[3]/a/text()')
        data4 = div_list.xpath('./div[2]/div[1]/p[5]/a/text()')
        data5 = div_list.xpath('./div[2]/div[1]/p[8]/a/text()')
        data6 = div_list.xpath('./div[2]/div[1]/p[9]/a/text()')
        list = [data1, data2, data3, data4, data5, data6]
        list2 = []
        for i in list:
            if len(i) == 0:
                continue
            else:
                i[0] = i[0].replace('\n', '')
                list2.append(i[0])
        list_all.append(list2)
    resp.close()
    print(url+" list_all done!")
    return list_all

import requests
from lxml import etree

from fofaPlug.vip_cookies import load_cookie


def url_xpath(url):
    headers = load_cookie.out_cookie()
    resp = requests.get(url, headers=headers)
    html = etree.HTML(resp.text)
    # print(resp.text)
    div = html.xpath('//*[@id="__layout"]/div/div[2]/div[1]/div[2]/div[2]/div[2]/div')[0:10]
    list_all = []
    for div_list in div:
        data1 = div_list.xpath('./div[1]/div[1]/span[2]/a/text()')
        data2 = div_list.xpath('./div[2]/div[1]/p[1]/text()')
        data3 = div_list.xpath('./div[2]/div[1]/p[3]/a/text()')
        data4 = div_list.xpath('./div[2]/div[1]/p[5]/a/text()')
        data5 = div_list.xpath('./div[2]/div[1]/p[8]/a/text()')
        data6 = div_list.xpath('./div[2]/div[1]/p[9]/a/text()')
        list = [data1, data2, data3, data4, data5, data6]
        list2 = []
        for i in list:
            if len(i) == 0:
                continue
            else:
                i[0] = i[0].replace('\n', '')
                list2.append(i[0])
        list_all.append(list2)
    resp.close()
    print(url+" list_all done!")
    return list_all
# print(resp.text)