Skip to content

Commit 265250c

Browse files
committed
1 parent c880eb4 commit 265250c

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

scrape_yahoo

100755100644
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
# By Steve Cook (https://www.stevecook.net/)
99
# and Steve Jenkins (https://www.stevejenkins.com/)
1010

11-
version="1.0"
12-
lastupdated="30 April 2017"
11+
version="1.1"
12+
lastupdated="01 December 2020"
1313

14-
yahoo_url="https://help.yahoo.com/kb/SLN23997.html"
14+
# Verizon, AOL and Yahoo servers have allegedly merged.
15+
yahoo_url="https://postmaster.verizonmedia.com/mail-servers"
1516

1617
# NO NEED TO EDIT PAST THIS LINE
1718

@@ -41,10 +42,10 @@ fi
4142
# Check for wget or curl
4243
if [ `command -v wget` ]
4344
then
44-
content=$(wget $yahoo_url -q -O -)
45+
content=$(wget --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0" $yahoo_url -q -O -)
4546
elif [ -n `command -v curl` ]
4647
then
47-
content=$(curl -s -L $yahoo_url)
48+
content=$(curl -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0" -s -L $yahoo_url)
4849
else
4950
echo "wget or curl required.";
5051
exit 1;
@@ -62,6 +63,6 @@ ipv6_mailers=$(echo "$content" | grep -E -o '(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F
6263
# Append IPv6 hosts to newly-created Yahoo! mailer list
6364
echo "$ipv6_mailers" >> "$yahoo_static_hosts"
6465
65-
printf '\nYahoo! outbound mailers updated.\n'
66+
printf '\nVerizon/AOL/Yahoo! outbound mailers updated.\n'
6667
6768
exit

0 commit comments

Comments
 (0)