Unable to remove escape charactors from the print - python

Hi I am trying to extract information to put into a list containing plain text but can't find a way to remove the escape characters.
I am very new to python and programming in general. I have been trying to solve this but unable to find one.
This is my code:
import urllib
import re
from bs4 import BeautifulSoup
x=1
while x<2:
url = "http://search.insing.com/ts/food-drink/bars-pubs/bars-pubs?page=" +str(x)
htmlfile = urllib.urlopen(url).read()
soup = BeautifulSoup(htmlfile.decode('utf-8','ignore'))
reshtml = soup.find("div", "results").find_all("h3")
reslist = []
for item in reshtml:
res = item.get_text()
reslist.append(res)
print reslist
x += 1

seems like you're really after the text in the anchor there, consider changing
reshtml = soup.find("div", "results").find_all("h3")
to:
reshtml = [h3.a for h3 in soup.find("div", "results").find_all("h3")]
also change:
reslist.append(res)
to:
reslist.append(' '.join(res.split()))
here is what I get after changing:
[u'Parco Caffe', u'AdstraGold Microbrewery & Bistro Bar',
u'Alkaff Mansion Ristorante', u'The Fat Cat Bistro', u'Gravity Bar',
u'The Wine Company (Evans Road)', u'Serenity Spanish Bar & Restaurant (VivoCity)',
u'The New Harbour Cafe & Bar', u'Indian Times', u'Sunset Bay Beach Bar',
u'Friends # Jelita', u'Talk Cock Sing Song # Thomson',
u'En Japanese Dining Bar (UE Square)', u'Magma German Wine Bistro',
u"Tam Kah Shark's Fin", u'Senso Ristorante & Bar',
u'Hard Rock Cafe (HPL House)', u'St. James Power Station',
u'The St. James', u'Brotzeit German Bier Bar & Restaurant (Vivocity)']

The current output looks like this:
[u'\n\r\n Parco Caffe\n',
u'\n\r\n AdstraGold Microbrewery & Bistro Bar\n',
u'\n\r\n Alkaff Mansion Ristorante\n',
u'\n\r\n The Fat Cat Bistro\n',
u'\n\r\n Gravity Bar\n',
u'\n\r\n The Wine Company\r\n (Evans Road)\r\n \n',
u'\n\r\n Serenity Spanish Bar & Restaurant\r\n (VivoCity)\r\n \n',
u'\n\r\n The New Harbour Cafe & Bar\n',
u'\n\r\n Indian Times\n',
u'\n\r\n Sunset Bay Beach Bar\n',
u'\n\r\n Friends # Jelita\n',
u'\n\r\n Talk Cock Sing Song # Thomson\n',
u'\n\r\n En Japanese Dining Bar\r\n (UE Square)\r\n \n',
u'\n\r\n Magma German Wine Bistro\n',
u"\n\r\n Tam Kah Shark's Fin\n",
u'\n\r\n Senso Ristorante & Bar\n',
u'\n\r\n Hard Rock Cafe\r\n (HPL House)\r\n \n',
u'\n\r\n St. James Power Station \n',
u'\n\r\n The St. James\n',
u'\n\r\n Brotzeit German Bier Bar & Restaurant\r\n (Vivocity)\r\n \n']
Adding these lines before the print:
reslist = [y.replace('\n','').replace('\r','') for y in reslist]
reslist = [y.strip() for y in reslist]
Gives me this output:
[u'Alkaff Mansion Ristorante',
u'Parco Caffe',
u'AdstraGold Microbrewery & Bistro Bar',
u'Gravity Bar',
u'The Fat Cat Bistro',
u'The Wine Company (Evans Road)',
u'Serenity Spanish Bar & Restaurant (VivoCity)',
u'The New Harbour Cafe & Bar',
u'Indian Times',
u'Sunset Bay Beach Bar',
u'Friends # Jelita',
u'Talk Cock Sing Song # Thomson',
u'En Japanese Dining Bar (UE Square)',
u'Magma German Wine Bistro',
u"Tam Kah Shark's Fin",
u'Senso Ristorante & Bar',
u'Hard Rock Cafe (HPL House)',
u'St. James Power Station',
u'The St. James',
u'Brotzeit German Bier Bar & Restaurant (Vivocity)']
Is that what you are looking for?
Guy's answer is much better, and more BeautifulSoup specific.

Related

How do I remove the <a href... tags from my web scrapper

So, right now, what I'm trying to do is that I'm trying to scrape a table from rottentomatoes.com and but every time I run the code, I'm facing an issue that it just prints <a href tags. For now, all I want are the Movie titles numbered.
This is my code so far:
from requests import get
from bs4 import BeautifulSoup
import pandas as pd
import numpy as np
url = "https://www.rottentomatoes.com/top/bestofrt/"
headers = {"Accept-Language": "en-US, en;q=0.5"}
titles = []
year_released = []
def get_requests():
try:
result = requests.get(url=url)
soup = BeautifulSoup(result.text, 'html.parser')
table = soup.find('table', class_='table')
for name in table:
td = soup.find_all('a', class_='unstyled articleLink')
titles.append(td)
print(titles)
break
except:
print("The result could not get fetched")
And this is my output:
[[Opening This Week, Top Box Office, Coming Soon to Theaters, Weekend Earnings, Certified Fresh Movies, On Dvd & Streaming, VUDU, Netflix Streaming, iTunes, Amazon and Amazon Prime, Top DVD & Streaming, New Releases, Coming Soon to DVD, Certified Fresh Movies, Browse All, Top Movies, Trailers, Forums,
View All
,
View All
, Top TV Shows, Certified Fresh TV, 24 Frames, All-Time Lists, Binge Guide, Comics on TV, Countdown, Critics Consensus, Five Favorite Films, Now Streaming, Parental Guidance, Red Carpet Roundup, Scorecards, Sub-Cult, Total Recall, Video Interviews, Weekend Box Office, Weekly Ketchup, What to Watch, The Zeros, View All, View All, View All,
It Happened One Night (1934),
Citizen Kane (1941),
The Wizard of Oz (1939),
Modern Times (1936),
Black Panther (2018),
Parasite (Gisaengchung) (2019),
Avengers: Endgame (2019),
Casablanca (1942),
Knives Out (2019),
Us (2019),
Toy Story 4 (2019),
Lady Bird (2017),
Mission: Impossible - Fallout (2018),
BlacKkKlansman (2018),
Get Out (2017),
The Irishman (2019),
The Godfather (1972),
Mad Max: Fury Road (2015),
Spider-Man: Into the Spider-Verse (2018),
Moonlight (2016),
Sunset Boulevard (1950),
All About Eve (1950),
The Cabinet of Dr. Caligari (Das Cabinet des Dr. Caligari) (1920),
The Philadelphia Story (1940),
Roma (2018),
Wonder Woman (2017),
A Star Is Born (2018),
Inside Out (2015),
A Quiet Place (2018),
One Night in Miami (2020),
Eighth Grade (2018),
Rebecca (1940),
Booksmart (2019),
Logan (2017),
His Girl Friday (1940),
Portrait of a Lady on Fire (Portrait de la jeune fille en feu) (2020),
Coco (2017),
Dunkirk (2017),
Star Wars: The Last Jedi (2017),
A Night at the Opera (1935),
The Shape of Water (2017),
Thor: Ragnarok (2017),
Spotlight (2015),
The Farewell (2019),
Selma (2014),
The Third Man (1949),
Rear Window (1954),
E.T. The Extra-Terrestrial (1982),
Seven Samurai (Shichinin no Samurai) (1956),
La Grande illusion (Grand Illusion) (1938),
Arrival (2016),
Singin' in the Rain (1952),
The Favourite (2018),
Double Indemnity (1944),
All Quiet on the Western Front (1930),
Snow White and the Seven Dwarfs (1937),
Marriage Story (2019),
The Big Sick (2017),
On the Waterfront (1954),
Star Wars: Episode VII - The Force Awakens (2015),
An American in Paris (1951),
The Best Years of Our Lives (1946),
Metropolis (1927),
Boyhood (2014),
Gravity (2013),
Leave No Trace (2018),
The Maltese Falcon (1941),
The Invisible Man (2020),
12 Years a Slave (2013),
Once Upon a Time In Hollywood (2019),
Argo (2012),
Soul (2020),
Ma Rainey's Black Bottom (2020),
The Kid (1921),
Manchester by the Sea (2016),
Nosferatu, a Symphony of Horror (Nosferatu, eine Symphonie des Grauens) (Nosferatu the Vampire) (1922),
The Adventures of Robin Hood (1938),
La La Land (2016),
North by Northwest (1959),
Laura (1944),
Spider-Man: Far From Home (2019),
Incredibles 2 (2018),
Zootopia (2016),
Alien (1979),
King Kong (1933),
Shadow of a Doubt (1943),
Call Me by Your Name (2018),
Psycho (1960),
1917 (2020),
L.A. Confidential (1997),
The Florida Project (2017),
War for the Planet of the Apes (2017),
Paddington 2 (2018),
A Hard Day's Night (1964),
Widows (2018),
Never Rarely Sometimes Always (2020),
Baby Driver (2017),
Spider-Man: Homecoming (2017),
The Godfather, Part II (1974),
The Battle of Algiers (La Battaglia di Algeri) (1967), View All, View All]]
Reading tables via pandas.read_html() as provided by #F.Hoque would probably the leaner approache but you can also get your results with BeautifulSoup only.
Iterate over all <tr> of the <table>, pick information from tags via .text / .get_text() and store it structured in list of dicts:
data = []
for row in soup.select('table.table tr')[1:]:
data.append({
'rank': row.td.text,
'title': row.a.text.split(' (')[0].strip(),
'releaseYear': row.a.text.split(' (')[1][:-1]
})
Example
import requests
from bs4 import BeautifulSoup
url = "https://www.rottentomatoes.com/top/bestofrt/"
headers = {"Accept-Language": "en-US, en;q=0.5"}
result = requests.get(url=url)
soup = BeautifulSoup(result.text, 'html.parser')
data = []
for row in soup.select('table.table tr')[1:]:
data.append({
'rank': row.td.text,
'title': row.a.text.split(' (')[0].strip(),
'releaseYear': row.a.text.split(' (')[1][:-1]
})
data
Output
[{'rank': '1.', 'title': 'It Happened One Night', 'releaseYear': '1934'},
{'rank': '2.', 'title': 'Citizen Kane', 'releaseYear': '1941'},
{'rank': '3.', 'title': 'The Wizard of Oz', 'releaseYear': '1939'},
{'rank': '4.', 'title': 'Modern Times', 'releaseYear': '1936'},
{'rank': '5.', 'title': 'Black Panther', 'releaseYear': '2018'},...]

