I want to import data from a table from the following page:
https://basketballmonster.com/playerrankings.aspx
When I do so, with all players filter selected, only the top players are imported to my googlesheet. Can someone help me achieve this? Appreciation in advance.
I attached the googlesheet below for your review:
https://docs.google.com/spreadsheets/d/1uvhNp6gBnnEvs8CBb4K7onccew_doFp96wmFEsYyLBk/edit?usp=sharing
Google Sheets can't know what your browser has, so it doesn't know whether you selected which filter. You have to get the same html for Sheets that you have displayed in your browser, which means adding the filter in your query.
Since it looks like the controls aren't passed as parameters in a GET request, sadly it's not as simple as appending
?PlayerFilterControl=TopPlayers to the url.
You have to POST it as a payload with a post request like
{ 'PlayerFilterControl': 'AllPlayers'}.
Sadly Google Sheets IMPORTHTML() doesn't support post request yet, so you'll have to get into apps scripts, request and xml parsing.
I suggest you check out these:
https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app
https://developers.google.com/apps-script/reference/xml-service
I am trying to replicate something someone has done in this link https://l.instagram.com/?u=http%3A%2F%2Ftinyurl.com%2Fyd49a4ow&e=ATMn3WfYRw5VZzFDz9FU9Pp0jqk5uBpX0Vo4n2MffH-mr8W5f84IEmpo-Rbx3neyIU0ehQcntNJuRsSGfW9bjw&s=1.
When on a mobile app the link opens the mail app with a pre-written email body subject and recipients.
It is similar to the mailto function if I were designing my own web page and using HTML but this is a link I want to be able to email and share with people.
Thanks so much for your help!
Checkout mailto links: https://css-tricks.com/snippets/html/mailto-links/
The long-and-short of it is that you can make a link that looks like this:
Email Us
Basically, you are using the link's query parameters to preset the subject line, recipient, and body of the email.
Build your link like so:
mailto:<the *recipient's* email>?subject=<subject line>&body=<email content>
Then you can add the following options:
Carbon Copy (cc) and Blind Carbon Copy (bcc)
Each email must be separated by a comma (&cc=email#example.com, email2#example.com)
Subject (subject)
Email body text (body)
Make sure to URL-encode the subject and email body text as well.
I'm having an issue trying to send Whatsapp messagges through browser using this code:
click
Using this code, Whatsapp opens correctly but the number is not recognized (i'm trying with my number, which is registered in Whatsapp) saying something like "You're trying to reach a non-Whatsapp number. Invite him or send SMS".
My international code (Italy) is +39.
I've tried 003912345, +3912345, 3912345, 12345, but with no success.
Anyone experienced this? Thanks for the help!
You get the message"You're trying to reach a non-Whatsapp number. Invite him or send SMS" because the number you want to use for sending the message to must be present into your phone contact list.
Anyway the attached code you use for the link won't work on iOS.
Try to use: href="whatsapp://send/?text=<>" data-action="share/whatsapp/share" . The link will open WhatsApp but you will have to manually select the consignee of the message from your contact list, otherwise you could use the ABID code to send the message directly to your contact.
Here you'll find more info about this technique: https://www.macstories.net/tutorials/use-whatsapps-url-scheme-with-drafts-launch-center-pro-or-a-bookmarklet/
I show email on my website as following
Email
But I read the following while analysing my website using woorank.com, what should I do to avoid this?
Malicious bots scrape the web in search of email addresses and plain text email addresses are more likely to be spammed.
In the past I have seen this done with javascript. Basically you assign the email address to javascript variables and change the contents of an element using these. You can also provide a fallback for users with javascript disabled which points them in the direction of a form if you need to. Here's an example
var user = 'foo',
domain = 'bar.com',
element = document.getElementById('email');
element.innerHTML = user + '#' + domain;
//OR
//'Email'
This way bots never see the email address as they do not load javascript.
Well, you can figure out a different way every day. Here's one using jQuery.
<a class="mail" href="mailto:john#badmail.mydomain.com">e-mail</a>
Then handle the click with jQuery.
$('a.mail').on('click', function(){
var href = $(this).attr('href');
$(this).attr('href', href.replace('badmail.', ''));
});
The reason I like this is that I can let the spammers spam the dummy mail domain thinking they got yet another e-mail harvested. If I was maintaining my own spam filter, I could collect samples to my bad bucket.
Also, this approach allows you to render the page quite clean with dynamic data and simply have the javascript snippet only once on the whole site to handle the real user clicks.
Works also on mobiles.
The trouble with the JavaScript solutions is that people with JS turned off will also not see the email address. Albeit a minority you need a combination of techniques for the best results.
Many of these techniques are detailed here, but I have provided the solutions only: https://www.ionos.co.uk/digitalguide/e-mail/e-mail-security/protecting-your-e-mail-address-how-to-do-it/
Comments
<p>If you have any questions or suggestions, please write an e-mail to:
us<!-- abc#def -->er#domai<!-- #abc.com -->n.com.
</p>
Hidden Spans
<style type="text/css">
span.spamprotection {display:none;}
</style>
<p>If you have any questions or suggestions, please write an e-mail to:
user<span class="spamprotection">CHARACTER SEQUENCE</span>#domain.com.
</p>
Reverse Strings
This may not be friendly for multilingual sites.
<style type="text/css">
span.ltrText {unicode-bidi: bidi-override; direction: rtl}
</style>
<p>If you have any questions or suggestions, please write an e-mail to:
<span class="ltrText"> moc.niamod#resu</span>.
</p>
JavaScript as in many other answers
<script type="text/javascript">
var part1 = "user";
var part2 = Math.pow(2,6);
var part3 = String.fromCharCode(part2);
var part4 = "domain.com"
var part5 = part1 + String.fromCharCode(part2) + part4;
document.write("If you have any questions or suggestions, please write an e-mail to:
<href=" + "mai" + "lto" + ":" + part5 + ">" + part1 + part3 + part4 + "</a>.");
</script>
ROT13 Encryption
JavaScript dependant but also helps with GDPR as it's encrypted.
<script type="text/javascript">
function decode(a) {
return a.replace(/[a-zA-Z]/g, function(c){
return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13)
? c : c - 26);
})
};
function openMailer(element) {
var y = decode("znvygb:orahgmre#qbznva.qr");
element.setAttribute("href", y);
element.setAttribute("onclick", "");
element.firstChild.nodeValue = "Open e-mail software";
};
</script>
<a id="email" href=" " onclick='openMailer(this);'>E-mail: please click</a>
CSS Only
Borrowed from here: Protect e-mail address with CSS only
<!doctype html>
<html>
<head>
<title>Protect e-mail with only css</title>
<style type="text/css">
.e-mail:before {
content: attr(data-website) "\0040" attr(data-user);
unicode-bidi: bidi-override;
direction: rtl;
}
</style>
</head>
<body>
<span class="e-mail" data-user="nohj" data-website="moc.liamg"></span>
</body>
</html>
There are multiple different choices for hiding emails on websites, commonly using either the HTML entity version of the email address (as Aziz-Saleh suggested), but from an actual web design point of view, just putting the email address like that on a website isn't the most user friendly thing to do.
For instance, the mailto: link automatically triggers the browser to open the user's Email Application of choice - but consider this. Not everybody has a dedicated email application. For instance, I don't use Outlook (I'm a Windows user), and unless I have Windows Live Mail installed, my computer can't open that link. I think Chrome can open the links into GMail if you're signed in, but I would need to check that.
Ultimately, by using mailto:, you are potentially alienating a portion of your userbase that will not be able to use that link in the first place.
I would suggest using email forms, and there are plenty of easy-to-follow tutorials available for both PHP and your language of JSP, such as this link here: Sending Email in JSP and even on StackOverflow
By using your server to send the email, you get tighter control over how the email is generated, what data the user is allowed to put in, and you could even send them a return email (generated by the server) to confirm that you have received their message. This is a tried-and-tested real-world method of allowing customers and visitors to contact you, whilst still giving you protection and control over the entire process.
TL;DR: Raw mailto: links might alienate people without dedicated email programs, whereas if you use JSP forms, you can control how they contact you, with what information (you can use fields and the HTML5 required attribute to mandate certain input fields) and you can even respond with a do-not-reply email so they know their message was heard (just don't forget to ask for their email address)
Solution 1:
You can use many publicly available email address encoders like (first result on google):
http://www.wbwip.com/wbw/emailencoder.html
This encodes the emails into their character entity value, this will require more logic form scrapers to decode it.
So an email like: test#gmail.com becomes test#gmail.com which can be used in a mailto as well.
Solution 2:
Use an online email to image converter (again first result on google):
http://www.email2image.com/Convert-Email-to-Image.aspx
To make it as an image. Other services enable you to do this automatically via an API like:
https://www.mashape.com/seikan/img4me-text-to-image-service#!endpoint-Main
Personally, I came up with this, pretty straightforward and kinda funny solution. I throw this code where I want my email address to appear:
<script>(function whatever(){var s='#',n='nabil',k='kadimi.com',e=n+s+k,l='<a href=mailto:{{spam#uce.gov}}>{{spam#uce.gov}}</a>'.replace(/{{.+?(}})/g,e);document.write(l)})()</script>
Explanation
Bots that crawl websites and look for emails using regular expressions will grab the FTC (Federal Trade Commission) email address (spam#uce.gov). Legit visitors will see your email address after it's constructed with that code.
##Expanded
<script>
(function whatever() {
var s = '#'
, n = 'nabil'
, k = 'kadimi.com'
, e = n + s + k
, l = '<a href=mailto:{{spam#uce.gov}}>{{spam#uce.gov}}</a>'.replace(/{{.+?(}})/g, e)
;
document.write(l);
})();
</script>
##Demo
<script>(function whatever(){var s='#',n='nabil',k='kadimi.com',e=n+s+k,l='<a href=mailto:{{spam#uce.gov}}>{{spam#uce.gov}}</a>'.replace(/{{.+?(}})/g,e);document.write(l)})()</script>
I've been using CloudFlare's free Email Address Obfuscation feature: https://support.cloudflare.com/hc/en-us/articles/200170016-What-is-Email-Address-Obfuscation-
Email harvesters and other bots roam the Internet looking for email
addresses to add to lists that target recipients for spam. This trend
results in an increasing amount of unwanted email.
Web administrators have come up with clever ways to protect against
this by writing out email addresses (i.e., help [at] cloudflare [dot]
com) or by using embedded images of the email address. However, you
lose the convenience of clicking on the email address to automatically
send an email.
By enabling Cloudflare Email Address Obfuscation, email addresses on
your web page will be obfuscated (hidden) from bots, while keeping
them visible to humans. In fact, there are no visible changes to your
website for visitors.
To prevent unexpected website behavior, email addresses are not
obfuscated when they appear in:
Any HTML tag attribute, except for the href attribute of the a tag.
Other HTML tags
Any page that does not have a MIME type of "text/html" or "application/xhtml+xml"
I'm not affiliated with CloudFlare. I just appreciate all that they offer for free.
I use email encoders like http://www.wbwip.com/wbw/emailencoder.html . Just put your address to the source and between the "a" tags. Something like this
info#example.com
It is encoding of info#example.com
Put your email address on a transparent image in png or gif format and display that image on your web pages. Only a human reader would know the image is showing an email address.
This will prevent bots from finding your email address on your website.
Google actually provides a service for this. Free to use and works pretty well: Mail ReCaptcha
Yeah it means use a php form for visitors to contact you through. It is much safer and stops bots sending emails to you like thousands of times. Look around Google for a contact form tutorial there will be plenty!
A tutorial will tell you to use php and so when the user fills out a form it will be emailed to you with the details they filled out in the form. However most forms use like a "Captcha" entry and it stops the bots, almost like a "Are you Human?" test.
Hope this helps.
Edit: Having used Formspree for a little over a year now, I have to say I'm not too happy. It's really easy for people to spam you all kinds of garbage.
2020 (and potentially beyond) solution:
Register with Formspree, a free platform that forwards form data to an email of your choosing. Be sure to register using the email address on which you want to receive submissions.
Copy the unique Formspree endpoint that gets generated.
Create a contact form with this endpoint.
Congrats! Your email is officially masked from bots.
I am recoding a friend's artist/client booking system. I have little experience in programming, enough understanding to hack my way through and google has been a great help!
I've spent the last 3 days reading and searching... Havn't found anything on that... Maybe I'not using the proper terms....
Here's what I want to do.
I use Google Script and google spreadsheet. 1 row contains all the information about a specific contract.
I want to be able to use a menu item to generate the contract (completed)
Open 2 browser window
one to display the Contract PDF file ( completed )
one for a GMAIL New email
with the contract pdf attached ( completed )
generated email body from selected row in the spreadsheet( completed )
be able to customize the generated email text before
sending it. Adding attachements...
This is what I'm stucked at. I use
MailApp.sendEmail('xxx#yyy.com', 'transfer email as pdf : body
& attachment', 'see attachment', {attachments:[body_to_send]});
It send's the email ok, with attachement and generated body and all... but no way to edit the email before sending...
Is that possible with google script?
Explore the UiApp class in Google Apps Script. UiApp
You could build a simple UI where the user can enter additional content and upload files, which can then be appended to the email before sending.
It doesn't look like Apps Script supports creating email drafts, which would also provide a way for you to edit emails before sending them. (Sending an email to yourself with a fancy way to reference the ultimate recipient is another possibility using the native Gmail UI.)
Is this in the direction you were thinking?
The last step of your process can be achieved using a Google Doc template in which you can add whatever you want to improve presentation.
From there you get an html version of your doc and use it as a html body in your mail.
If you need more details about html import you'll find it easily on this forum and on the issue tracker.
You could also run this code from a document bound script in a sidebar which would be visually more convenient. (see my recent posts about mailmerge).