I managed to do it using polipo. It can be installed on ubuntu from here.
Polipo can speak socks protocol as well as http protocol.
Polipo can be configured to receive requests through http proxy and forward the same requests through socks5 proxy.
I used it as a front-end proxy server to dryscrape, for the back-end tor proxy server.
So, now I set dryscrape's http proxy 127.0.0.1(machine ip) and port no. 8118(default port no. for polipo).
Now, Polipo forwards the same request to tor through socks5 proxy.
So, now I can use dryscrape to make request through socks5 proxy.
It is explained in more detail over here.
;)