Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Beautifulsoup Scraping
#3
1)
you have the wrong link for changing page numbers
try:
https://www.otodom.pl/wynajem/mieszkanie/krakow/?search%5Bdescription%5D=1&search%5Bsubregion_id%5D=410&search%5Bcity_id%5D=38&page=5
as opposed to:
https://www.otodom.pl/wynajem/mieszkanie/krakow/?search%5Bdescription%5D=1&search%5Bsubregion_id%5D=410&search%5Bcity_id%5D=38#form&page=5
omitting the #form part

2)
You only have to add the data-id attribute to obtain that part
house.find('a',class_="button-observed observe-link favourites-button observed-text")['data-id']
Output:
metulburr@ubuntu:~$ python3.6 forum11.py <Response [200]> 59342283
Recommended Tutorials:
Reply


Messages In This Thread
Beautifulsoup Scraping - by PolskaYBZ - Jun-21-2019, 10:26 AM
RE: Beautifulsoup Scraping - by snippsat - Jun-21-2019, 11:48 AM
RE: Beautifulsoup Scraping - by metulburr - Jun-21-2019, 12:07 PM
RE: Beautifulsoup Scraping - by PolskaYBZ - Jun-22-2019, 10:05 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Scraping based on years BeautifulSoup rhat398 0 1,849 May-22-2021, 07:20 PM
Last Post: rhat398
  Combining selenium and beautifulsoup for web scraping sumandas89 3 11,849 Jan-30-2018, 02:14 PM
Last Post: metulburr
  Scraping with BeautifulSoup Prince_Bhatia 8 7,223 Sep-07-2017, 06:34 PM
Last Post: Prince_Bhatia

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020