Python webscraper only returns 'None'

I am trying to write a program to scrape eBay to show me an inventory of products, but all I get printed to the terminal is 'None'. I am expecting a title of the product.
I've changed my code to 'find' different keywords, but the output is always the same 'None', usually that means that it can't find the specified keyword, but the keywords I enter are shown on the web page and in 'inspect element'.
Here's a snippet:
def get_detail_data(soup):
try:
title = soup.find('div', class_="it-ttl").find('itemprop')
except:
title = ''
I am trying to fetch only the results that correspond with the keyword I enter into the program.
Probably the selector is wrong. I was able to extract titles from eBay HTML with this code.
from bs4 import BeautifulSoup
import requests
import os
params = {"_nkw": "coffee"}
headers = {
"User-Agent":
"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 OPR/66.0.3515.103"
}
proxies = {"http": os.getenv("PROXY_URL")}
# r = requests.get("https://www.ebay.com/sch/i.html", params=params, headers=headers, proxies=proxies)
# html = r.content
html = open("ebay.html", "r").read()
soup = BeautifulSoup(html, "lxml")
titles = [title.get_text() for title in soup.select("h3.s-item__title")]
print(titles)
Output
['Custom Photo Mug Coffee Cup Picture Photo Text Phrase Logo Personalized Gift', 'Automatic Self Stirring Coffee Mixing Cup Mug 400ml Electric Stainless Steel NEW', 'Grinch Cup Of Fuckoffee One Splash No One Cares Gift Black Coffee Mug', '6 Pack Stainless Steel Coffee Soup Mug Tumbler Camping Mug Cup 12oz ', 'BULLET THERMOS 16oz Coffee Hunting Hot Insulated Stainless Steel Cup Mug Flask', 'Lot of 1-48 Pack Stainless Steel Coffee Soup Mug Tumbler Camping Mug Cup 16 oz ', 'Custom Magic Coffee Cup Personalized Image Photo Text Color Changing Mug Gift', '400ml Automatic Self Stirring Mug Coffee Cup Mixer Tea Home Insulated Green', 'Set of 2 Strong Glass Double Wall Coffee Mug Tea Espresso Cup 16oz with Wood Lid', 'Funny Mug Donald Trump 45 Coffee Mug President Gun Right Cup Political Gifts Mug', 'Custom Photo Mug Coffee Cup Picture Photo Text Phrase Logo Personalized Gift 15', 'Trump 2020 Keep America Great Office Work Cup Gift Coffee Tea Ceramic Mug', 'New ListingNew Custom Red coffee cup set', 'Green Self Stirring Mug Coffee Cup Tea Auto Mixer Drink Insulate Stainless 400ml', 'Have A Nice Day Coffee Mug Middle Finger Funny Cup for Milk, Juice, Tea, Coffee ', 'Custom Magic Coffee Cup Personalized Image Photo Text Heart Handle Inner Colour', 'New ListingJoe Biden & Harris 46th President Inauguration Day 2021 Coffee Mug Gifts Cup', 'Travel Coffee Mug Stainless Steel Lid Tea Drink Tea Cup Handle Double Wall 10 Oz', 'MAGA Make America Great Again 45th President Donald Trump Coffee Mug Cup', 'Black Pistol Gun Mug Coffee Tea Beverage Cup Novelty Handgun Grip Joke Gift', 'Auto Mixing coffee cup Stainless Electric Lazy Self Stirring Mug Tea Mug', 'Personalized Coffee Mug Custom Photo Text Logo Name Printed Gift Ceramic Cup ', 'Baby Yoda The Child Mandalorian Mug No Coffee No Forcee Meme Ceramic ( Black)', 'HOT & Cold Double Insulated Self Stirring Funny Joke Mug Electric Coffee Cup WS', '400ML Camera Lens Cup Coffee Travel Mug Thermos Stainless Steel Leak-Proof Lid', 'Trump 2020 Keep America Great - Ceramic Coffee Mug Tea Cup', 'Mug Set of 5, Coffee Cup with Accent Spoon Tea Cups 12 Oz. Porcelain Mugs Black', 'MAGA Make America Great Again 45th President Donald Trump Coffee Mug Cup', 'Starbucks Style 18oz Stainless Steel Thermal Insulated Chubby Coffee Mug Cup', 'To My Wife Gift Mug - Never Forget That I Love You - Coffee Mug Tea Cup Gift', 'Donald Trump Twitter Ban Funny Gift White Coffee Mug 11Oz 15Oz', "New ListingFunny Valentine's Coffee Mug for Men - Thanks for All the Coffee Mug - Valentine", 'Bruntmor Porcelain Coffee Cups Mugs Set of 6 Large sized 12 Ounce Matte Black', 'New ListingRare! MAC MILLER Coffee Mug Cup Tea 11oz ', 'New ListingGifts For Husband - You Are My Everything Coffee Mug - Meaningful Gift Idea ', 'New ListingCeramic Coffee Tea Cup Gift, Funny Coffe Mug Gift Mug Coffee Tea Cup ', 'I love catturd mug Perfect gift for valentine day, Best gift ever', 'New ListingWorlds Best Boss Mug 12oz Manager Gift Supervisor Coworker Coffee Cup', 'Maxam 15oz Double Wall Stainless Steel Coffee Cup', 'To My Gorgeous Wife Meeting You Was Fate Black Ceramic 11oz 15oz Coffee Tea Cup', 'New ListingFunny Naruto Coffee Tea Cup Mug', 'New ListingHallmark Signature Sunflower Coffee Cup Mug Always', 'New ListingInspired ! Kiss Band Ricks White Tea Coffee Mug Cup 11oz', '12V Electric Heated Travel Mug Stainless Steel Coffee Tea Cup Warmer Heater NEW', 'Stainless Steel Insulated Double Wall Travel Coffee Mug Cup 14 Oz Thermos Tea !!', 'New ListingJoe Biden -Trump Coffee Mug Cup 11oz Tea Coffee', 'New ListingA Ceramic Coffee Mug Beverage Cup ..."Shopping Solves Everything" ', 'The Big Guy Coffee Mug Joe Biden Sunglasses Red White Blue Election Coffee Cup', 'Bruntmor Ceramic Stacking Coffee Mug Set Tea Cup Set of 6 Matte Black 18 Ounce', 'New ListingThankful Porcelain Ceramic Thanksgiving and Fall Coffee Mug', 'To My Husband Never Forget That I Love You If Could Give One Gift Coffee Mug', 'Stainless Steel Insulated Travel Coffee Mug CUP 16 OZ NEW! PURPLE color', 'Funny Parody Middle Finger Coffee Mug Home Office Ceramic Porcelain Tea Cup Gift', '2pk Donut Warming White Ceramic Coffee Mug Set 20oz Cup Drip Trap Mustache Guard', 'Firefly Serenity Shiny Coffee Mug Tea Cup Novelty Gift Mugs', 'Polka Dot Coffee Cups Mugs Set of 6 Large sized 16 Ounce Ceramic Coffee Mug Set', 'Customized Prescription Bottle Coffee Mug Tea Cup', 'Camera Lens 24-105mm Travel Coffee Mug / Cup with Drinking Lid Best Gift', "New ListingCeramic Coffee Mug with Joe Biden's Big Cup Campaign Design for Presidents 11oz", 'Stainless Steel Double Wall Mug Cup Portable Travel Coffee Tea Cups 500/350ml', 'New ListingCalm The Hell Down Coffee Mug', 'Ceramic Coffee Cups Mugs Set of 6 Large-sized 16 Ounce Grooved Mugs Matte Black', "Big Sister Mug - Big Sister Gift - God Created My World's Best Funny Coffee Cup"]

