Get URL of search results from URLFetchApp in Google Apps Scripts that return Null

I have been trying to create a function that gets the URLs of the URLFetchApp function, and I read somewhere that using these regular expression matching expressions could eliminate URLs from the return value of URLFetchApp.fetch. But the url results in my case are always nil, and I was wondering if anyone knew the reason for this or if there was any preconfiguration I had to do. Also the searchResults log when I search for "double rainbows" through URLFetchAPP is also included under the function. Thank you!

function scrapeWeb(){

  var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var urlExpression=/

((sS)*?)&/gi; for(var i = 2 ; i < 100 ; i++){ var content = ss.getRange("C"+i).getValue(); var searchResults = UrlFetchApp.fetch("" + encodeURIComponent(content),{muteHttpExceptions:true}); var urlResults = searchResults.getContentText("UTF-8").match(urlExpression); var url = urlResults(0).replace(/(^s+)|(s+$)/g, "").replace(/)+>/gi, ""); Logger.log(url) } }

Query record "double rainbow":

(02-02-17 00: 31: 29: 961 PST) double rainbow – Google Search (function () {
document.documentElement.addEventListener ("submit", function (b) {var a; if (a = {var c = a.getAttribute ("data-submitfalse"); a = "1" == c | | "q" == c &&! a.elements.q.value ?! 0 :! 1} plus a =! 1; a && (b.preventDefault (), b.stopPropagation ())},! 0); document. documentElement.addEventListener ("click", function (b) {var a; a: {for (a =; a && a! = document.documentElement; a = a.parentElement) if ("A" == a .tagName) {a = "1" == a.getAttribute ("data-nohref"); separate a} a =! 1} a && b.preventDefault ()},! 0);}). call (this); (function () {
var a = window.performance; window.start = (new Date) .getTime (); a: {var b = window; if (a) {var c = a.timing; if (c) {var d = c. navigationStart, f = c.responseStart; if (f> d && f<=window.start){window.start=f;b.wsrt=f-d;break a}}}}||{};var h=function(g){g&&"data-iml",(new Date).getTime())};document.documentElement.addEventListener("load",h,!0);google.rglh=function(){document.documentElement.removeEventListener("load",h,!0)};}).call(this);(function(){var gbvu='/search?qx3ddouble+rainbowx26numx3d30x26gbvx3d2x26seix3dYU9KXq3qHsGstQbTlaqoDg';(function(){ var e=function(c,a){this.a=c===b&&a||"";this.g=d};e.prototype.i=!0;e.prototype.h=function(){return this.a.toString()};var f=/^(?:(?:https?|mailto|ftp):|(^:/?#)*(?:(/?#)|$))/i,d={},b={};var g,h="1";if(document&&document.getElementById)if("undefined"!=typeof XMLHttpRequest)h="2";else if("undefined"!=typeof ActiveXObject){var k,l,m=("MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP");for(k=0;l=m(k++);)try{new ActiveXObject(l);h="2";break}catch(c){}}g=h;if("2"==g&&"&gbv=2")){var n=gbvu,p=document.getElementById("gbv");p&&(p.value=g);n&&window.setTimeout(function(){var c=location;if(n instanceof e)var a=n;else a=n,a instanceof e||(a="object"==typeof a&&a.i?a.h():String(a),f.test(a)||(a="about:invalid#zClosurez"),a=new e(b,a));c.href=a instanceof e&&a.constructor===e&&a.g===d?a.a:"type_error:SafeUrl"},0)};}).call(this);})();body{margin:0 auto;max-width:736px;padding:0 8px}a{color:#1967D2;text-decoration:none;tap-highlight-color:rgba(0,0,0,.1)}a:visited{color:#4B11A8}a:hover{text-decoration:underline}img{border:0}html{font-family:Roboto,HelveticaNeue,Arial,sans-serif;font-size:14px;line-height:20px;text-size-adjust:100%;color:#3C4043;word-wrap:break-word;background-color:#fff}.bRsWnc{background-color:#fff;border-top:1px solid #e0e0e0;height:39px;overflow:hidden}.N6RWV{height:51px;overflow-scrolling:touch;overflow-x:auto;overflow-y:hidden}.Uv67qb{box-pack:justify;font-size:12px;line-height:37px;justify-content:space-between;justify-content:space-between}.Uv67qb a,.Uv67qb span{color:#757575;display:block;flex:none;padding:0 16px;text-align:center;text-transform:uppercase;}span.OXXup{border-bottom:2px solid #4285f4;color:#4285f4;font-weight:bold}a.eZt8xd:visited{color:#757575}.FElbsf{border-left:1px solid rgba(0,0,0,.12)}header article{overflow:visible}.Pg70bf{height:39px;display:box;display:flex;display:flex;width:100%}.H0PQec{position:relative;flex:1}.sbc{display:flex;width:100%}.Pg70bf input{margin:2px 4px 2px 8px;}.x{width:26px;color:#757575;font:27px/38px arial, sans-serif;line-height:40px;}#qdClwb{flex:0 0 auto;width:39px;height:39px;border-bottom:0;padding:0;border-top-right-radius:8px;background-color:#3b78e7;border:1px solid #3367d6;background-image:url(data:image/gif;base64,R0lGODdhJAAjAPIHAODr/nCk+MPZ/FmV96zK+/7+/5K5+kqL9iwAAAAAJAAjAEADani63P4wykmbKcQRXDscQAEMXmmeaLQVLCukzyC09AjfeK7v/MAajACLhPMVAgwjsUcEiZa8xgAYrVqv2Kx2iwsIAAABknfBBAKrTE4IcMyot8ur8datqIbQfJdnAfo2WE6BV05wXIiJigkAOw==);}.sc{font-size:;position:absolute;top:39px;left:0;right:0;box-shadow:0px 2px 5px rgba(0,0,0,.2);z-index:2;background-color:#fff}.sc>div {padding: 10px 10px; padding-left: 16px; padding-left: 14px; border-top: 1px solid # DFE1E5} .scs {background-color: # f5f5f5;}. noHIxc {display: block; font-size: 16px; filling: 0 0 0 8px; flex: 1; height: 35px; contour: none; edge: none; width: 100%; – webkit-tap-highlight-color: rgba (0,0,0,0); overflow: hidden;}. sbc input (type = text) {background: none} .sml .cOl4Id {display: none} .l {display: none} .sml header {background: none} .sml .l {display: block; padding: 0 8px} .sml .l {letter spacing: -1px; text alignment: center; edge radius: 2px 0 0 0; source: 22px / 36px Futura, Arial, sans-serif; source smoothing: antialias} .bz1lBb {background: #fff; border-radius: 8px 8px 0 0; box-shadow: 0 1px 6px rgba (32, 33, 36, 0.18); margin-top: 10px} .KP7LCb {border-radius: 0 0 8px 8px; box-shadow: 0 2px 3px rgba (32, 33, 36, 0.18); lower margin: 10px; overflow: hidden} .cOl4Id {letter spacing: -1px; text alignment: center; source: 22pt Futura, Arial, sans-serif; filling: 10px 0 5px 0; height: 37px; source smoothing: antialias}} .cOl4Id span {display: inline-block} .S591j {height: 100%}. V6gwVd {color: # 4285f4} .iWkuvd {color: # ea4335} .cDrQ7 {color: # fbcc05} .ntlR9 {color: # 34a853} .tJ3Myc {-webkit-transform: rotate (-20deg); relative position; left: -1px; display: inline-block} footer {text-align: center; margin-top: 18px} footer a, footer a: visited, .smiUbb {color: # 5f6368} .ksTU4c {margin: 0 13px} #mCljob {margin- top: 36px} #mCljob> div {margin: 20px} (function () {var c = 500; (function () {window.screen && window.screen.width <= c && window.screen.height <= c && document.getElementById ("hdr") .classList.add ("sml ");}). call (this);}) (); GoogleGoogle AllImagesVideosNews Shopping Books Search Tools .wEsjbd {background-color: #fff; height: 44px; white-space: nowrap} .coPU8c {height: 60px; overflow offset: touch; overflow-x: automatic; overflow-y: hidden} .Xj2aue {height: 44px; overflow: hidden} .RnNGze {margin: 11px 16px} .wEsjbd div,. wEsjbd a, .wEsjbd li {width-scheme: 0; scheme: none} .PA9J5 {display: block online} .RXa

web browser – using NoScript – what approach to use with randomly named CDN scripts?

I found this on This question is not about itself, I have no problem trusting. On the contrary, what approach do you recommend when dealing with CDN scripts that have very long random names? Now, I know that most likely, the main site has decided to refer to external utility scripts that they have put in a CDN.

But, if the main site has been hacked, the attackers could also inject a script to shoot and use a long random name that seems innocuous apparently a utility script.

Is there any particular reason to be more cautious about these long scripts with a random name than for the most recognized? I guess not, but they make me a little dizzy with NoScript. Especially in places where I will enter credit cards.

enter the description of the image here

multi-thread – Run Bash scripts in parallel

I would like to run a script several times in more than 10 folders in parallel. What I need to know is how to structure the arguments by number. My non-parallel script is:

For i in {1..10};
    do python "folder_"$i;

I have heard of mpirun but I am not sure how to structure the arguments by folder number or something similar.

theme development: How to sequence scripts correctly with ES6 webpack?

I am trying to create a page preload.

It depends on the image loads and will show the progress in percentage.

I am using imagesLoaded and gsap plugins.

You can see the code here in codepen.

In codepen everything works perfectly, if you slow down your network,
You will see how the images are loaded in percentage.

And I tried to implement this for my WordPress theme:

function _themename_assets() {
    wp_enqueue_style( '_themename-stylesheet', get_template_directory_uri() . '/dist/assets/css/bundle.css', array(), '1.0.0', 'all' );
    wp_enqueue_script( '_themename-scripts', get_template_directory_uri() . '/dist/assets/js/bundle.js', array('jquery'), '1.0.0', true );
add_action('wp_enqueue_scripts', '_themename_assets');

And within the js package I imported my add-ons this way:

import $ from "jquery";
import { TweenMax, TimelineMax } from "gsap";
import imagesLoaded from 'imagesloaded';

then exactly the same code of my codepen,

it's actually working, but not like in codepen.

It seems that the scripts start working only when the document is ready,

Therefore, it seems: black screen, waiting for all documents to load, then my script starts working, but everything is loaded, so it has no pause, only accelerates from 0% to 100%, without delays.

I'm a newbie in WordPress and I don't understand what I'm doing wrong.

I know it is a difficult question, especially in my explanation, so I will be happy to receive any advice.

Thanks in advance!

linux – how to configure `DISPLAY` in acpid scripts

I have several users connected and I use acpid to listen sleep key to turn off screen usage xset dpms force off I send.

I can't turn off the screen because acpid runs and runs scripts as root. and I know how to configure correctly DISPLAY. because each connected user has their own screen, and I don't know which one is currently displayed. maybe GNOME He knows, but I don't know how to find out.

magento2 – How to run scripts magento 2.3 through cron

There are 2 ways to run that script.

First method: Set cron job on the cPanel server. You can follow the link below to do this.

Second method Create a custom module to configure the cron job and run your script.
See the following link to get your help.

Magento 2: Creating & Running Cron in Custom Module

Note: The second method is highly recommended.

nginx – How to use Mysql Workbench to find out why scripts are so slow?

I have a laragon environment on a fairly decent machine:
enter the description of the image here

I have a simple coded web application (no frames), with a Bootstrap4 + jQuery front end.

When loading the page, make some very simple and low stress mySQL selections.

However, even when completely local things are executed, the pages display very slowly with more than 2 seconds of loading time.

I did some basic tests and the script time tracking and discovered that the PHP code and even the HTML / JS representations are quite fast, but if a page involves an SQL request it is when things really take 2 seconds or more.

Therefore, I believe that this for now eliminates any problem with other parts of the web application, Laragon or even with the host machine (ram, antivirus, etc.)

I installed MYSQL workbench to try to solve things, but unfortunately, I am not good with server administration things.

Given the previous scenario that I have explained, what should I look for or try in mysql workbench to solve this?

xss: how to avoid cross-site scripts in the ajax response

I have a page (parent.php) from where I am calling another page (result.php) through jquery ajax that is returning an answer in html format. This answer is shown on the parent.php page in a div. How can I secure my ajax response from the xss attack? Here is the code snippet from the parent.php page

        type: "POST",
        url: "getResult.php",

    success: function(result)


on the getResult.php page, I am consulting the database based on the parameter and returning some result in html form as the table. How can I prevent a cross attack?

Is shebang necessary in git bash scripts in windows

Shebang is the first line of a bash script that indicates where the bash script runs. In Windows Git Bash scripts, is it necessary? But because?

Use project configuration variables in different Python scripts

I am working on a project with several directories, each with a series of Python scripts. And it implies the use of certain key parameters I spend using a yam configuration file The portion of the configuration file is:

    negative_label_overlap_limit: 1     
    negative_label_overlap_lower_limit: 30
    negative_label_overlap_upper_limit: 60
    positive_label_overlap_limit: 95
    window_length: 0.2

    frequency: 50

Currently, the method used is (I would say it is naive) simply analyzes the yaml in a Python dictionary as follows:

configurations_path = 'config.yaml'
with open(configurations_path, 'r') as stream:
    config = yaml.safe_load(stream)

which is then imported into other scripts and the values ​​are accessed.

From what I could find, there are:

  1. The Abseil library that can be used to access flags in different scripts but using it is cumbersome.
  2. Another approach using a class (preferably singleton), placing all global variables and exposing the instance of that class in other scripts.

I wanted to ask, is there any other library that can be used for this purpose? And what is the most pythonic methodology to treat it?

Any help would be highly appreciated. Thank you!