Scarpy is a great framework for scraping purpose. It has a very good structure for large projects and Oops style remove duplicate code.
```def parse(self, response):
yield FormRequest(posturl,
formdata{'username':'yourUserName','Password':'!Z6Dj2hqaR'},
callback=self.after_login)
def after_login(self, response):
yield Request("pageurl,callback=self.directory_page, meta={'page':1})
This Post is just for education Purpose.
This code shows how to get login in a website using Scrapy:-
yield FormRequest(posturl,
formdata{'username':'yourUserName','Password':'!Z6Dj2hqaR'},
callback=self.after_login)
def after_login(self, response):
yield Request("pageurl,callback=self.directory_page, meta={'page':1})
```
After this Scrapy takes care itself of session and cookies.
2 comments:
SHREE SAI PACKERS AND MOVERS
#18/3, 30ft road,, sri krishna colony,
kuduregere main road,, alur post,
Bangalore, Karnataka 562123
080736 70915
Packers and movers bangalore
Guru TV Repair
52 shampura main road, Munni veerappa layout
Kaval bairasandra
Bengaluru, Karnataka 560032
080888 33910
Led tv repair in bangalore
Graphica Gauges and Tools
S. No. 37, Ramnagar, Ramnagar Tempo Chowk,Vadgoensheri
Pune, Maharashtra 411014
098508 84992
Thread Ring Gauges
iRobo Wellness Private Limited
AryaHub Mall No. 22
Hope farm Junction Whitefield
Bangalore, Karnataka 560066
099806 58125
Massage chair
SHREE SAI PACKERS AND MOVERS
#18/3, 30ft road sri krishna colony kuduregere main road alur, post, Bengaluru, Karnataka 562123
+918073670915
https://shrisaimovers.com/
packers and movers bangalore
packers and movers bangalore
packers and movers bangalore
Post a Comment