ok i found i need to learn python :D :D
found hot to do it.
On Thursday, August 25, 2016 at 9:19:10 PM UTC+2, Raf Roger wrote:
>
> Hi,
>
> i would like for each page (in pagination) crawled, to retrieve/get the
> value of page.
> so if we are on page 1, i want to retrieve "1", if i'm on page 2, i want
> to get "2"
>
> here is a simple example of my code:
> def parse_start_url(self, response):
> return {"page number" : response.url.xxx}
>
> where xxx should return the value of url argument/parameter.
>
> However i do not know how to do that in scrapy :(
>
> my url should look like that:
> http://myweb.com/list?p=1
> http://myweb.com/list?p=2
> http://myweb.com/list?p=3
>
> maybe there could be more parameters, so i can not search for string "p="
> as i do not know how many digit the page number will be.
>
> how can i do that ? Is there a way to get the parameter value ?
> i search and i found something about getattr(response.url,
> the_missing_param) but i was not able to find more help or documentation
> about it.
>
> thx a lot
>
--
You received this message because you are subscribed to the Google Groups
"scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.