Unable to scrape similar links from different depth out of a webpage

I've created a script in python to parse different links from a webpage. There are two section in the landing page. One is Top Experiences and the other is More Experiences. My current attempt can fetch the links from both the categories.
The type of links I wanna collect are (few of them) under the Top Experiences section at this moment. However, when I traverse the links under More Experiences section, I can see that they all lead to the page in which there is a section named Experiences under which there are links that are similar to the links under Top Experiences in the landing page. I wanna grab them all.
One such desirable link I'm after looks like: https://www.airbnb.com/experiences/20712?source=seo.
website link
My current attempt fetches the links from both the categories:
import requests
from urllib.parse import urljoin
from bs4 import BeautifulSoup
URL = "https://www.airbnb.com/sitemaps/v2/experiences_pdp-L0-0"
def get_links(link):
res = requests.get(link)
soup = BeautifulSoup(res.text,"lxml")
items = [urljoin(link,item.get("href")) for item in soup.select("div[style='margin-top:16px'] a._1f0v6pq")]
return items
if __name__ == '__main__':
for item in get_links(URL):
print(item)
How can I parse all the links under Top Experiences section along with the links under Experiences section that can be found upon traversing the links under More Experiences?
Please check out the image if anything unclear. I used a pen available in paint so the writing may be a little hard to understand.
The solution is slightly tricky. It can be achieved in several ways. The one I find most useful is use the links under More Experiences within get_links() function recursively. All the links under More Experiences have a common keyword _pdp-.
So, when you define condional statement within the function to make the links sieve through the function get_links() recursively then the else block will produces the desired links. Most important thing to notice is that all the desired links are within the class _1f0v6pq So the logic of getting the links is fairly easy .
import requests
from urllib.parse import urljoin
from bs4 import BeautifulSoup
URL = "https://www.airbnb.com/sitemaps/v2/experiences_pdp-L0-0"
def get_links(link):
res = requests.get(link)
soup = BeautifulSoup(res.text,"lxml")
for item in soup.select("div[style='margin-top:16px'] a._1f0v6pq"):
if "_pdp-" in item.get("href"):
get_links(urljoin(URL,item.get("href")))
else:
print(urljoin(URL,item.get("href")))
if __name__ == '__main__':
get_links(URL)
Process:
Get all Top Experiences links
Get all More Experiences links
Send a request to all More Experiences links one by one and get the links under Experiences in each page.
The div under which the links are present are same for all the pages have the same class _12kw8n71
import requests
from urllib.parse import urljoin
from bs4 import BeautifulSoup
from time import sleep
from random import randint
URL = "https://www.airbnb.com/sitemaps/v2/experiences_pdp-L0-0"
res = requests.get(URL)
soup = BeautifulSoup(res.text,"lxml")
top_experiences= [urljoin(URL,item.get("href")) for item in soup.find_all("div",class_="_12kw8n71")[0].find_all('a')]
more_experiences= [urljoin(URL,item.get("href")) for item in soup.find_all("div",class_="_12kw8n71")[1].find_all('a')]
generated_experiences=[]
#visit each link in more_experiences
for url in more_experiences:
sleep(randint(1,10))#avoid blocking by putting some delay
generated_experiences.extend([urljoin(URL,item.get("href")) for item in soup.find_all("div",class_="_12kw8n71")[0].find_all('a')])
Notes:
Your required links will be present in three lists top_experiences , more_experiences and generated_experiences
I have added random delay to avoid getting blocked.
Not printing the lists as it will be too long.
top_experiences - 50 links
more_experiences - 299 links
generated_experiences -14950 links
Seem like both the "Top Experience" and "More experiences" links share the same class so you can just use .find_all to obtain the links.
import requests
#from urllib.parse import urljoin
from bs4 import BeautifulSoup
# URL to scrape
url = "https://www.airbnb.com/sitemaps/v2/experiences_pdp-L0-0"
# Make request and Initialize BS4 with request content
req = requests.get(url)
soup = BeautifulSoup(req.content, "lxml")
# Tag that contains "Top Experiences" and "More Experiences"
soup.find_all(class_="_l8g1fr")
# Test Code
#Prints title of links and the href
links = soup.find_all(class_="_l8g1fr")
for link in links:
print(link.find("a").get_text())
print(link.find("a").get('href'))
Refactor code to meet your coding paradigm.
You can scrape from the divs with class "_12kw8n71":
from bs4 import BeautifulSoup as soup
import requests
d = soup(requests.get('https://www.airbnb.com/sitemaps/v2/experiences_pdp-L0-0').text, 'html.parser')
a, b, *_ = d.find_all('div', {'class':'_12kw8n71'})
result = {'top_experiences':[[i.text, i['href']] for i in a.find_all('a')], 'more_experiences':[[i.text, i['href']] for i in b.find_all('a')]}
Output (Only top experiences and part of the links from more experiences, as the full output exceeds Stackoverflow's character limit):
{'top_experiences': [["#1 HOLLYWOOD SIGN TOUR - WORLD'S BEST", '/experiences/26790?source=seo'], ['**#1-COMEDY/INSTAGRAM HOLLYWOOD WALK**', '/experiences/94033?source=seo'], ["A Potter's Wheel in Brooklyn", '/experiences/139532?source=seo'], ['Absolute: Seoul Pub Crawl & Party', '/experiences/161886?source=seo'], ['Amsterdam Experience Cruise', '/experiences/145329?source=seo'], ['Argentine Tango classes in London', '/experiences/241771?source=seo'], ['Axe throwing Canadian Experience', '/experiences/372251?source=seo'], ['Be a chocolate maker for a day', '/experiences/161912?source=seo'], ['Chianti in a Glass', '/experiences/179469?source=seo'], ['Cooking class in the Chianti Hills', '/experiences/25122?source=seo'], ['Cycle and Snack through hidden Bangkok', '/experiences/315116?source=seo'], ['Discover Valpolicella', '/experiences/77468?source=seo'], ["Don't watch Soweto, be part of Soweto", '/experiences/243188?source=seo'], ['Explore Pompeii w/ an Archaeologist', '/experiences/176605?source=seo'], ['Explore backstreets with a historian', '/experiences/90528?source=seo'], ['Explore the hidden food gems of Athens', '/experiences/256850?source=seo'], ['Fall and Winter Forest Trail Rides', '/experiences/236040?source=seo'], ['Foodies of Palermo - street food tour', '/experiences/212673?source=seo'], ['Forge a silver ring with jewellers', '/experiences/209198?source=seo'], ['Handmade Family Pasta & Tiramisù', '/experiences/115906?source=seo'], ['Hidden Gems of Old Delhi', '/experiences/154177?source=seo'], ['Hike Runyon Canyon with a rescue dog', '/experiences/82265?source=seo'], ['Hike Table Mountain with a Guide!', '/experiences/137248?source=seo'], ['Kayak in La Jolla', '/experiences/132375?source=seo'], ['Lakehouse Jazz', '/experiences/53239?source=seo'], ["Lisbon's best flavors", '/experiences/64564?source=seo'], ["London's Top Sights Tour : Fun Guide!", '/experiences/203605?source=seo'], ['Make ramen noodles from scratch', '/experiences/61279?source=seo'], ['Mount Etna excursion and lava tubes', '/experiences/221142?source=seo'], ['Must Have L.A. Pictures!', '/experiences/59665?source=seo'], ['MySurf School Bali', '/experiences/153910?source=seo'], ['PASTAMANIA', '/experiences/103280?source=seo'], ['Paddle with the Penguins', '/experiences/112515?source=seo'], ['Paella Maestro', '/experiences/51311?source=seo'], ["Paris' Best Kept Secrets Tour", '/experiences/113388?source=seo'], ['Play, Walk & Feed Anteaters +Kinkajou', '/experiences/270405?source=seo'], ['Red Dunes Safari & BBQ #The Real Camp', '/experiences/105242?source=seo'], ['San José Chocolate Tasting Tour', '/experiences/280822?source=seo'], ['Snorkel in Manly with a local expert', '/experiences/66873?source=seo'], ['Sunrise SUP into Caves & Grottos', '/experiences/242911?source=seo'], ['Sushi-making Experience', '/experiences/53271?source=seo'], ['Swim with sea lions in their natural habitat', '/experiences/327235?source=seo'], ['The Drinking & Prohibition walk', '/experiences/102778?source=seo'], ['The Ultimate Harry Potter Walking Tour', '/experiences/188432?source=seo'], ['Tsukiji (Old) vs Toyosu (New) S.S Tour', '/experiences/71924?source=seo'], ['Wolf Encounter', '/experiences/47240?source=seo'], ['XXL Wild&Organic Roman food: Eat&Learn', '/experiences/161461?source=seo'], ['Your First Chinese Seal-engraving Work', '/experiences/166172?source=seo'], ['Под руку с духами по старой Москве', '/experiences/94558?source=seo'], ["⭐BIKE to taste the world's BEST TACOS!", '/experiences/75047?source=seo']], 'more_experiences': [[" Flying Trapeze - 'Ten Things I Hate About You' Tour", '/sitemaps/v2/experiences_pdp-L1-0'], ["'The Devil in the White City' Tour - 23:59 in Paris", '/sitemaps/v2/experiences_pdp-L1-1'], ["24h en Republica Dominicana - 80s Cover Band's Secret Gig[FUKUOKA]", '/sitemaps/v2/experiences_pdp-L1-2'], ['80s Nights - A Journey Through History', '/sitemaps/v2/experiences_pdp-L1-3'], ["A Journey for the Tastebuds, in Malaga - A Tea Sommelier's Zen Tea Party", '/sitemaps/v2/experiences_pdp-L1-4'], ['A Time for Home - A music walk with a french composer', '/sitemaps/v2/experiences_pdp-L1-5'], ['A musical walk in Salzburg - ANALOG PHOTOGRAPHY in DC! Shoot FILM!', '/sitemaps/v2/experiences_pdp-L1-6'], ['ANGEL, ENERGIA GASTRONOMICA ANCESTRAL! - Acuarela al aire libre en Poblenou', '/sitemaps/v2/experiences_pdp-L1-7'], ['Acupuncture in Historic Clinic - Afternoon tea at the Casavant Villa', '/sitemaps/v2/experiences_pdp-L1-8'], ["Afterwork dans un Atelier d'Artistes - Alpine Raft Expérience", '/sitemaps/v2/experiences_pdp-L1-9'], ['Alpine Tour Skiing Uphill/Downhill - Amélie en live!', '/sitemaps/v2/experiences_pdp-L1-10'], ['An African Dance & Cultural Experience - Another BKK', '/sitemaps/v2/experiences_pdp-L1-11'], ['Another Etna: Trekking, Food and Wine - Aprende o perfecciona bailes caribeños', '/sitemaps/v2/experiences_pdp-L1-12'], ['Aprende una actividad unica de Oaxaca - Around historical area with lovely dog', '/sitemaps/v2/experiences_pdp-L1-13'], ['Around the Neva & its embankments - Art tour Soumaya & Jumex Museums visit', '/sitemaps/v2/experiences_pdp-L1-14'], ['Art tour at Bellas Artes - Ascent to the crater of the Puracé volcano', '/sitemaps/v2/experiences_pdp-L1-15'], ['Asciende a la cima del Batea Mahuida - Atlas Mountains Day Trip: imlil Valley', '/sitemaps/v2/experiences_pdp-L1-16'], ['Atlas Mountains Full day Cultural Trip - Authentic Tango Night', '/sitemaps/v2/experiences_pdp-L1-17'], ['Authentic Tango with Live Music - BIARRITZ WALKING HISTORICAL TOUR', '/sitemaps/v2/experiences_pdp-L1-18'], ['BIG SUP Fun - Paddle Sevilla! - Bake ‘Dorayaki’ Japanese pancake', '/sitemaps/v2/experiences_pdp-L1-19'], ['Bakery Hop with Perth Brunch Bloggers - Banyuatis-Munduk Amazing Bike Tour', '/sitemaps/v2/experiences_pdp-L1-20'], ["Baptism of Rome for First-Timers - Batik: What's That?", '/sitemaps/v2/experiences_pdp-L1-21'], ['Batom vermelho - um estilo de vida - Beach Exercise Under The Sun', '/sitemaps/v2/experiences_pdp-L1-22'], ['Beach FlowJAM - Become Captain of the Day with Vicky', '/sitemaps/v2/experiences_pdp-L1-23'], ['Become Reiki 1 Certified in Hawaii! - Beginner Workshop', '/sitemaps/v2/experiences_pdp-L1-24'], ['Beginner and Kid Friendly Kayak Tour - Best Croissants + Coffee of Paris Walk', '/sitemaps/v2/experiences_pdp-L1-25'], ['Best Dirt Biking Experience in KL! - Big Easy Food Tours', '/sitemaps/v2/experiences_pdp-L1-26'], ['Big Fish In The Big Apple - Bike the Wineries', '/sitemaps/v2/experiences_pdp-L1-27'], ['Bike the local backroads - Birdwatching al Parco del Circeo', '/sitemaps/v2/experiences_pdp-L1-28'], ['Birdwatching and camping - Boat Trip at Arrabida with Lunch', '/sitemaps/v2/experiences_pdp-L1-29'], ['Boat Trip to historic Clonmacnoise - Boozin in Brooklyn: Spirits & Beer', '/sitemaps/v2/experiences_pdp-L1-30'], ["Boozy Icy Secrets - Breakfast Coffee Yoga # Kellogg's Cafe", '/sitemaps/v2/experiences_pdp-L1-31'], ['Breakfast With The (Chicago) Bear - Brugge voor jou.', '/sitemaps/v2/experiences_pdp-L1-32'], ['Brumby (wild) Horse Experience - Bushwalk with Bob', '/sitemaps/v2/experiences_pdp-L1-33'], ["Bushwalking; Airlie's best kept secret - Cabalgata, pasión por la aventura.", '/sitemaps/v2/experiences_pdp-L1-34'], ['Cabalgatas "Buscando el sol de ayer" - Camina por el parque observando aves', '/sitemaps/v2/experiences_pdp-L1-35'], ['Camina por la Historia de Jujuy - Canoeing with Champagne and Pastries', '/sitemaps/v2/experiences_pdp-L1-36'], ['Canoeing, Kayaking, Cycling in Catba - Capture your relationship in photos', '/sitemaps/v2/experiences_pdp-L1-37'], ['Capture your smile in beautiful hanbok - Catalonia Sailing Xperience', '/sitemaps/v2/experiences_pdp-L1-38'], ['Catalonia from Above - Cervantes Tapas Crawl Alcalá d Henares', '/sitemaps/v2/experiences_pdp-L1-39'], ['Cervezas artesanales de Querétaro - Cherry blossom viewing party in Ueno', '/sitemaps/v2/experiences_pdp-L1-40'], ['Cherry blossoms and your photo session - Chocolate tasting and tour', '/sitemaps/v2/experiences_pdp-L1-41'], ['Chocolate therapy - City Tour With Visit to Teatro Colon', '/sitemaps/v2/experiences_pdp-L1-42'], ['City Tour around Cali - Climb a sea cliff in El Empordà coast', '/sitemaps/v2/experiences_pdp-L1-43'], ['Climb an iconic hill with an instructor - Cocktails and Canapés', '/sitemaps/v2/experiences_pdp-L1-44'], ['Cocktails and Canvas - Columbia River King Salmon Fishing', '/sitemaps/v2/experiences_pdp-L1-45'], ['Columbus Cemetery. History and Art - Conhecendo o centro do recife', '/sitemaps/v2/experiences_pdp-L1-46'], ['Conhecendo o litoral e as belas praias - Cook great traditional dish with Heba', '/sitemaps/v2/experiences_pdp-L1-47'], ['Cook with Cristiana and Mamma Nora - Cook shelf mania.. authentic n savory', '/sitemaps/v2/experiences_pdp-L1-48'], ['Cook tapas at a secret private eatery - Cooking Spanish "tapas"', '/sitemaps/v2/experiences_pdp-L1-49'], ['Cooking Spanish classics with Soul! - Copenhagen Skyline Art Workshop', '/sitemaps/v2/experiences_pdp-L1-50'], ['Copenhagen Small Group Tour - Couture dans un atelier de Montmartre', '/sitemaps/v2/experiences_pdp-L1-51'], ["Covered Walkways Through a Writer’s Eyes - Crawlin' in the City - Bar Crawl", '/sitemaps/v2/experiences_pdp-L1-52'], ["Crazy French Sauces - Create a Story in a Writer's Retreat", '/sitemaps/v2/experiences_pdp-L1-53'], ['Create a Travel Journal - Create with a pro tie-dye artist', '/sitemaps/v2/experiences_pdp-L1-54'], ['Create wooden guitar picks and jewelry - Creative Raw Vegan Cooking Workshop', '/sitemaps/v2/experiences_pdp-L1-55'], ['Creative Rendezvous in Copenhagen - Créer ses cosmétiques naturels (DIY)', '/sitemaps/v2/experiences_pdp-L1-56'], ['Créer un Mandala Energétique - Cupcake Bake & Decorate - Spitalfields', '/sitemaps/v2/experiences_pdp-L1-57'], ['Cupcake Bouquet Class - Cycling in quiet NE. Connecticut.', '/sitemaps/v2/experiences_pdp-L1-58'], ['Cycling in the Don Valley - DJ WORKSHOP IN AACHEN GEBE DEN TAKT AN', '/sitemaps/v2/experiences_pdp-L1-59'], ['DJ Workshop and Indie Scene Night - Dark tour of Split', '/sitemaps/v2/experiences_pdp-L1-60'], ['Darkroom Photography in Kuala Lumpur - Decorative Wreath Workshop', '/sitemaps/v2/experiences_pdp-L1-61'], ['Decoupage for DIY memorabilia & gifts - Descubre México a través de la foto', '/sitemaps/v2/experiences_pdp-L1-62'], ['Descubre Playa Blanca, Saltos - Design a Garment in the World Market', '/sitemaps/v2/experiences_pdp-L1-63'], ['Design a game level in a game studio - Dinghy Sailing at El Portet', '/sitemaps/v2/experiences_pdp-L1-64'], ['Dingle Traditional Rowing - Discover CDMX from the best Rooftops', '/sitemaps/v2/experiences_pdp-L1-65'], ['Discover Caen "Art de vivre" - Discover Manzanita Scavenger Hunt', '/sitemaps/v2/experiences_pdp-L1-66'], ["Discover Marrakech Secrets by Bike - Discover Tarraco's living history", '/sitemaps/v2/experiences_pdp-L1-67'], ['Discover Tarragona coast from the sea - Discover nd paint your Aztec protector', '/sitemaps/v2/experiences_pdp-L1-68'], ['Discover new flavors with an oenophile - Discover the cosmos', '/sitemaps/v2/experiences_pdp-L1-69'], ['Discover the emotion of Kitesurf - Discovering Montjuic Hill', '/sitemaps/v2/experiences_pdp-L1-70'], ['Discovering Old Medina of Casablanca - Diving, Dipping, Swiming in Varadero', '/sitemaps/v2/experiences_pdp-L1-71'], ['Dj Workshop - Downtown Toronto Photoshoot Experience', '/sitemaps/v2/experiences_pdp-L1-72'], ['Downtown Traditional Cantina Pub Crawl - Drinking&Eating with Tokyohandsomeboy', '/sitemaps/v2/experiences_pdp-L1-73'], ['Drinks and a Show Walking Tour - Découverte des dauphins', '/sitemaps/v2/experiences_pdp-L1-74'], ['Découverte des spiritueux québécois - EL FASCINANTE MUNDO DEL MOSAICO', '/sitemaps/v2/experiences_pdp-L1-75'], ['ELDORADO: sus plantas y lugares. - Eat Like a Local - Dinner Experience', '/sitemaps/v2/experiences_pdp-L1-76'], ['Eat Like a Local at Butterworth - Eco Friendly Ranch & Petting Zoo', '/sitemaps/v2/experiences_pdp-L1-77'], ['Eco Hike in Pinar del Rio - Electric Skateboard down Paris', '/sitemaps/v2/experiences_pdp-L1-78'], ['Electric Skateboard the Highline Canal - Enigmatic / Sintra', '/sitemaps/v2/experiences_pdp-L1-79'], ['Enjoin Local Meal By Taking Vegetable - Enjoy local food experience in Tokyo!', '/sitemaps/v2/experiences_pdp-L1-80'], ['Enjoy local western part of Jeju ! - Escalada en Roca en Acantilados Valpo', '/sitemaps/v2/experiences_pdp-L1-81'], ['Escalada en Tarifa - Everyone Can Dance! Brussels', '/sitemaps/v2/experiences_pdp-L1-82'], ['Everyone can do Calligraphy - Experience Fabulous698B! Spring menu!', '/sitemaps/v2/experiences_pdp-L1-83'], ['Experience Falconry Firsthand - Experience a tasting menu in Saigon', '/sitemaps/v2/experiences_pdp-L1-84'], ['Experience a traditional Sunday lunch - Experiencia de golf en Buenos Aires', '/sitemaps/v2/experiences_pdp-L1-85'], ['Experiencia de un día en Salamanca - Explore Bowen Island Walking Adventure', '/sitemaps/v2/experiences_pdp-L1-86'], ['Explore Brazilian cuisine with a chef - Explore Korea broadcast Town & MBC', '/sitemaps/v2/experiences_pdp-L1-87'], ['Explore Korčula with Art historian - Explore Saratoga Passage by Kayak', '/sitemaps/v2/experiences_pdp-L1-88'], ['Explore Sceneries of Sokcho - Explore city nightlife with a musician', '/sitemaps/v2/experiences_pdp-L1-89'], ['Explore city nightlife with locals! - Explore the Old District Sham Shui Po', '/sitemaps/v2/experiences_pdp-L1-90'], ['Explore the Oslo Wilderness in Kayak - Exploring Maspalomas by E-Scooter', '/sitemaps/v2/experiences_pdp-L1-91'], ['Exploring RawaPening Lake of Salatiga - FOOTBALL MATCH IN MEDELLIN', '/sitemaps/v2/experiences_pdp-L1-92'], ['FOREST BATHING AND CREATING MEMORIES - Fantasy Photo~Shoot with A Unicorn...', '/sitemaps/v2/experiences_pdp-L1-93'], ['Fantasy adventure in the mountains - Fazendo Arte na Serra da Cantareira!', '/sitemaps/v2/experiences_pdp-L1-94'], ['Faça acrobacia em tecido como circense - Film your experience in Osaka', '/sitemaps/v2/experiences_pdp-L1-95'], ['FilmNeverDies-Filmphotography Workshop - Fishing with the Presidents', '/sitemaps/v2/experiences_pdp-L1-96'], ['Fishing, Malecon and Sunset - Florist in Paris', '/sitemaps/v2/experiences_pdp-L1-97'], ['Florist terrace & aperol spritz - Follow a historian through Havana', '/sitemaps/v2/experiences_pdp-L1-98'], ['Follow a local in vibrant East London - Food, Fotos & The French', '/sitemaps/v2/experiences_pdp-L1-99'], ['Food, Nature and Art on Tuscan Hills - Fossil Recovery Exploration', '/sitemaps/v2/experiences_pdp-L1-100'], ['Fossil hunting, Lets GO! - French food market tour & aperitif', '/sitemaps/v2/experiences_pdp-L1-101'], ['French macarons baking class - Full day surf experience', '/sitemaps/v2/experiences_pdp-L1-102'], ['Full day trail ride - Gaelic Craic and Cuisine', '/sitemaps/v2/experiences_pdp-L1-103'], ['Gain insight from a spiritual healer - Gems of Rome...', '/sitemaps/v2/experiences_pdp-L1-104'], ['Generations of Beekeeping - Get uplifted with gospel in Harlem', '/sitemaps/v2/experiences_pdp-L1-105'], ['Get ur Shine On Moonshine/Whiskey Tour - Glenorchy and Paradise Explorer', '/sitemaps/v2/experiences_pdp-L1-106'], ['Gliding on the Ice in the Red Dot - Goat Yoga!', '/sitemaps/v2/experiences_pdp-L1-107'], ['Goatherd for one day! - Graffiti, Street & Young Art in Vienna', '/sitemaps/v2/experiences_pdp-L1-108'], ['Grampians hike & waterfalls - Guide tours with E-bike in Menorca', '/sitemaps/v2/experiences_pdp-L1-109'], ['Guided Photo Tour ART Walk - Guitar workshop for the Byron Vibe', '/sitemaps/v2/experiences_pdp-L1-110'], ['Gulf Coast Birding For Beginners - Hand Building with clay in Brooklyn', '/sitemaps/v2/experiences_pdp-L1-111'], ['Hand Coffee Roasting & Cupping Class - Hang loose w/ Island Style Surf School', '/sitemaps/v2/experiences_pdp-L1-112'], ['Hang out in Shibuya and craft bonsai - Have a personal photographer for a day', '/sitemaps/v2/experiences_pdp-L1-113'], ['Have a picnic in a national park - Helicopter tour from Paris to Versailles', '/sitemaps/v2/experiences_pdp-L1-114'], ['Helicopter tour in São Paulo - Hidden Sculpture Stories Tour', '/sitemaps/v2/experiences_pdp-L1-115'], ['Hidden Sights & Cosmopolitan Magic - Hike Forest+ City Summit+ Rose Garden', '/sitemaps/v2/experiences_pdp-L1-116'], ['Hike Gracia hills for view & workout - Hike the Braids and Blackford Hill', '/sitemaps/v2/experiences_pdp-L1-117'], ['Hike the Bridge to Nowhere - Hiking Ajusco (1day)', '/sitemaps/v2/experiences_pdp-L1-118'], ['Hiking Ancient Mountain Olive Trees - Hill Country Estate Winery Tour', '/sitemaps/v2/experiences_pdp-L1-119'], ['Hill Country Yoga Hike - History and Tapas', '/sitemaps/v2/experiences_pdp-L1-120'], ['History and art inside Tijuca forest - Home-based cooking class in Panaji', '/sitemaps/v2/experiences_pdp-L1-121'], ['Home-cooked traditional Indian Food - Horseback ride California cowboy style', '/sitemaps/v2/experiences_pdp-L1-122'], ['Horseback ride and lunch with a farmer - Hungarian Cooking Class & Market Walk', '/sitemaps/v2/experiences_pdp-L1-123'], ['Hungarian pasta workshop and dinner - Ikebana experience', '/sitemaps/v2/experiences_pdp-L1-124'], ['Ikebana exprence - In the middle of the wet forest.', '/sitemaps/v2/experiences_pdp-L1-125'], ['In the trails of Rio - Inside Scoop LA', '/sitemaps/v2/experiences_pdp-L1-126'], ['Inside Showjumping with a Journalist - Interactive experience of lightpainting room', '/sitemaps/v2/experiences_pdp-L1-127'], ['Interactive outdoor navigation course - Invigorating Yoga Flow at Balboa Park', '/sitemaps/v2/experiences_pdp-L1-128'], ['Invitation To Ginza Personal Shopping - JUNGLE ART WALK TULUM', '/sitemaps/v2/experiences_pdp-L1-129'], ['JUNGLE IN THE CITY - Jazz in Cape Town with Lee Thomson', '/sitemaps/v2/experiences_pdp-L1-130'], ['Jazz in a Secret Venue - Joshua Tree Macramé Journey', '/sitemaps/v2/experiences_pdp-L1-131'], ['Joshua Tree Recording Studio & Lodging - Kamikochi hike and visit the Shrine', '/sitemaps/v2/experiences_pdp-L1-132'], ['Kanazawa Haul at Depachika - Kayak with the Dolphins', '/sitemaps/v2/experiences_pdp-L1-133'], ['Kayak&Snorkeling experience in Genoa - Kitesurf In Lake Garda', '/sitemaps/v2/experiences_pdp-L1-134'], ['Kitesurf Lecce-Scuola Kite Salento - Kundalini Yoga to awaken Inner Lover', '/sitemaps/v2/experiences_pdp-L1-135'], ['Kundalini Yoga, Gong and Yogi Tea - LGBTQ+ History Tour of Brighton', '/sitemaps/v2/experiences_pdp-L1-136'], ['LGBTQ+ queer and trans tour of London - Lamawandern im Mostviertel', '/sitemaps/v2/experiences_pdp-L1-137'], ['Lamb Farm Life - Learn 3D printing at Maker Bean Cafe!', '/sitemaps/v2/experiences_pdp-L1-138'], ['Learn 3D printing: design a souvenir - Learn Pencak Silat (Bali Martial Art)', '/sitemaps/v2/experiences_pdp-L1-139'], ['Learn Phone Photography in Mongkok - Learn and indulge in Quercy cuisine', '/sitemaps/v2/experiences_pdp-L1-140'], ['Learn and play poker in Barão Geraldo - Learn how to wakeboard', '/sitemaps/v2/experiences_pdp-L1-141'], ['Learn how to wakeboard or wakesurf - Learn to DJ and dance at a queer club', '/sitemaps/v2/experiences_pdp-L1-142'], ['Learn to DJ at Private Studio - Learn to bake sourdough in my kitchen', '/sitemaps/v2/experiences_pdp-L1-143'], ['Learn to bake traditional Irish Breads - Learn to play badminton!', '/sitemaps/v2/experiences_pdp-L1-144'], ['Learn to play poker from a Vegas pro - Legends and secrets with traditional music', '/sitemaps/v2/experiences_pdp-L1-145'], ["Lei Po'o (Flower Crown) Workshop - Let's learn how to wearing kimono", '/sitemaps/v2/experiences_pdp-L1-146'], ["Let's learn to SKETCH & DRAW! - Life changing Hike on Crowders Mtn.", '/sitemaps/v2/experiences_pdp-L1-147'], ['Life coaching with horses - Lisbon with the historic tram', '/sitemaps/v2/experiences_pdp-L1-148'], ["Lisbon's CatWalk - Living the Santa Cruz Canyon!", '/sitemaps/v2/experiences_pdp-L1-149'], ['Living the dying city! - London Chicken Wing Tour!', '/sitemaps/v2/experiences_pdp-L1-150'], ['London Christmas Lights Running Tour - Luis Barragán en 5 tiempos.', '/sitemaps/v2/experiences_pdp-L1-151'], ['Lujan de Cuyo Private Wine Tour - Macaron Class in Paris', '/sitemaps/v2/experiences_pdp-L1-152'], ["Macaron Masterclass in Borough - Makati's best food drinks and music", '/sitemaps/v2/experiences_pdp-L1-153'], ['Make Fujiyama Katsu-Curry with a chef - Make Wine Candles+Bottle Cutting (DIY)', '/sitemaps/v2/experiences_pdp-L1-154'], ['Make Your Leather Tortellino Keychain - Make a seashell frame after a boatride', '/sitemaps/v2/experiences_pdp-L1-155'], ['Make a signature scent with a perfumer - Make sushi in a traditional folk house', '/sitemaps/v2/experiences_pdp-L1-156'], ['Make sustainable leather espadrilles - Make your own silk scarf in Paris !', '/sitemaps/v2/experiences_pdp-L1-157'], ['Make your own silver jewel in Florence - Malen und Zeichnen', '/sitemaps/v2/experiences_pdp-L1-158'], ['Maleny Yoga Rainforest Wellness - Market Tour and a Home Cooked Meal', '/sitemaps/v2/experiences_pdp-L1-159'], ['Market Tour&Cook Kenyan cultural food - Matera Photo Journey', '/sitemaps/v2/experiences_pdp-L1-160'], ['Mathematics Walking Tour of Amsterdam - Meditazione rilassamento profondo', '/sitemaps/v2/experiences_pdp-L1-161'], ['Meditazione e benEssere in spiaggia - Men & Womens Wellness Retreat', '/sitemaps/v2/experiences_pdp-L1-162'], ['Mental Wellness Picnic Chat - Midday Vermouth Madrileño & Tortilla', '/sitemaps/v2/experiences_pdp-L1-163'], ['Middle Eastern Food Cooking Class - Mini Horse Experience!', '/sitemaps/v2/experiences_pdp-L1-164'], ['Mini Nature Retreat - Moniz Family Surf: Private Surf Lesson', '/sitemaps/v2/experiences_pdp-L1-165'], ['Moniz Family Surf: Waikiki Surf Lesson - Morocco in frames:Culture &photography', '/sitemaps/v2/experiences_pdp-L1-166'], ['Mortadella & Bologna: a love story - Mountain plateau hike (5-7 hr)', '/sitemaps/v2/experiences_pdp-L1-167'], ['Mountain summit and cozy restaurant - Music, Mummies, and Museums!', '/sitemaps/v2/experiences_pdp-L1-168'], ['Music, art, history, Rio nightlife - NEW! Amsterdam light cruise', '/sitemaps/v2/experiences_pdp-L1-169'], ['NEW! Aperitivo tour - Fun Fun Fun! ❤️ - National Arboretum and #madeinDC Tour', '/sitemaps/v2/experiences_pdp-L1-170'], ['National Gallery with an Art Historian - Nature trails & Birding near Cali', '/sitemaps/v2/experiences_pdp-L1-171'], ['Nature walk near Hotspring in Jozankei - Night Cheese: California Artisans', '/sitemaps/v2/experiences_pdp-L1-172'], ["Night Cherry Viewing - Nonna Cecilia's Pasta Workshop!", '/sitemaps/v2/experiences_pdp-L1-173'], ['Noodle & Roll & Water Puppet Theater - Obstacle Course Adventure', '/sitemaps/v2/experiences_pdp-L1-174'], ['Ocean Beach Coffee Cart Bike Tour - Old Montreal: Intimate & Personalized', '/sitemaps/v2/experiences_pdp-L1-175'], ['Old Quebec : Mesdames & Mesdemoiselles - Ontdek de ambacht van het jam maken', '/sitemaps/v2/experiences_pdp-L1-176'], ['OoLong Tea Tasting - Osaka Old City Walk Tour with Sweets!', '/sitemaps/v2/experiences_pdp-L1-177'], ['Osaka Shinsekai/Dotonbori Walking Tour - PASTA MATRICIANA MAKING CLASS', '/sitemaps/v2/experiences_pdp-L1-178'], ['PASTA grani antichi PANE lievito nat - Paddle with the Penguins', '/sitemaps/v2/experiences_pdp-L1-179'], ['Paddle your way in history - Paint a skateboard deck with an artist', '/sitemaps/v2/experiences_pdp-L1-180'], ['Paint a surfboard to send home! - Painting on the Amalfi Coast.', '/sitemaps/v2/experiences_pdp-L1-181'], ['Painting on the Pier - Paris fabrics & crafts', '/sitemaps/v2/experiences_pdp-L1-182'], ['Paris for Families - Passeio a cavalo no por do Sol', '/sitemaps/v2/experiences_pdp-L1-183'], ['Passeio agradável no bairro do Bexiga! - Pedal untamed back roads of Outaouais', '/sitemaps/v2/experiences_pdp-L1-184'], ['Pedala nelle pinete di Ravenna - Personal Shopping Consultant', '/sitemaps/v2/experiences_pdp-L1-185'], ['Personal Shopping For Bespoke Suits - Photo Session in beautiful Basel', '/sitemaps/v2/experiences_pdp-L1-186'], ['Photo Session in sunny Ibiza - Photo tour of Dublin city', '/sitemaps/v2/experiences_pdp-L1-187'], ["Photo tour on bike with an expert - Photographing in 'off-piste' Tokyo.", '/sitemaps/v2/experiences_pdp-L1-188'], ['Photographing in Palermo markets - Photoshoot for yoga lovers in Paris', '/sitemaps/v2/experiences_pdp-L1-189'], ['Photoshoot from Varadero to Havana - Pick plant n Cook,KANOM JAAK,dessert', '/sitemaps/v2/experiences_pdp-L1-190'], ['Pick wild apples and can applesauce - Pizza Class on a Renaissance Terrace', '/sitemaps/v2/experiences_pdp-L1-191'], ['Pizza Cooking Class in Milan - Play the Chinese ink art with Runkuan', '/sitemaps/v2/experiences_pdp-L1-192'], ['Play the Fiddle in Under an Hour - Por los Cerros de Santiago.', '/sitemaps/v2/experiences_pdp-L1-193'], ['Por los cementerios de Chepe. - Pose for pin-ups with a photographer', '/sitemaps/v2/experiences_pdp-L1-194'], ['Pose for portraits in Cambridge - Prague experience: archaeology&history', '/sitemaps/v2/experiences_pdp-L1-195'], ['Prague for Locals and You - Private Alpine Backpacking Trip', '/sitemaps/v2/experiences_pdp-L1-196'], ['Private Amalfi & Positano HalfDay tour - Private Yoga Class & Eco Snack', '/sitemaps/v2/experiences_pdp-L1-197'], ['Private Yoga Class for All Levels - Professional photos of your LA Vacay!', '/sitemaps/v2/experiences_pdp-L1-198'], ['Professional photoshoot by the sea - Pêche dans le Parc du Mercantour', '/sitemaps/v2/experiences_pdp-L1-199'], ['Pêche des Calamars en mer - Rafting the Isar', '/sitemaps/v2/experiences_pdp-L1-200'], ['Rafting trip-Snorkeling&cliff jumping - Recording Studio Magic (Immersive)', '/sitemaps/v2/experiences_pdp-L1-201'], ['Recording your own k-pop song - Relaxing Costarican Typical Trails', '/sitemaps/v2/experiences_pdp-L1-202'], ['Relaxing Countryside : Somewhere Snowy - Ride OFF Road in Puerto Rico', '/sitemaps/v2/experiences_pdp-L1-203'], ['Ride Retired Racehorses at Lake Fork - River hike captured on drone video', '/sitemaps/v2/experiences_pdp-L1-204'], ['River view cooking with super mom chef - Romancing the Bean', '/sitemaps/v2/experiences_pdp-L1-205'], ['Romantic "Aperitivo" with lake view - Rugged North Cascades Private Day Tour', '/sitemaps/v2/experiences_pdp-L1-206'], ['Ruin Pub Crawl with a Local Hostess - Running Tour of Brooklyn!', '/sitemaps/v2/experiences_pdp-L1-207'], ['Running Tour of San Diego - SAORI freestyle weaving for everyone', '/sitemaps/v2/experiences_pdp-L1-208'], ['SASHIKO; Learn the Japanese embroidery - SUP around Balboa Isle & the Back Bay', '/sitemaps/v2/experiences_pdp-L1-209'], ['SUP at sunset - Sail around the city with a boat lover', '/sitemaps/v2/experiences_pdp-L1-210'], ['Sail at Sunset in Porto - Sails, Whales, and Trails', '/sitemaps/v2/experiences_pdp-L1-211'], ['Sailtour Lake Lucerne - Samurai Kendo Experience', '/sitemaps/v2/experiences_pdp-L1-212'], ['Samurai Ninja Experience & Guided Tour - Sardinia: sip by sip', '/sitemaps/v2/experiences_pdp-L1-213'], ['Sardinian identity in the kitchen - Scotch Whisky & Cheese Tasting', '/sitemaps/v2/experiences_pdp-L1-214'], ['Scotland Adventure Adrenaline Day - Seaside Yoga', '/sitemaps/v2/experiences_pdp-L1-215'], ['Seaside bike ride and paddle surfing - Secretos de la Perla Tapatía', '/sitemaps/v2/experiences_pdp-L1-216'], ['Secretos del centro de Coyoacán - Segeln in Berlin', '/sitemaps/v2/experiences_pdp-L1-217'], ['Segeltörn auf dem Steinhuder Meer - Seville From The Rooftops', '/sitemaps/v2/experiences_pdp-L1-218'], ['Seville Great Experience in E-Bike - Shmurgle a Goat, Cosy Winter Edition', '/sitemaps/v2/experiences_pdp-L1-219'], ['Shochu tasting workshop in Asakusa - Shop-til-you-drop with Fashion Stylist', '/sitemaps/v2/experiences_pdp-L1-220'], ['Shopper bag making class - Silicon Valley High Tech Company Tour', '/sitemaps/v2/experiences_pdp-L1-221']]}

Scrape Google News with lxml and python

I'm trying to scrape Google News using python and lxml. Everything is going well but when I try to print each div data using a for loop everything mess up.
Here my code:
# -*- coding: utf-8 -*-
from stem import Signal
from stem.control import Controller
from lxml import html
from lxml import cssselect
from lxml import etree
import requests
proxies = {
'http' : 'http://127.0.0.1:8123'
}
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'
}
url = "https://www.google.it/search?hl=en&tbm=nws&as_occt=any&tbs=cdr:1,cd_min:9/1/2014,cd_max:9/1/2014,sbd:1&as_nsrc=Daily%20Mail&start=0"
page = requests.get(url,proxies=proxies,headers=headers)
tree = html.fromstring(page.content)
results = tree.xpath('//div[#class="_cnc"]')
for div in results:
print(div)
I get this output:
<Element div at 0x7f4154df9470>
<Element div at 0x7f4154df94c8>
<Element div at 0x7f4154df9520>
<Element div at 0x7f4154df9578>
<Element div at 0x7f4154df95d0>
<Element div at 0x7f4154df9628>
<Element div at 0x7f4154df9680>
<Element div at 0x7f4154df96d8>
<Element div at 0x7f4154df9730>
<Element div at 0x7f4154df9788>
I would like to extract from each div -> title, href and snippet, with something like this:
....
for div in results:
title = div.xpath('//a[#class="l _HId"]/text()')
href = div.xpath('//a[#class="l _HId"]/#href')
snippet = div.xpath('//div[#class="st"]/text()')
#for example
print(title)
....
When I try to print I get same multiple output:
['Pro-Russian rebels lower demands in peace talks', "'If I want to I can take Kiev in a fortnight': Putin's threat to Europe ", 'Showing a yen for business: PM Modi and Japanese premier Abe ', 'Modi visit draws pledges of support from Japan', 'The spectre of the Army rises again over Pakistan', 'Protesters briefly storm Pakistan state TV station', 'Anti-government protesters storm Pakistan state television station ', 'Austerity debate flares as Europe recovery fades', 'Inquiries begin into nude celebrity photo leaks', 'He tried to sell intimate pictures of Jennifer Lawrence in return for ']
['Pro-Russian rebels lower demands in peace talks', "'If I want to I can take Kiev in a fortnight': Putin's threat to Europe ", 'Showing a yen for business: PM Modi and Japanese premier Abe ', 'Modi visit draws pledges of support from Japan', 'The spectre of the Army rises again over Pakistan', 'Protesters briefly storm Pakistan state TV station', 'Anti-government protesters storm Pakistan state television station ', 'Austerity debate flares as Europe recovery fades', 'Inquiries begin into nude celebrity photo leaks', 'He tried to sell intimate pictures of Jennifer Lawrence in return for ']
['Pro-Russian rebels lower demands in peace talks', "'If I want to I can take Kiev in a fortnight': Putin's threat to Europe ", 'Showing a yen for business: PM Modi and Japanese premier Abe ', 'Modi visit draws pledges of support from Japan', 'The spectre of the Army rises again over Pakistan', 'Protesters briefly storm Pakistan state TV station', 'Anti-government protesters storm Pakistan state television station ', 'Austerity debate flares as Europe recovery fades', 'Inquiries begin into nude celebrity photo leaks', 'He tried to sell intimate pictures of Jennifer Lawrence in return for ']
['Pro-Russian rebels lower demands in peace talks', "'If I want to I can take Kiev in a fortnight': Putin's threat to Europe ", 'Showing a yen for business: PM Modi and Japanese premier Abe ', 'Modi visit draws pledges of support from Japan', 'The spectre of the Army rises again over Pakistan', 'Protesters briefly storm Pakistan state TV station', 'Anti-government protesters storm Pakistan state television station ', 'Austerity debate flares as Europe recovery fades', 'Inquiries begin into nude celebrity photo leaks', 'He tried to sell intimate pictures of Jennifer Lawrence in return for ']
['Pro-Russian rebels lower demands in peace talks', "'If I want to I can take Kiev in a fortnight': Putin's threat to Europe ", 'Showing a yen for business: PM Modi and Japanese premier Abe ', 'Modi visit draws pledges of support from Japan', 'The spectre of the Army rises again over Pakistan', 'Protesters briefly storm Pakistan state TV station', 'Anti-government protesters storm Pakistan state television station ', 'Austerity debate flares as Europe recovery fades', 'Inquiries begin into nude celebrity photo leaks', 'He tried to sell intimate pictures of Jennifer Lawrence in return for ']
['Pro-Russian rebels lower demands in peace talks', "'If I want to I can take Kiev in a fortnight': Putin's threat to Europe ", 'Showing a yen for business: PM Modi and Japanese premier Abe ', 'Modi visit draws pledges of support from Japan', 'The spectre of the Army rises again over Pakistan', 'Protesters briefly storm Pakistan state TV station', 'Anti-government protesters storm Pakistan state television station ', 'Austerity debate flares as Europe recovery fades', 'Inquiries begin into nude celebrity photo leaks', 'He tried to sell intimate pictures of Jennifer Lawrence in return for ']
['Pro-Russian rebels lower demands in peace talks', "'If I want to I can take Kiev in a fortnight': Putin's threat to Europe ", 'Showing a yen for business: PM Modi and Japanese premier Abe ', 'Modi visit draws pledges of support from Japan', 'The spectre of the Army rises again over Pakistan', 'Protesters briefly storm Pakistan state TV station', 'Anti-government protesters storm Pakistan state television station ', 'Austerity debate flares as Europe recovery fades', 'Inquiries begin into nude celebrity photo leaks', 'He tried to sell intimate pictures of Jennifer Lawrence in return for ']
['Pro-Russian rebels lower demands in peace talks', "'If I want to I can take Kiev in a fortnight': Putin's threat to Europe ", 'Showing a yen for business: PM Modi and Japanese premier Abe ', 'Modi visit draws pledges of support from Japan', 'The spectre of the Army rises again over Pakistan', 'Protesters briefly storm Pakistan state TV station', 'Anti-government protesters storm Pakistan state television station ', 'Austerity debate flares as Europe recovery fades', 'Inquiries begin into nude celebrity photo leaks', 'He tried to sell intimate pictures of Jennifer Lawrence in return for ']
['Pro-Russian rebels lower demands in peace talks', "'If I want to I can take Kiev in a fortnight': Putin's threat to Europe ", 'Showing a yen for business: PM Modi and Japanese premier Abe ', 'Modi visit draws pledges of support from Japan', 'The spectre of the Army rises again over Pakistan', 'Protesters briefly storm Pakistan state TV station', 'Anti-government protesters storm Pakistan state television station ', 'Austerity debate flares as Europe recovery fades', 'Inquiries begin into nude celebrity photo leaks', 'He tried to sell intimate pictures of Jennifer Lawrence in return for ']
['Pro-Russian rebels lower demands in peace talks', "'If I want to I can take Kiev in a fortnight': Putin's threat to Europe ", 'Showing a yen for business: PM Modi and Japanese premier Abe ', 'Modi visit draws pledges of support from Japan', 'The spectre of the Army rises again over Pakistan', 'Protesters briefly storm Pakistan state TV station', 'Anti-government protesters storm Pakistan state television station ', 'Austerity debate flares as Europe recovery fades', 'Inquiries begin into nude celebrity photo leaks', 'He tried to sell intimate pictures of Jennifer Lawrence in return for ']
Does anyone know what's wrong with my code?
You are almost there - just prepend the dots to the inner XPath expressions to make them specific to the context of the current node:
for div in results:
title = div.xpath('.//a[#class="l _HId"]/text()')
href = div.xpath('.//a[#class="l _HId"]/#href')
snippet = div.xpath('.//div[#class="st"]/text()')
#for example
print(title)

