Categories
amp facebook pwa pwamp

Facebook Down High Time To Take Organic Traffic Seriously

Many companies out there whose main source of traffic is Facebook, It’s high time for them to take organic traffic from Google more seriously, as Facebook is often down. The impact of facebook down time is directly in the irregularities of traffic and revenue.
facebook down

I am not saying that Facebook ain’t reliable, that would be too insane, but what I am saying is irregularities in the number aren’t good for the business for sure.

facebook down

With Google I/O 2017 wrapped up couple of days ago, they so much emphasized on web development from lightening fast speed to great technologies like webvr. They also predict that within couple of years they are expecting more than billion of unique visitors. Now they are very clear on this front, whosoever is fast, stays ahead.

Facebook Down High Time To Take Organic Traffic Seriously

They have introduced few technologies like pwa, amp, pwamp which makes your website load faster and so they give them more priority in the google search results. Believe me, this is for real. Just to check, if you search something on google, they show almost only amp pages, with even a slider.

You must be very excited and must be wondering what does a amp website look like and how to become one of them? Do I need to abandon my current website?

Well, this is an amp website. To convert your website to a valid amp website, you don’t need to abandon your current website, but just add new urls. In other words, you have your current website as it is along with amp version. Now if you put /amp/ after the current url of this article, you will see the amp version of this article.

Now, there are two ways to have an amp version of your website,
1- create one – There is complete documentation on how to build it.

facebook down

2- get it from here within no time. TechRomance’s amp version is build from there only. And it is completely free. Many other websites, like http://www.thekitchn.com/, http://www.collegehumor.com, http://www.storypick.com/, https://www.socialsamosa.com/, have already been tested there and works fine.
You can also test your website at http://amp.escalatingweb.com/?furl=YOUR_URL. In case you find design issues, they can be fixed within no time.

facebook down

Categories
bash bot headless browser non-browser phantomjs tor traffic web scraper

The Bot 2 : How to make a browserless web scraper?

We will continue from our last post, which discussed about how to make a simple bot that accesses webpages anonymously.
The bot there worked fine, but there are some drawbacks with that bot.
For ex- It used browsers to open webpages, which makes it little slow. Also, it leads to usage of more memory and storage(though cache can be cleared regularly). For sometimes, when the browser is closed forcefully, then it may pop up a dialog box asking to whether open the firefox in safe mode or reset it. This interrupts the automation of the bot. Now you have to reset the firefox proxy settings.

Now, in this post we will create a web scraper(the bot 2) that access web pages without webbrowsers ( browserless web scraper ). We are going to use phantomJs as a headless browser(executes javascript on the web page) and bash to automate it.

Programs
We will make two files phantomBot.js and bashBot.sh,

phantomBot.js

var page = require('webpage').create();
var system = require('system');
page.settings.resourceTimeout = 10000;
page.onResourceTimeout = function(error){
console.log(error.errorString);
console.log(error.errorCode);
console.log(error.url);
phantom.exit();
};

page.onResourceReceived = function(response){
console.log(“####”+response.id+”####”+response.status+”####”+response.url);
}

if (system.args.length===1){
console.log(“Enter Url”);
phantom.exit();
}else {
page.open(system.args[1], function(status){
console.log(status);
if (status===’success’){
var title = page.evaluate(function(){
return document.title;
});
console.log(title);
}
phantom.exit();
});
}

Explanation
1- page is a webpage object.
2- system is the object to receive command line variables
3- timeout for page load is set.
4- function is defined to be called on timeout.
5- function is defined to be called on successful data receive.
6- check if the url is passed in the command line.
7- open the url using the webpage object(page).
8- read the title of the document on successful load of the url.
9- exit the phantom.

bashBot.sh

sudo service tor restart
array=("http://www.example.com/p" "http://www.example.com/q")
for item in ${array[*]}
do
sudo phantomjs --proxy=127.0.0.1:9050 --proxy-type=socks5 phantomBot.js $item
done
sudo bash bashBot.sh

Explanation
1- tor is restarted to change the users ip.
2- an array of links that gives you money on getting traffic.(Do not leave spaces after or before ‘=’ sign)
3- iterate through each url and pass them to phantomjs program phantomBot.js to get them opened.
4- re-run the program.

Note
To start the execution of bot, type bash bashBot.sh in command line.

Great, you have created little more efficient bot ( browserless web scraper ).
Read websites’ terms, take your own risks and enjoy free money. 🙂

Categories
bot Proxy Python subprocess tor traffic web scraper webbrowser

The Bot : How To Make A Simple Anonymous Web Scraper?

Web scraper is a program to automate the process of accessing websites with or without browsers. In this post, by web scraping, I mean of only accessing the webpages. And the web scraper built here access webpages through web browsers.

An anonymous web scraper will be the one which keeps the identity of the program hidden. That means a program that accesses some website without revealing its information(ip address).

Usage(Though this should be used at one’s own risk)
There are websites which offer you money to bring traffic to their websites. Using such anonymous web scrappers (the bots), you can send fake traffic to their websites and earn some money.

Note: These programs are tested on ubuntu 14.04. Similar programs can be made on other platforms as well.
We will discuss two ways of making such web scraper here using python.
For the first method, we will use webbrowser library of python to open webpages, and tor to create anonymity. We will use subprocess library to automate it.

Bot

import time
import subprocess as sp
import webbrowser

urls = [“www.example.com/p”, “www.example.com/q”]
count =10000
while count>=0:
for url in urls:
webbrowser.open(url)
time.sleep(2)
time.sleep(4)
sp.call([“sudo”, “killall”, “firefox”])
sp.call([“sudo”, “/etc/init.d/tor”, “restart”])
count-=1

Explanation

1- urls contain the list of url, bringing traffic on which gives you money.
2- while loop makes the iteration over the list of urls.
3- each url is opened using webbrowser(default firefox) and waits for two seconds.
4- then it waits for 4 seconds after opening all the urls to let the pages load properly(these can be changed according to the time, website takes to load pages).
5- the firefox is forcefully closed
6- tor is restarted so that user ip is changed.

Note
Before running the program, set up the firefox for socks5 proxy and port no. 9050 to make requests through tor.

For the second method, we will simply open browser through subprocess,

import time
import subprocess as sp
import webbrowser

urls = [“www.example.com/p”, “www.example.com/q”]
count =10000
while count>=0:
for url in urls:
child = sp.Popen(“firefox %s” %url, shell=True)
time.sleep(2)
time.sleep(4)
sp.call([“sudo”, “killall”, “firefox”])
sp.call([“sudo”, “/etc/init.d/tor”, “restart”])
count-=1

Explanation
1- the webpages are opened as a subprocess

Now you are all set up with your anonymous web scraper.

Note
Do setup the firefox for proxy as in first method.
With such bots, they must execute javascript to send information, which can be done using browsers.
The other technique used to create bot using phantomJs and bash can be found here.
Read websites’ terms, take your own risks and enjoy free money. 🙂