как вытащить?



  • как вытащить ссылки и их id которые относятся к "type": 4, пример: "multi": 0, "link": "https://twitter.com/pleerru", "price": "0.052", "type": 4, "id": 33900 из текста внизу с помощью регулярки либо чего либо ещё б у меня ничего не получаетсяю

    "[{"multi": 0, "link": "http://twitter.com/home?status=Vikings%20and%20Rams%20on%20Friday%20Night%20%23ImportantStuff%20%23PlanAhead%0D%0AY3liZXJuZXRpY3MtZ292ZXJuYW5jZUBwcm90b25tYWlsLmNvbQ%3D%3D", "price": "0.05", "type": 0, "id": 40185}, {"multi": 0, "link": "http://twitter.com/home?status=%D0%9B%D1%83%D0%B9%D1%88%D0%B8%D0%B5%20%D0%B2%D1%83%D0%BB%D0%BA%D0%B0%D0%BD%20%D0%BA%D0%B0%D0%B7%D0%B8%D0%BD%D0%BE%20%D0%A3%D0%BA%D1%80%D0%B0%D0%B8%D0%BD%D1%8B%20%D1%82%D1%83%D1%82%21%0D%0Ahttps%3A//kozakov.com.ua%0D%0Ahttps%3A//atum.kozakov.com.ua%0D%0Ahttps%3A//aron.kozakov.com.ua%0D%0Ahttps%3A//alba.kozakov.com.ua", "price": "0.063", "type": 1, "id": 40245}, {"multi": 0, "link": "http://twitter.com/home?status=%23ThursdayNightCloud9%20%23ZiteSoda%20%23SoGood%20Y3liZXJuZXRpY3MtZ292ZXJuYW5jZUBwcm90b25tYWlsLmNvbQ%3D%3D", "price": "0.063", "type": 1, "id": 40254}, {"multi": 0, "link": "http://twitter.com/home?status=Do%20you%20book%20company%20travel%3F%20Check%20out%20the%20travel%20management%20platform%20from%20TripAways%E2%80%A4com%20for%20Business%21%0D%0ATrack%20your%20teams%20spend%20and%20gain%20valuab", "price": "0.063", "type": 1, "id": 40341}, {"multi": 0, "link": "http://twitter.com/home?status=WordPress%20Speed%20Optimization%20Services.%20We%27ll%20speed%20up%20your%20website%2C%20and%20optimize%20performance%20https%3A//pagespeed.website%20%20%23pagespeedwebsite", "price": "0.072", "type": 1, "id": 40537}, {"multi": 0, "link": "http://twitter.com/home?status=CUT%20coin%20pool%20is%20alive%21%20Check%20it%20here%20pool.cutcoin.org%20%0D%0ANew%20%23cryptonight%20%23PoScoin%20%23altcoin", "price": "0.072", "type": 1, "id": 41380}, {"multi": 0, "link": "https://twitter.com/Stepan_emelyan", "price": "0.102", "type": 4, "id": 27434}, {"multi": 0, "link": "https://twitter.com/expert_krd", "price": "0.158", "type": 4, "id": 33604}, {"multi": 0, "link": "https://twitter.com/pleerru", "price": "0.052", "type": 4, "id": 33900}, {"multi": 0, "link": "https://twitter.com/Hyperloot", "price": "0.101", "type": 4, "id": 36372}, {"multi": 0, "link": "https://twitter.com/visshap", "price": "0.158", "type": 4, "id": 38709}, {"multi": 0, "link": "https://twitter.com/ArtiSH0KE", "price": "0.158", "type": 4, "id": 39453}, {"multi": 0, "link": "https://twitter.com/mfc_krasn", "price": "0.101", "type": 4, "id": 39812}, {"multi": 0, "link": "https://twitter.com/bestbetsorg", "price": "0.068", "type": 4, "id": 39978}, {"multi": 0, "link": "https://twitter.com/Tati89340450", "price": "0.067", "type": 4, "id": 40000}, {"multi": 0, "link": "https://twitter.com/alexnarov", "price": "0.068", "type": 4, "id": 40006}, {"multi": 0, "link": "https://twitter.com/antibank_io", "price": "0.068", "type": 4, "id": 40014}, {"multi": 0, "link": "https://twitter.com/StarFeederPBets", "price": "0.068", "type": 4, "id": 40075}, {"multi": 0, "link": "https://twitter.com/kopikassa", "price": "0.068", "type": 4, "id": 40076}, {"multi": 0, "link": "https://twitter.com/BriannaghD", "price": "0.068", "type": 4, "id": 40083}, {"multi": 0, "link": "https://twitter.com/DeluxeVulkan", "price": "0.068", "type": 4, "id": 40084}, {"multi": 0, "link": "https://twitter.com/Restet_original", "price": "0.068", "type": 4, "id": 40088}, {"multi": 0, "link": "https://twitter.com/michaelgbassist", "price": "0.068", "type": 4, "id": 40108}, {"multi": 0, "link": "https://twitter.com/deerror_404", "price": "0.068", "type": 4, "id": 40123}, {"multi": 0, "link": "https://twitter.com/kokova4343", "price": "0.068", "type": 4, "id": 40126}, {"multi": 0, "link": "https://twitter.com/Kuligapark72", "price": "0.068", "type": 4, "id": 40127}, {"multi": 0, "link": "https://twitter.com/vivatist", "price": "0.068", "type": 4, "id": 40132}, {"multi": 0, "link": "https://twitter.com/openledgerdc", "price": "0.068", "type": 4, "id": 40270}, {"multi": 0, "link": "https://twitter.com/Garov84", "price": "0.068", "type": 4, "id": 40336}, {"multi": 0, "link": "https://twitter.com/luckygamesio", "price": "0.105", "type": 4, "id": 40360}, {"multi": 0, "link": "https://twitter.com/goldomarov", "price": "0.158", "type": 4, "id": 40436}, {"multi": 0, "link": "https://twitter.com/DepositProm", "price": "0.158", "type": 4, "id": 40452}, {"multi": 0, "link": "https://twitter.com/lunacr0ss", "price": "0.105", "type": 4, "id": 40492}, {"multi": 0, "link": "https://twitter.com/alexstartsev", "price": "0.105", "type": 4, "id": 40496}, {"multi": 0, "link": "https://twitter.com/OfficialNeuma", "price": "0.105", "type": 4, "id": 40519}, {"multi": 0, "link": "https://twitter.com/Tezosbakes", "price": "0.158", "type": 4, "id": 40569}, {"multi": 0, "link": "https://twitter.com/DerGlobal", "price": "0.105", "type": 4, "id": 40747}, {"multi": 0, "link": "https://twitter.com/IlyaKiselev7", "price": "0.105", "type": 4, "id": 40761}, {"multi": 0, "link": "https://twitter.com/korneevjr", "price": "0.105", "type": 4, "id": 40763}, {"multi": 0, "link": "https://twitter.com/mfc_ruza", "price": "0.105", "type": 4, "id": 40855}, {"multi": 0, "link": "https://twitter.com/ww3status", "price": "0.105", "type": 4, "id": 40972}, {"multi": 0, "link": "https://twitter.com/uvkurier", "price": "0.105", "type": 4, "id": 41079}, {"multi": 0, "link": "https://twitter.com/zbulvar", "price": "0.105", "type": 4, "id": 41095}, {"multi": 0, "link": "https://twitter.com/vaomoskva", "price": "0.105", "type": 4, "id": 41096}, {"multi": 0, "link": "https://twitter.com/news_szao", "price": "0.105", "type": 4, "id": 41102}, {"multi": 0, "link": "https://twitter.com/i_am_romochka", "price": "0.105", "type": 4, "id": 41116}, {"multi": 0, "link": "https://twitter.com/ge_savchenko", "price": "0.105", "type": 4, "id": 41125}, {"multi": 0, "link": "https://twitter.com/pro_smm", "price": "0.105", "type": 4, "id": 41158}, {"multi": 0, "link": "https://twitter.com/jjemharper", "price": "0.105", "type": 4, "id": 41171}, {"multi": 0, "link": "https://twitter.com/Yan19601", "price": "0.105", "type": 4, "id": 41173}, {"multi": 0, "link": "https://twitter.com/vitalsemenenko", "price": "0.31", "type": 4, "id": 41211}, {"multi": 0, "link": "https://twitter.com/dariagrigorova", "price": "0.105", "type": 4, "id": 41214}, {"multi": 0, "link": "https://twitter.com/CryptoBrothers3", "price": "0.105", "type": 4, "id": 41220}, {"multi": 0, "link": "https://twitter.com/myPartySeason", "price": "0.105", "type": 4, "id": 41241}, {"multi": 0, "link": "https://twitter.com/xxxxDIDAxxxx", "price": "0.105", "type": 4, "id": 41292}, {"multi": 0, "link": "https://twitter.com/BwVNqSPMFZhYmhm", "price": "0.105", "type": 4, "id": 41308}]"
    


  • @grylls said in как вытащить?:

    как вытащить ссылки и их id которые относятся к "type": 4, пример: "multi": 0, "link": "https://twitter.com/pleerru", "price": "0.052", "type": 4, "id": 33900 из текста внизу с помощью регулярки либо чего либо ещё б у меня ничего не получаетсяю

    "[{"multi": 0, "link": "http://twitter.com/home?status=Vikings%20and%20Rams%20on%20Friday%20Night%20%23ImportantStuff%20%23PlanAhead%0D%0AY3liZXJuZXRpY3MtZ292ZXJuYW5jZUBwcm90b25tYWlsLmNvbQ%3D%3D", "price": "0.05", "type": 0, "id": 40185}, {"multi": 0, "link": "http://twitter.com/home?status=%D0%9B%D1%83%D0%B9%D1%88%D0%B8%D0%B5%20%D0%B2%D1%83%D0%BB%D0%BA%D0%B0%D0%BD%20%D0%BA%D0%B0%D0%B7%D0%B8%D0%BD%D0%BE%20%D0%A3%D0%BA%D1%80%D0%B0%D0%B8%D0%BD%D1%8B%20%D1%82%D1%83%D1%82%21%0D%0Ahttps%3A//kozakov.com.ua%0D%0Ahttps%3A//atum.kozakov.com.ua%0D%0Ahttps%3A//aron.kozakov.com.ua%0D%0Ahttps%3A//alba.kozakov.com.ua", "price": "0.063", "type": 1, "id": 40245}, {"multi": 0, "link": "http://twitter.com/home?status=%23ThursdayNightCloud9%20%23ZiteSoda%20%23SoGood%20Y3liZXJuZXRpY3MtZ292ZXJuYW5jZUBwcm90b25tYWlsLmNvbQ%3D%3D", "price": "0.063", "type": 1, "id": 40254}, {"multi": 0, "link": "http://twitter.com/home?status=Do%20you%20book%20company%20travel%3F%20Check%20out%20the%20travel%20management%20platform%20from%20TripAways%E2%80%A4com%20for%20Business%21%0D%0ATrack%20your%20teams%20spend%20and%20gain%20valuab", "price": "0.063", "type": 1, "id": 40341}, {"multi": 0, "link": "http://twitter.com/home?status=WordPress%20Speed%20Optimization%20Services.%20We%27ll%20speed%20up%20your%20website%2C%20and%20optimize%20performance%20https%3A//pagespeed.website%20%20%23pagespeedwebsite", "price": "0.072", "type": 1, "id": 40537}, {"multi": 0, "link": "http://twitter.com/home?status=CUT%20coin%20pool%20is%20alive%21%20Check%20it%20here%20pool.cutcoin.org%20%0D%0ANew%20%23cryptonight%20%23PoScoin%20%23altcoin", "price": "0.072", "type": 1, "id": 41380}, {"multi": 0, "link": "https://twitter.com/Stepan_emelyan", "price": "0.102", "type": 4, "id": 27434}, {"multi": 0, "link": "https://twitter.com/expert_krd", "price": "0.158", "type": 4, "id": 33604}, {"multi": 0, "link": "https://twitter.com/pleerru", "price": "0.052", "type": 4, "id": 33900}, {"multi": 0, "link": "https://twitter.com/Hyperloot", "price": "0.101", "type": 4, "id": 36372}, {"multi": 0, "link": "https://twitter.com/visshap", "price": "0.158", "type": 4, "id": 38709}, {"multi": 0, "link": "https://twitter.com/ArtiSH0KE", "price": "0.158", "type": 4, "id": 39453}, {"multi": 0, "link": "https://twitter.com/mfc_krasn", "price": "0.101", "type": 4, "id": 39812}, {"multi": 0, "link": "https://twitter.com/bestbetsorg", "price": "0.068", "type": 4, "id": 39978}, {"multi": 0, "link": "https://twitter.com/Tati89340450", "price": "0.067", "type": 4, "id": 40000}, {"multi": 0, "link": "https://twitter.com/alexnarov", "price": "0.068", "type": 4, "id": 40006}, {"multi": 0, "link": "https://twitter.com/antibank_io", "price": "0.068", "type": 4, "id": 40014}, {"multi": 0, "link": "https://twitter.com/StarFeederPBets", "price": "0.068", "type": 4, "id": 40075}, {"multi": 0, "link": "https://twitter.com/kopikassa", "price": "0.068", "type": 4, "id": 40076}, {"multi": 0, "link": "https://twitter.com/BriannaghD", "price": "0.068", "type": 4, "id": 40083}, {"multi": 0, "link": "https://twitter.com/DeluxeVulkan", "price": "0.068", "type": 4, "id": 40084}, {"multi": 0, "link": "https://twitter.com/Restet_original", "price": "0.068", "type": 4, "id": 40088}, {"multi": 0, "link": "https://twitter.com/michaelgbassist", "price": "0.068", "type": 4, "id": 40108}, {"multi": 0, "link": "https://twitter.com/deerror_404", "price": "0.068", "type": 4, "id": 40123}, {"multi": 0, "link": "https://twitter.com/kokova4343", "price": "0.068", "type": 4, "id": 40126}, {"multi": 0, "link": "https://twitter.com/Kuligapark72", "price": "0.068", "type": 4, "id": 40127}, {"multi": 0, "link": "https://twitter.com/vivatist", "price": "0.068", "type": 4, "id": 40132}, {"multi": 0, "link": "https://twitter.com/openledgerdc", "price": "0.068", "type": 4, "id": 40270}, {"multi": 0, "link": "https://twitter.com/Garov84", "price": "0.068", "type": 4, "id": 40336}, {"multi": 0, "link": "https://twitter.com/luckygamesio", "price": "0.105", "type": 4, "id": 40360}, {"multi": 0, "link": "https://twitter.com/goldomarov", "price": "0.158", "type": 4, "id": 40436}, {"multi": 0, "link": "https://twitter.com/DepositProm", "price": "0.158", "type": 4, "id": 40452}, {"multi": 0, "link": "https://twitter.com/lunacr0ss", "price": "0.105", "type": 4, "id": 40492}, {"multi": 0, "link": "https://twitter.com/alexstartsev", "price": "0.105", "type": 4, "id": 40496}, {"multi": 0, "link": "https://twitter.com/OfficialNeuma", "price": "0.105", "type": 4, "id": 40519}, {"multi": 0, "link": "https://twitter.com/Tezosbakes", "price": "0.158", "type": 4, "id": 40569}, {"multi": 0, "link": "https://twitter.com/DerGlobal", "price": "0.105", "type": 4, "id": 40747}, {"multi": 0, "link": "https://twitter.com/IlyaKiselev7", "price": "0.105", "type": 4, "id": 40761}, {"multi": 0, "link": "https://twitter.com/korneevjr", "price": "0.105", "type": 4, "id": 40763}, {"multi": 0, "link": "https://twitter.com/mfc_ruza", "price": "0.105", "type": 4, "id": 40855}, {"multi": 0, "link": "https://twitter.com/ww3status", "price": "0.105", "type": 4, "id": 40972}, {"multi": 0, "link": "https://twitter.com/uvkurier", "price": "0.105", "type": 4, "id": 41079}, {"multi": 0, "link": "https://twitter.com/zbulvar", "price": "0.105", "type": 4, "id": 41095}, {"multi": 0, "link": "https://twitter.com/vaomoskva", "price": "0.105", "type": 4, "id": 41096}, {"multi": 0, "link": "https://twitter.com/news_szao", "price": "0.105", "type": 4, "id": 41102}, {"multi": 0, "link": "https://twitter.com/i_am_romochka", "price": "0.105", "type": 4, "id": 41116}, {"multi": 0, "link": "https://twitter.com/ge_savchenko", "price": "0.105", "type": 4, "id": 41125}, {"multi": 0, "link": "https://twitter.com/pro_smm", "price": "0.105", "type": 4, "id": 41158}, {"multi": 0, "link": "https://twitter.com/jjemharper", "price": "0.105", "type": 4, "id": 41171}, {"multi": 0, "link": "https://twitter.com/Yan19601", "price": "0.105", "type": 4, "id": 41173}, {"multi": 0, "link": "https://twitter.com/vitalsemenenko", "price": "0.31", "type": 4, "id": 41211}, {"multi": 0, "link": "https://twitter.com/dariagrigorova", "price": "0.105", "type": 4, "id": 41214}, {"multi": 0, "link": "https://twitter.com/CryptoBrothers3", "price": "0.105", "type": 4, "id": 41220}, {"multi": 0, "link": "https://twitter.com/myPartySeason", "price": "0.105", "type": 4, "id": 41241}, {"multi": 0, "link": "https://twitter.com/xxxxDIDAxxxx", "price": "0.105", "type": 4, "id": 41292}, {"multi": 0, "link": "https://twitter.com/BwVNqSPMFZhYmhm", "price": "0.105", "type": 4, "id": 41308}]"
    

    не кто незнает?



  • @grylls через JSON.parse вот тут даже модуль выложили - https://community.bablosoft.com/topic/6192/модуль-парсинга-json/7



  • @bigorat said in как вытащить?:

    @grylls через JSON.parse вот тут даже модуль выложили - https://community.bablosoft.com/topic/6192/модуль-парсинга-json/7

    но какой запрос составить не пойму



  • @grylls said in как вытащить?:

    не кто незнает?

    Апать тему бессмысленно, помогают на форуме простые пользователи в своё свободное время и по личной инициативе. Мне вот наоборот, не хочется отвечать на подобным образом апнутую тему.


    @grylls said in как вытащить?:

    как вытащить ссылки и их id которые относятся к "type": 4

    Текст представлен в виде массива json, получить нужные данные можно через цикл. В каком виде нужно то?

    [[RESULT]] = []
    var json = JSON.parse([[SAVED_CONTENT]])
    for (var i = 0; i < json.length; i++){
    if (json[i].type == 4){
    [[RESULT]].push(json[i].id + "|" + json[i].link)
    }}
    

    0_1545913504224_3da46642-c7f7-4797-913c-953ed75c150d-изображение.png

    Вот тестовый скрипт



  • С помощью модуля
    два кубика

    1. Экшен получить элемент - путь //*[type == 4]/id
    2. Экшен получить элемент - путь //*[type == 4]/link
      получим два списка в одном айдишки, в другом линки
      Пробегаемся любым циклом собираем куда надо

Log in to reply