How to extract rows from simple html table?

For some reason I am unable to extract the table from this simple html table.
from bs4 import BeautifulSoup
import requests
def main():
html_doc = requests.get(
'http://www.wolfson.cam.ac.uk/old-site/cgi/catering-menu?week=0;style=/0,vertical')
soup = BeautifulSoup(html_doc.text, 'html.parser')
table = soup.find('table')
print table
if __name__ == '__main__':
main()
I have the table, but I cannot understand the beautifulsoup documentation well enough to know how to extract the data. The data are in tr tags.
The website shows a simple HTML food menu.
I would like to output the day of the week and the menu for that day:
Monday:
Lunch: some_lunch, Supper: some_food
Tuesday:
Lunch: some_lunch, Supper: some_supper
and so on for all the days of the week. 'Formal Hall' can be ignored.
How can I iterate over the tr tags so that I can create this output?
I normally don't provide direct solutions. You should've tried some code and if you face any issue then post it here. But anyways, this is what I've written and it should help in giving you a head start.
soup = BeautifulSoup(r.content)
rows = soup.findAll("tr")
for i in xrange(1,8):
row = rows[i]
print row.find("th").text
for j in xrange(0,2):
print rows[0].findAll("th")[j+1].text.strip(), ": ",
td = row.findAll("td")[j]
for p in td.findAll("p"):
print p.text, ",",
print
print
Output will look something like this:
Monday
Lunch: Leek and Potato Soup, Spaghetti Bolognese with Garlic Bread, Red Pepper and Chickpea Stroganoff with Brown Rice, Chicken Goujons with Garlic Mayonnaise Dip, Vegetable Grills with Sweet Chilli Sauce, Coffee and Walnut Sponge with Custard,
Supper: Leek and Potato Soup, Breaded Haddock with Lemon and Tartare Sauce, Vegetable Samosa with Lentil Dahl, Chilli Beef Wraps, Steamed Strawberry Sponge with Custard,
Tuesday
Lunch: Tomato and Basil Soup, Pan-fried Harrisa Spiced Chicken with Roasted Vegetables, Vegetarian Spaghetti Bolognese with Garlic Bread, Jacket Potato with Various Fillings, Apple and Plum Pie with Custard,
Supper: Tomato and Basil Soup, Lamb Tagine with Fruit Couscous, Vegetable Biryani with Naan Bread, Pan-fried Turkey Escalope, Raspberry Shortbread,

Categories